aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Aspinall1999-11-12 19:29:47 +0000
committerDavid Aspinall1999-11-12 19:29:47 +0000
commit72663161833c9a5a5518e5621ccda800294b63bc (patch)
tree9e523e3fc80e728c416d15da358b1e9b3191dad8
parent62c3489c748d2a28599efd094eec79f505010a26 (diff)
Document variables before functions in case of name clash.
-rw-r--r--generic/texi-docstring-magic.el31
1 files changed, 16 insertions, 15 deletions
diff --git a/generic/texi-docstring-magic.el b/generic/texi-docstring-magic.el
index bd256a92..9301eeae 100644
--- a/generic/texi-docstring-magic.el
+++ b/generic/texi-docstring-magic.el
@@ -251,21 +251,6 @@ Markup as @code{stuff} or @lisp stuff @end lisp."
(if useropt
(setq docstring (substring docstring 1)))
(texi-docstring-magic-texi "fn" "Face" name docstring nil)))
- ((fboundp symbol)
- ;; Functions.
- ;; We don't handle macros, aliases, or compiled fns properly.
- (let*
- ((function symbol)
- (name (symbol-name function))
- (docstring (or (documentation function)
- "Not documented."))
- (def (symbol-function function))
- (argsyms (cond ((eq (car-safe def) 'lambda)
- (nth 1 def))))
- (args (mapcar 'symbol-name argsyms)))
- (if (commandp function)
- (texi-docstring-magic-texi "fn" "Command" name docstring args)
- (texi-docstring-magic-texi "un" nil name docstring args))))
((boundp symbol)
;; Variables.
(let*
@@ -283,6 +268,22 @@ Markup as @code{stuff} or @lisp stuff @end lisp."
(setq docstring (substring docstring 1)))
(texi-docstring-magic-texi
(if useropt "opt" "var") nil name docstring nil default)))
+ ((fboundp symbol)
+ ;; Functions. Functions with same name as variables are documented
+ ;; as variables.
+ ;; We don't handle macros, aliases, or compiled fns properly.
+ (let*
+ ((function symbol)
+ (name (symbol-name function))
+ (docstring (or (documentation function)
+ "Not documented."))
+ (def (symbol-function function))
+ (argsyms (cond ((eq (car-safe def) 'lambda)
+ (nth 1 def))))
+ (args (mapcar 'symbol-name argsyms)))
+ (if (commandp function)
+ (texi-docstring-magic-texi "fn" "Command" name docstring args)
+ (texi-docstring-magic-texi "un" nil name docstring args))))
(t
(error "Don't know anything about symbol %s" (symbol-name symbol)))))