Mercurial > hg > xemacs-beta
changeset 5594:cc8ea7ed4286
Mention when compiled functions are built-in, help.el.
2011-11-09 Aidan Kehoe <kehoea@parhasard.net>
* help.el (describe-function-1):
When printing compiled functions, mention whether they're
built-in.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Wed, 09 Nov 2011 12:51:10 +0000 |
parents | 4218b56833b3 |
children | 391d809fa4e9 |
files | lisp/ChangeLog lisp/help.el |
diffstat | 2 files changed, 29 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Wed Nov 02 17:50:39 2011 +0000 +++ b/lisp/ChangeLog Wed Nov 09 12:51:10 2011 +0000 @@ -1,3 +1,9 @@ +2011-11-09 Aidan Kehoe <kehoea@parhasard.net> + + * help.el (describe-function-1): + When printing compiled functions, mention whether they're + built-in. + 2011-11-02 Aidan Kehoe <kehoea@parhasard.net> * bytecomp.el (byte-compile-lambda):
--- a/lisp/help.el Wed Nov 02 17:50:39 2011 +0000 +++ b/lisp/help.el Wed Nov 09 12:51:10 2011 +0000 @@ -1395,33 +1395,37 @@ macrop t) (setq fndef def)) (if aliases (princ aliases)) - (let ((int #'(lambda (string an-p macro-p) - (princ (format - (gettext (concat - (cond ((commandp def) - "an interactive ") - (an-p "an ") - (t "a ")) - "%s" - (cond - ((eq 'neither macro-p) - "") - (macro-p " macro") - (t " function")))) - string))))) + (labels + ((int (string an-p macro-p) + (princ (format + (gettext (concat + (cond ((commandp def) + "an interactive ") + (an-p "an ") + (t "a ")) + "%s" + (cond + ((eq 'neither macro-p) + "") + (macro-p " macro") + (t " function")))) + string)))) + (declare (inline int)) (cond ((or (stringp def) (vectorp def)) (princ "a keyboard macro.") (setq kbd-macro-p t)) ((special-operator-p fndef) - (funcall int "built-in special operator" nil 'neither)) + (int "built-in special operator" nil 'neither)) ((subrp fndef) - (funcall int "built-in" nil macrop)) + (int "built-in" nil macrop)) ((compiled-function-p fndef) - (funcall int "compiled Lisp" nil macrop)) + (int (concat (if (built-in-symbol-file function 'defun) + "built-in " + "") "compiled Lisp") nil macrop)) ((eq (car-safe fndef) 'lambda) - (funcall int "Lisp" nil macrop)) + (int "Lisp" nil macrop)) ((eq (car-safe def) 'autoload) - (funcall int "autoloaded Lisp" t (elt def 4))) + (int "autoloaded Lisp" t (elt def 4))) ((and (symbolp def) (not (fboundp def))) (princ "a symbol with a void (unbound) function definition.")) (t