]> git.eshelyaron.com Git - emacs.git/commitdiff
(texinfo-alias): New function.
authorRichard M. Stallman <rms@gnu.org>
Sat, 13 Feb 1999 16:40:10 +0000 (16:40 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 13 Feb 1999 16:40:10 +0000 (16:40 +0000)
(texinfo-fold-nodename-case): Add defvar.
(texinfo-format-node): Do case folding if specified.

lisp/textmodes/texinfmt.el

index d102e8aa5f6a529b83330a9ef79e9d63104fafe4..9ba0055e19bfb704df681f92e07341f192dec529 100644 (file)
@@ -66,6 +66,7 @@ If optional argument HERE is non-nil, insert info at point."
 (defvar texinfo-node-names)
 (defvar texinfo-enclosure-list)
 (defvar texinfo-alias-list)
+(defvar texinfo-fold-nodename-case nil)
 
 (defvar texinfo-command-start)
 (defvar texinfo-command-end)
@@ -1117,7 +1118,7 @@ Leave point after argument."
          (up (nth 3 args)))
     (texinfo-discard-command)
     (setq texinfo-last-node name)
-    (let ((tem (downcase name)))
+    (let ((tem (if texinfo-fold-nodename-case (downcase name) name)))
       (if (assoc tem texinfo-node-names)
           (error "Duplicate node name: %s" name)
         (setq texinfo-node-names (cons (list tem) texinfo-node-names))))
@@ -2269,6 +2270,27 @@ This command is executed when texinfmt sees @item inside @multitable."
                 end-delimiter))
          texinfo-enclosure-list))))
 
+\f
+;;; @alias
+
+(put 'alias 'texinfo-format 'texinfo-alias)
+(defun texinfo-alias ()
+  (let ((start (1- (point)))
+        args)
+    (skip-chars-forward " ")
+    (save-excursion (end-of-line) (setq texinfo-command-end (point)))
+    (if (not (looking-at "\\([^=]+\\)=\\(.*\\)"))
+       (error "Invalid alias command")
+      (setq texinfo-alias-list
+           (cons
+            (cons
+             (buffer-substring (match-beginning 1) (match-end 1))
+             (buffer-substring (match-beginning 2) (match-end 2)))
+            texinfo-alias-list))
+      (texinfo-discard-command))
+    )
+  )
+
 \f
 ;;; @var, @code and the like