Mercurial > emacs
comparison lisp/textmodes/texinfmt.el @ 22661:90460d1e2c3f
(texinfo-anchor): New function.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 02 Jul 1998 08:05:24 +0000 |
parents | 95743e18a01c |
children | c47e86637371 |
comparison
equal
deleted
inserted
replaced
22660:1614e05bf2b5 | 22661:90460d1e2c3f |
---|---|
1129 (insert ", Prev: " prev)) | 1129 (insert ", Prev: " prev)) |
1130 (if up | 1130 (if up |
1131 (insert ", Up: " up)) | 1131 (insert ", Up: " up)) |
1132 (insert ?\n) | 1132 (insert ?\n) |
1133 (setq texinfo-last-node-pos (point)))) | 1133 (setq texinfo-last-node-pos (point)))) |
1134 | |
1135 (put 'anchor 'texinfo-format 'texinfo-anchor) | |
1136 (defun texinfo-anchor () | |
1137 (let (anchor-string | |
1138 (here (- (point) 7)) ; save location of beginning of `@anchor' | |
1139 (arg (texinfo-parse-arg-discard))) | |
1140 (delete-char 1) ; since a space is left after -discard | |
1141 (forward-paragraph) | |
1142 (let ((end (point))) | |
1143 (if (save-excursion | |
1144 (backward-word 1) | |
1145 (search-forward "@refill" end t)) | |
1146 (setq anchor-string "@anchor-yes-refill") | |
1147 (setq anchor-string "@anchor-no-refill"))) | |
1148 (goto-char here) | |
1149 (insert anchor-string "{" arg "}"))) | |
1134 | 1150 |
1135 (put 'menu 'texinfo-format 'texinfo-format-menu) | 1151 (put 'menu 'texinfo-format 'texinfo-format-menu) |
1136 (defun texinfo-format-menu () | 1152 (defun texinfo-format-menu () |
1137 (texinfo-discard-line) | 1153 (texinfo-discard-line) |
1138 (insert "* Menu:\n\n")) | 1154 (insert "* Menu:\n\n")) |