summaryrefslogtreecommitdiff
path: root/lisp/textmodes/texinfmt.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-10-31 08:00:37 +0000
committerRichard M. Stallman <rms@gnu.org>1994-10-31 08:00:37 +0000
commitb439f4ac320526407936519aa9d6f1afa1afcb2d (patch)
treed1d19e57d7606006ef7ebd18665438529b2ab9bc /lisp/textmodes/texinfmt.el
parentf0088b524645ac1667d93295f572b4cad3f50936 (diff)
downloademacs-b439f4ac320526407936519aa9d6f1afa1afcb2d.tar.gz
(texinfo-alias-list): New variable.
(texinfo-format-region, texinfo-format-buffer-1): Clear texinfo-alias-list. (texinfo-format-scan): Implement @alias expansion.
Diffstat (limited to 'lisp/textmodes/texinfmt.el')
-rw-r--r--lisp/textmodes/texinfmt.el15
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 @@
(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 @@ converted to Info is stored in a temporary buffer."
(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 @@ converted to Info is stored in a temporary buffer."
(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 @@ lower types.")
(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)