Mercurial > hg > xemacs-beta
diff lisp/help.el @ 4595:a1a8728fec10
Distinguish between special forms and subrs, #'describe-function-1.
lisp/ChangeLog addition:
2009-02-04 Aidan Kehoe <kehoea@parhasard.net>
* help.el (describe-function-1):
Distinguish between special forms and subrs; don't bind
autoload-file, #'symbol-file returns it like any other function
file name.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Wed, 04 Feb 2009 11:38:25 +0000 |
parents | 69a1eda3da06 |
children | 7c7262c47538 |
line wrap: on
line diff
--- a/lisp/help.el Mon Feb 02 23:31:09 2009 +0900 +++ b/lisp/help.el Wed Feb 04 11:38:25 2009 +0000 @@ -1371,7 +1371,7 @@ (princ function) (princ "' is ") (let* ((def function) - aliases file-name autoload-file kbd-macro-p fndef macrop) + aliases file-name kbd-macro-p fndef macrop) (while (and (symbolp def) (fboundp def)) (when (not (eq def function)) (setq aliases @@ -1403,11 +1403,17 @@ (an-p "an ") (t "a ")) "%s" - (if macro-p " macro" " function"))) + (cond + ((eq 'neither macro-p) + "") + (macrop " macro") + (t " function")))) string))))) (cond ((or (stringp def) (vectorp def)) (princ "a keyboard macro.") (setq kbd-macro-p t)) + ((special-form-p fndef) + (funcall int "built-in special form" nil 'neither)) ((subrp fndef) (funcall int "built-in" nil macrop)) ((compiled-function-p fndef) @@ -1417,7 +1423,6 @@ ((eq (car-safe fndef) 'mocklisp) (funcall int "mocklisp" nil macrop)) ((eq (car-safe def) 'autoload) - (setq autoload-file (elt def 1)) (funcall int "autoloaded Lisp" t (elt def 4))) ((and (symbolp def) (not (fboundp def))) (princ "a symbol with a void (unbound) function definition."))