mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 04:10:54 -08:00
(texinfo-anchor): New function.
This commit is contained in:
parent
c69bfc1490
commit
007be42afd
1 changed files with 16 additions and 0 deletions
|
|
@ -1132,6 +1132,22 @@ Leave point after argument."
|
|||
(insert ?\n)
|
||||
(setq texinfo-last-node-pos (point))))
|
||||
|
||||
(put 'anchor 'texinfo-format 'texinfo-anchor)
|
||||
(defun texinfo-anchor ()
|
||||
(let (anchor-string
|
||||
(here (- (point) 7)) ; save location of beginning of `@anchor'
|
||||
(arg (texinfo-parse-arg-discard)))
|
||||
(delete-char 1) ; since a space is left after -discard
|
||||
(forward-paragraph)
|
||||
(let ((end (point)))
|
||||
(if (save-excursion
|
||||
(backward-word 1)
|
||||
(search-forward "@refill" end t))
|
||||
(setq anchor-string "@anchor-yes-refill")
|
||||
(setq anchor-string "@anchor-no-refill")))
|
||||
(goto-char here)
|
||||
(insert anchor-string "{" arg "}")))
|
||||
|
||||
(put 'menu 'texinfo-format 'texinfo-format-menu)
|
||||
(defun texinfo-format-menu ()
|
||||
(texinfo-discard-line)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue