# HG changeset patch # User Richard M. Stallman # Date 783590437 0 # Node ID ebe611f4945036dbfd1405fb64bc2c2bcbe9f813 # Parent b9084912762fdbec12cd54db40bc743d1d53b743 (texinfo-alias-list): New variable. (texinfo-format-region, texinfo-format-buffer-1): Clear texinfo-alias-list. (texinfo-format-scan): Implement @alias expansion. diff -r b9084912762f -r ebe611f49450 lisp/textmodes/texinfmt.el --- 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)