changeset 4868:6de32c7b6045

(texinfo-format-begin-end): Bind cmd locally. (texinfo-defun-type): Renamed from command-type in various fns. (texinfo-command-start, texinfo-command-end, texinfo-command-name) (texinfo-defun-type, texinfo-last-node-pos, texinfo-stack) (texinfo-short-index-cmds-alist) (texinfo-short-index-format-cmds-alist, texinfo-format-filename) (texinfo-footnote-number, texinfo-start-of-header) (texinfo-end-of-header, texinfo-raisesections-alist) (texinfo-lowersections-alist): Add defvars.
author Richard M. Stallman <rms@gnu.org>
date Thu, 21 Oct 1993 17:56:09 +0000
parents 3349947f33e6
children a3a72fce1143
files lisp/textmodes/texinfmt.el
diffstat 1 files changed, 27 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/texinfmt.el	Thu Oct 21 00:43:51 1993 +0000
+++ b/lisp/textmodes/texinfmt.el	Thu Oct 21 17:56:09 1993 +0000
@@ -43,6 +43,20 @@
 (defvar texinfo-node-names)
 (defvar texinfo-enclosure-list)
 
+(defvar texinfo-command-start)
+(defvar texinfo-command-end)
+(defvar texinfo-command-name)
+(defvar texinfo-defun-type)
+(defvar texinfo-last-node-pos)
+(defvar texinfo-stack)
+(defvar texinfo-short-index-cmds-alist)
+(defvar texinfo-short-index-format-cmds-alist)
+(defvar texinfo-format-filename)
+(defvar texinfo-footnote-number)
+(defvar texinfo-start-of-header)
+(defvar texinfo-end-of-header)
+(defvar texinfo-raisesections-alist)
+(defvar texinfo-lowersections-alist)
 
 ;;; Syntax table
 
@@ -678,9 +692,9 @@
 
 (defun texinfo-format-begin-end (prop)
   (setq texinfo-command-name (intern (texinfo-parse-line-arg)))
-  (setq cmd (get texinfo-command-name prop))
-  (if cmd (funcall cmd)
-    (texinfo-unsupported)))
+  (let ((cmd (get texinfo-command-name prop)))
+    (if cmd (funcall cmd)
+      (texinfo-unsupported))))
 
 ;;; Parsing functions
 
@@ -2190,7 +2204,7 @@
 
 (defun texinfo-format-defun-1 (first-p)
   (let ((parse-args (texinfo-format-parse-defun-args))
-        (command-type (get texinfo-command-name 'texinfo-defun-type)))
+        (texinfo-defun-type (get texinfo-command-name 'texinfo-defun-type)))
     (texinfo-discard-command)
     ;; Delete extra newline inserted after previous header line.
     (if (not first-p)
@@ -2226,7 +2240,7 @@
     (while args
       (insert " "
               (if (or (= ?& (aref (car args) 0))
-                      (eq (eval (car command-type)) 'deftp-type))
+                      (eq (eval (car texinfo-defun-type)) 'deftp-type))
                   (car args)
                 (upcase (car args))))
       (setq args (cdr args)))))
@@ -2257,8 +2271,8 @@
   ;; @defun name args           In Info, `Function: Name ARGS'
   ;; @defmac name args          In Info, `Macro: Name ARGS'
   ;; @defvar name               In Info, `Variable: Name'
-  ;; Use cdr of command-type to determine category:
-  (let ((category (car (cdr command-type)))
+  ;; Use cdr of texinfo-defun-type to determine category:
+  (let ((category (car (cdr texinfo-defun-type)))
         (name (car parsed-args))
         (args (cdr parsed-args)))
     (insert " -- " category ": " name)
@@ -2304,8 +2318,8 @@
   ;; @deftypevar data-type name 
   ;;     In Info, `Variable:  data-type name'
   ;; Note: args in lower case, unless modified in command line.
-  ;; Use cdr of command-type to determine category:
-  (let ((category (car (cdr command-type)))
+  ;; Use cdr of texinfo-defun-type to determine category:
+  (let ((category (car (cdr texinfo-defun-type)))
         (data-type (car parsed-args))
         (name (car (cdr  parsed-args)))
         (args (cdr (cdr parsed-args))))
@@ -2356,8 +2370,8 @@
   ;; @defmethod class name args... 
   ;;     In Info, `Method on class: name ARGS'
   ;; Note: args in upper case; use of `on'
-  ;; Use cdr of command-type to determine category:
-  (let ((category (car (cdr command-type)))
+  ;; Use cdr of texinfo-defun-type to determine category:
+  (let ((category (car (cdr texinfo-defun-type)))
         (class (car parsed-args))
         (name (car (cdr  parsed-args)))
         (args (cdr  (cdr parsed-args))))
@@ -2374,8 +2388,8 @@
   ;; @defivar class name
   ;;     In Info, `Instance variable of class: name'
   ;; Note: args in upper case; use of `of'
-  ;; Use cdr of command-type to determine category:
-  (let ((category (car (cdr command-type)))
+  ;; Use cdr of texinfo-defun-type to determine category:
+  (let ((category (car (cdr texinfo-defun-type)))
         (class (car parsed-args))
         (name (car (cdr  parsed-args)))
         (args (cdr  (cdr parsed-args))))