# HG changeset patch # User Richard M. Stallman # Date 918924010 0 # Node ID 96aef917400342f0b07f7a52ece35ec48b0e7626 # Parent a9e60ce7973ebfdea232f556ae3e0dc62d903b2b (texinfo-alias): New function. (texinfo-fold-nodename-case): Add defvar. (texinfo-format-node): Do case folding if specified. diff -r a9e60ce7973e -r 96aef9174003 lisp/textmodes/texinfmt.el --- a/lisp/textmodes/texinfmt.el Sat Feb 13 16:36:24 1999 +0000 +++ b/lisp/textmodes/texinfmt.el Sat Feb 13 16:40:10 1999 +0000 @@ -66,6 +66,7 @@ (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 @@ (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)))) @@ -2270,6 +2271,27 @@ texinfo-enclosure-list)))) +;;; @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)) + ) + ) + + ;;; @var, @code and the like (put 'var 'texinfo-format 'texinfo-format-var)