aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman1999-02-13 16:40:10 +0000
committerRichard M. Stallman1999-02-13 16:40:10 +0000
commit8d66d13d121cdd4b08caf7e8c551b8681d51cfae (patch)
treefbed54c0f1145e6dcffb2b0a25fcd83a209cfa6d /lisp
parent5057be3e8cef183fec85bb17f1d70db9b48ddb3e (diff)
downloademacs-8d66d13d121cdd4b08caf7e8c551b8681d51cfae.tar.gz
emacs-8d66d13d121cdd4b08caf7e8c551b8681d51cfae.zip
(texinfo-alias): New function.
(texinfo-fold-nodename-case): Add defvar. (texinfo-format-node): Do case folding if specified.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/textmodes/texinfmt.el24
1 files changed, 23 insertions, 1 deletions
diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el
index d102e8aa5f6..9ba0055e19b 100644
--- a/lisp/textmodes/texinfmt.el
+++ b/lisp/textmodes/texinfmt.el
@@ -66,6 +66,7 @@ If optional argument HERE is non-nil, insert info at point."
66(defvar texinfo-node-names) 66(defvar texinfo-node-names)
67(defvar texinfo-enclosure-list) 67(defvar texinfo-enclosure-list)
68(defvar texinfo-alias-list) 68(defvar texinfo-alias-list)
69(defvar texinfo-fold-nodename-case nil)
69 70
70(defvar texinfo-command-start) 71(defvar texinfo-command-start)
71(defvar texinfo-command-end) 72(defvar texinfo-command-end)
@@ -1117,7 +1118,7 @@ Leave point after argument."
1117 (up (nth 3 args))) 1118 (up (nth 3 args)))
1118 (texinfo-discard-command) 1119 (texinfo-discard-command)
1119 (setq texinfo-last-node name) 1120 (setq texinfo-last-node name)
1120 (let ((tem (downcase name))) 1121 (let ((tem (if texinfo-fold-nodename-case (downcase name) name)))
1121 (if (assoc tem texinfo-node-names) 1122 (if (assoc tem texinfo-node-names)
1122 (error "Duplicate node name: %s" name) 1123 (error "Duplicate node name: %s" name)
1123 (setq texinfo-node-names (cons (list tem) texinfo-node-names)))) 1124 (setq texinfo-node-names (cons (list tem) texinfo-node-names))))
@@ -2270,6 +2271,27 @@ This command is executed when texinfmt sees @item inside @multitable."
2270 texinfo-enclosure-list)))) 2271 texinfo-enclosure-list))))
2271 2272
2272 2273
2274;;; @alias
2275
2276(put 'alias 'texinfo-format 'texinfo-alias)
2277(defun texinfo-alias ()
2278 (let ((start (1- (point)))
2279 args)
2280 (skip-chars-forward " ")
2281 (save-excursion (end-of-line) (setq texinfo-command-end (point)))
2282 (if (not (looking-at "\\([^=]+\\)=\\(.*\\)"))
2283 (error "Invalid alias command")
2284 (setq texinfo-alias-list
2285 (cons
2286 (cons
2287 (buffer-substring (match-beginning 1) (match-end 1))
2288 (buffer-substring (match-beginning 2) (match-end 2)))
2289 texinfo-alias-list))
2290 (texinfo-discard-command))
2291 )
2292 )
2293
2294
2273;;; @var, @code and the like 2295;;; @var, @code and the like
2274 2296
2275(put 'var 'texinfo-format 'texinfo-format-var) 2297(put 'var 'texinfo-format 'texinfo-format-var)