aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-10-21 17:56:09 +0000
committerRichard M. Stallman1993-10-21 17:56:09 +0000
commit64c8498a8dc3f029e651ec7b426ca687078c11c3 (patch)
treeb185b3e023648f53fd0d9b7df7174a9da1cfdf92
parent891f0daae1904635e7004c749c876ab949e1a113 (diff)
downloademacs-64c8498a8dc3f029e651ec7b426ca687078c11c3.tar.gz
emacs-64c8498a8dc3f029e651ec7b426ca687078c11c3.zip
(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.
-rw-r--r--lisp/textmodes/texinfmt.el40
1 files changed, 27 insertions, 13 deletions
diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el
index 52eda4a95cc..b1992d7ca3e 100644
--- a/lisp/textmodes/texinfmt.el
+++ b/lisp/textmodes/texinfmt.el
@@ -43,6 +43,20 @@
43(defvar texinfo-node-names) 43(defvar texinfo-node-names)
44(defvar texinfo-enclosure-list) 44(defvar texinfo-enclosure-list)
45 45
46(defvar texinfo-command-start)
47(defvar texinfo-command-end)
48(defvar texinfo-command-name)
49(defvar texinfo-defun-type)
50(defvar texinfo-last-node-pos)
51(defvar texinfo-stack)
52(defvar texinfo-short-index-cmds-alist)
53(defvar texinfo-short-index-format-cmds-alist)
54(defvar texinfo-format-filename)
55(defvar texinfo-footnote-number)
56(defvar texinfo-start-of-header)
57(defvar texinfo-end-of-header)
58(defvar texinfo-raisesections-alist)
59(defvar texinfo-lowersections-alist)
46 60
47;;; Syntax table 61;;; Syntax table
48 62
@@ -678,9 +692,9 @@ lower types.")
678 692
679(defun texinfo-format-begin-end (prop) 693(defun texinfo-format-begin-end (prop)
680 (setq texinfo-command-name (intern (texinfo-parse-line-arg))) 694 (setq texinfo-command-name (intern (texinfo-parse-line-arg)))
681 (setq cmd (get texinfo-command-name prop)) 695 (let ((cmd (get texinfo-command-name prop)))
682 (if cmd (funcall cmd) 696 (if cmd (funcall cmd)
683 (texinfo-unsupported))) 697 (texinfo-unsupported))))
684 698
685;;; Parsing functions 699;;; Parsing functions
686 700
@@ -2190,7 +2204,7 @@ Default is to leave paragraph indentation as is."
2190 2204
2191(defun texinfo-format-defun-1 (first-p) 2205(defun texinfo-format-defun-1 (first-p)
2192 (let ((parse-args (texinfo-format-parse-defun-args)) 2206 (let ((parse-args (texinfo-format-parse-defun-args))
2193 (command-type (get texinfo-command-name 'texinfo-defun-type))) 2207 (texinfo-defun-type (get texinfo-command-name 'texinfo-defun-type)))
2194 (texinfo-discard-command) 2208 (texinfo-discard-command)
2195 ;; Delete extra newline inserted after previous header line. 2209 ;; Delete extra newline inserted after previous header line.
2196 (if (not first-p) 2210 (if (not first-p)
@@ -2226,7 +2240,7 @@ Default is to leave paragraph indentation as is."
2226 (while args 2240 (while args
2227 (insert " " 2241 (insert " "
2228 (if (or (= ?& (aref (car args) 0)) 2242 (if (or (= ?& (aref (car args) 0))
2229 (eq (eval (car command-type)) 'deftp-type)) 2243 (eq (eval (car texinfo-defun-type)) 'deftp-type))
2230 (car args) 2244 (car args)
2231 (upcase (car args)))) 2245 (upcase (car args))))
2232 (setq args (cdr args))))) 2246 (setq args (cdr args)))))
@@ -2257,8 +2271,8 @@ Default is to leave paragraph indentation as is."
2257 ;; @defun name args In Info, `Function: Name ARGS' 2271 ;; @defun name args In Info, `Function: Name ARGS'
2258 ;; @defmac name args In Info, `Macro: Name ARGS' 2272 ;; @defmac name args In Info, `Macro: Name ARGS'
2259 ;; @defvar name In Info, `Variable: Name' 2273 ;; @defvar name In Info, `Variable: Name'
2260 ;; Use cdr of command-type to determine category: 2274 ;; Use cdr of texinfo-defun-type to determine category:
2261 (let ((category (car (cdr command-type))) 2275 (let ((category (car (cdr texinfo-defun-type)))
2262 (name (car parsed-args)) 2276 (name (car parsed-args))
2263 (args (cdr parsed-args))) 2277 (args (cdr parsed-args)))
2264 (insert " -- " category ": " name) 2278 (insert " -- " category ": " name)
@@ -2304,8 +2318,8 @@ Default is to leave paragraph indentation as is."
2304 ;; @deftypevar data-type name 2318 ;; @deftypevar data-type name
2305 ;; In Info, `Variable: data-type name' 2319 ;; In Info, `Variable: data-type name'
2306 ;; Note: args in lower case, unless modified in command line. 2320 ;; Note: args in lower case, unless modified in command line.
2307 ;; Use cdr of command-type to determine category: 2321 ;; Use cdr of texinfo-defun-type to determine category:
2308 (let ((category (car (cdr command-type))) 2322 (let ((category (car (cdr texinfo-defun-type)))
2309 (data-type (car parsed-args)) 2323 (data-type (car parsed-args))
2310 (name (car (cdr parsed-args))) 2324 (name (car (cdr parsed-args)))
2311 (args (cdr (cdr parsed-args)))) 2325 (args (cdr (cdr parsed-args))))
@@ -2356,8 +2370,8 @@ Default is to leave paragraph indentation as is."
2356 ;; @defmethod class name args... 2370 ;; @defmethod class name args...
2357 ;; In Info, `Method on class: name ARGS' 2371 ;; In Info, `Method on class: name ARGS'
2358 ;; Note: args in upper case; use of `on' 2372 ;; Note: args in upper case; use of `on'
2359 ;; Use cdr of command-type to determine category: 2373 ;; Use cdr of texinfo-defun-type to determine category:
2360 (let ((category (car (cdr command-type))) 2374 (let ((category (car (cdr texinfo-defun-type)))
2361 (class (car parsed-args)) 2375 (class (car parsed-args))
2362 (name (car (cdr parsed-args))) 2376 (name (car (cdr parsed-args)))
2363 (args (cdr (cdr parsed-args)))) 2377 (args (cdr (cdr parsed-args))))
@@ -2374,8 +2388,8 @@ Default is to leave paragraph indentation as is."
2374 ;; @defivar class name 2388 ;; @defivar class name
2375 ;; In Info, `Instance variable of class: name' 2389 ;; In Info, `Instance variable of class: name'
2376 ;; Note: args in upper case; use of `of' 2390 ;; Note: args in upper case; use of `of'
2377 ;; Use cdr of command-type to determine category: 2391 ;; Use cdr of texinfo-defun-type to determine category:
2378 (let ((category (car (cdr command-type))) 2392 (let ((category (car (cdr texinfo-defun-type)))
2379 (class (car parsed-args)) 2393 (class (car parsed-args))
2380 (name (car (cdr parsed-args))) 2394 (name (car (cdr parsed-args)))
2381 (args (cdr (cdr parsed-args)))) 2395 (args (cdr (cdr parsed-args))))