Mercurial > hg > xemacs-beta
comparison 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 |
comparison
equal
deleted
inserted
replaced
4594:2986723ac32d | 4595:a1a8728fec10 |
---|---|
1369 (princ "`") | 1369 (princ "`") |
1370 ;; (Help-princ-face function 'font-lock-function-name-face) overkill | 1370 ;; (Help-princ-face function 'font-lock-function-name-face) overkill |
1371 (princ function) | 1371 (princ function) |
1372 (princ "' is ") | 1372 (princ "' is ") |
1373 (let* ((def function) | 1373 (let* ((def function) |
1374 aliases file-name autoload-file kbd-macro-p fndef macrop) | 1374 aliases file-name kbd-macro-p fndef macrop) |
1375 (while (and (symbolp def) (fboundp def)) | 1375 (while (and (symbolp def) (fboundp def)) |
1376 (when (not (eq def function)) | 1376 (when (not (eq def function)) |
1377 (setq aliases | 1377 (setq aliases |
1378 (if aliases | 1378 (if aliases |
1379 ;; I18N3 Need gettext due to concat | 1379 ;; I18N3 Need gettext due to concat |
1401 (cond ((commandp def) | 1401 (cond ((commandp def) |
1402 "an interactive ") | 1402 "an interactive ") |
1403 (an-p "an ") | 1403 (an-p "an ") |
1404 (t "a ")) | 1404 (t "a ")) |
1405 "%s" | 1405 "%s" |
1406 (if macro-p " macro" " function"))) | 1406 (cond |
1407 ((eq 'neither macro-p) | |
1408 "") | |
1409 (macrop " macro") | |
1410 (t " function")))) | |
1407 string))))) | 1411 string))))) |
1408 (cond ((or (stringp def) (vectorp def)) | 1412 (cond ((or (stringp def) (vectorp def)) |
1409 (princ "a keyboard macro.") | 1413 (princ "a keyboard macro.") |
1410 (setq kbd-macro-p t)) | 1414 (setq kbd-macro-p t)) |
1415 ((special-form-p fndef) | |
1416 (funcall int "built-in special form" nil 'neither)) | |
1411 ((subrp fndef) | 1417 ((subrp fndef) |
1412 (funcall int "built-in" nil macrop)) | 1418 (funcall int "built-in" nil macrop)) |
1413 ((compiled-function-p fndef) | 1419 ((compiled-function-p fndef) |
1414 (funcall int "compiled Lisp" nil macrop)) | 1420 (funcall int "compiled Lisp" nil macrop)) |
1415 ((eq (car-safe fndef) 'lambda) | 1421 ((eq (car-safe fndef) 'lambda) |
1416 (funcall int "Lisp" nil macrop)) | 1422 (funcall int "Lisp" nil macrop)) |
1417 ((eq (car-safe fndef) 'mocklisp) | 1423 ((eq (car-safe fndef) 'mocklisp) |
1418 (funcall int "mocklisp" nil macrop)) | 1424 (funcall int "mocklisp" nil macrop)) |
1419 ((eq (car-safe def) 'autoload) | 1425 ((eq (car-safe def) 'autoload) |
1420 (setq autoload-file (elt def 1)) | |
1421 (funcall int "autoloaded Lisp" t (elt def 4))) | 1426 (funcall int "autoloaded Lisp" t (elt def 4))) |
1422 ((and (symbolp def) (not (fboundp def))) | 1427 ((and (symbolp def) (not (fboundp def))) |
1423 (princ "a symbol with a void (unbound) function definition.")) | 1428 (princ "a symbol with a void (unbound) function definition.")) |
1424 (t | 1429 (t |
1425 nil))) | 1430 nil))) |