diff options
| author | Richard M. Stallman | 1994-10-31 08:00:37 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-10-31 08:00:37 +0000 |
| commit | dc7deb17a4dc45888d6b492e714f271d35fb17f1 (patch) | |
| tree | d8a720f06ca7353535ef41184f9fecdadbc5a01d | |
| parent | 308a28603034c281d22761c426938e54763d19c9 (diff) | |
| download | emacs-dc7deb17a4dc45888d6b492e714f271d35fb17f1.tar.gz emacs-dc7deb17a4dc45888d6b492e714f271d35fb17f1.zip | |
(texinfo-alias-list): New variable.
(texinfo-format-region, texinfo-format-buffer-1): Clear texinfo-alias-list.
(texinfo-format-scan): Implement @alias expansion.
| -rw-r--r-- | lisp/textmodes/texinfmt.el | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el index e7b8b5562ce..60d6232a90e 100644 --- a/lisp/textmodes/texinfmt.el +++ b/lisp/textmodes/texinfmt.el | |||
| @@ -42,6 +42,7 @@ | |||
| 42 | (defvar texinfo-last-node) | 42 | (defvar texinfo-last-node) |
| 43 | (defvar texinfo-node-names) | 43 | (defvar texinfo-node-names) |
| 44 | (defvar texinfo-enclosure-list) | 44 | (defvar texinfo-enclosure-list) |
| 45 | (defvar texinfo-alias-list) | ||
| 45 | 46 | ||
| 46 | (defvar texinfo-command-start) | 47 | (defvar texinfo-command-start) |
| 47 | (defvar texinfo-command-end) | 48 | (defvar texinfo-command-end) |
| @@ -236,6 +237,7 @@ converted to Info is stored in a temporary buffer." | |||
| 236 | (insert "\n")) | 237 | (insert "\n")) |
| 237 | ;; Don't use a previous value of texinfo-enclosure-list. | 238 | ;; Don't use a previous value of texinfo-enclosure-list. |
| 238 | (setq texinfo-enclosure-list nil) | 239 | (setq texinfo-enclosure-list nil) |
| 240 | (setq texinfo-alias-list nil) | ||
| 239 | 241 | ||
| 240 | (goto-char (point-min)) | 242 | (goto-char (point-min)) |
| 241 | (if (looking-at "\\\\input[ \t]+texinfo") | 243 | (if (looking-at "\\\\input[ \t]+texinfo") |
| @@ -305,6 +307,7 @@ converted to Info is stored in a temporary buffer." | |||
| 305 | (input-buffer (current-buffer)) | 307 | (input-buffer (current-buffer)) |
| 306 | (input-directory default-directory)) | 308 | (input-directory default-directory)) |
| 307 | (setq texinfo-enclosure-list nil) | 309 | (setq texinfo-enclosure-list nil) |
| 310 | (setq texinfo-alias-list nil) | ||
| 308 | (save-excursion | 311 | (save-excursion |
| 309 | (goto-char (point-min)) | 312 | (goto-char (point-min)) |
| 310 | (or (search-forward "@setfilename" nil t) | 313 | (or (search-forward "@setfilename" nil t) |
| @@ -660,10 +663,16 @@ lower types.") | |||
| 660 | (forward-word 1) | 663 | (forward-word 1) |
| 661 | (forward-char 1)) | 664 | (forward-char 1)) |
| 662 | (setq texinfo-command-end (point)) | 665 | (setq texinfo-command-end (point)) |
| 663 | ;; Call the handler for this command. | 666 | ;; Handle let aliasing |
| 664 | (setq texinfo-command-name | 667 | (setq texinfo-command-name |
| 665 | (intern (buffer-substring | 668 | (let (trial |
| 666 | (1+ texinfo-command-start) texinfo-command-end))) | 669 | (cmdname |
| 670 | (buffer-substring | ||
| 671 | (1+ texinfo-command-start) texinfo-command-end))) | ||
| 672 | (while (setq trial (assoc cmdname texinfo-alias-list)) | ||
| 673 | (setq cmdname (cdr trial))) | ||
| 674 | (intern cmdname))) | ||
| 675 | ;; Call the handler for this command. | ||
| 667 | (let ((enclosure-type | 676 | (let ((enclosure-type |
| 668 | (assoc | 677 | (assoc |
| 669 | (symbol-name texinfo-command-name) | 678 | (symbol-name texinfo-command-name) |