diff options
| author | Richard M. Stallman | 1998-07-02 08:05:24 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-07-02 08:05:24 +0000 |
| commit | 007be42afdcddcde3006553a07d10cb06cec0b6d (patch) | |
| tree | cc62713ef5a64b0be8eae4497f526a6619296edf /lisp/textmodes | |
| parent | c69bfc1490da909ef6805b2802dcc60fc1b7f412 (diff) | |
| download | emacs-007be42afdcddcde3006553a07d10cb06cec0b6d.tar.gz emacs-007be42afdcddcde3006553a07d10cb06cec0b6d.zip | |
(texinfo-anchor): New function.
Diffstat (limited to 'lisp/textmodes')
| -rw-r--r-- | lisp/textmodes/texinfmt.el | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el index 90e682f4705..ddb12882bd9 100644 --- a/lisp/textmodes/texinfmt.el +++ b/lisp/textmodes/texinfmt.el | |||
| @@ -1132,6 +1132,22 @@ Leave point after argument." | |||
| 1132 | (insert ?\n) | 1132 | (insert ?\n) |
| 1133 | (setq texinfo-last-node-pos (point)))) | 1133 | (setq texinfo-last-node-pos (point)))) |
| 1134 | 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 "}"))) | ||
| 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) |