Mercurial > emacs
changeset 9759:ebe611f49450
(texinfo-alias-list): New variable.
(texinfo-format-region, texinfo-format-buffer-1): Clear texinfo-alias-list.
(texinfo-format-scan): Implement @alias expansion.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 31 Oct 1994 08:00:37 +0000 |
parents | b9084912762f |
children | 05fbcd364e6e |
files | lisp/textmodes/texinfmt.el |
diffstat | 1 files changed, 12 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/textmodes/texinfmt.el Sun Oct 30 21:20:42 1994 +0000 +++ b/lisp/textmodes/texinfmt.el Mon Oct 31 08:00:37 1994 +0000 @@ -42,6 +42,7 @@ (defvar texinfo-last-node) (defvar texinfo-node-names) (defvar texinfo-enclosure-list) +(defvar texinfo-alias-list) (defvar texinfo-command-start) (defvar texinfo-command-end) @@ -236,6 +237,7 @@ (insert "\n")) ;; Don't use a previous value of texinfo-enclosure-list. (setq texinfo-enclosure-list nil) + (setq texinfo-alias-list nil) (goto-char (point-min)) (if (looking-at "\\\\input[ \t]+texinfo") @@ -305,6 +307,7 @@ (input-buffer (current-buffer)) (input-directory default-directory)) (setq texinfo-enclosure-list nil) + (setq texinfo-alias-list nil) (save-excursion (goto-char (point-min)) (or (search-forward "@setfilename" nil t) @@ -660,10 +663,16 @@ (forward-word 1) (forward-char 1)) (setq texinfo-command-end (point)) - ;; Call the handler for this command. + ;; Handle let aliasing (setq texinfo-command-name - (intern (buffer-substring - (1+ texinfo-command-start) texinfo-command-end))) + (let (trial + (cmdname + (buffer-substring + (1+ texinfo-command-start) texinfo-command-end))) + (while (setq trial (assoc cmdname texinfo-alias-list)) + (setq cmdname (cdr trial))) + (intern cmdname))) + ;; Call the handler for this command. (let ((enclosure-type (assoc (symbol-name texinfo-command-name)