aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Love2000-06-01 18:27:31 +0000
committerDave Love2000-06-01 18:27:31 +0000
commitd16296bbaa54549a09d6d2602fbdbbbbd48e8244 (patch)
tree74ccb7ea12dca3932ae1061f88f5aa2cf20427df
parent3a850efae691370fb750bbc59027081822a323ca (diff)
downloademacs-d16296bbaa54549a09d6d2602fbdbbbbd48e8244.tar.gz
emacs-d16296bbaa54549a09d6d2602fbdbbbbd48e8244.zip
(describe-function-1): Distinguish special form from
builtin function. Sanity-check presence of arglist for builtins.
-rw-r--r--lisp/help.el35
1 files changed, 21 insertions, 14 deletions
diff --git a/lisp/help.el b/lisp/help.el
index e45061536ae..c683071ef5b 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -621,7 +621,9 @@ It can also be nil, if the definition is not associated with any file."
621 (vectorp def)) 621 (vectorp def))
622 "a keyboard macro") 622 "a keyboard macro")
623 ((subrp def) 623 ((subrp def)
624 (concat beg "built-in function")) 624 (if (eq 'unevalled (cdr (subr-arity def)))
625 (concat beg "special form")
626 (concat beg "built-in function")))
625 ((byte-code-function-p def) 627 ((byte-code-function-p def)
626 (concat beg "compiled Lisp function")) 628 (concat beg "compiled Lisp function"))
627 ((symbolp def) 629 ((symbolp def)
@@ -716,19 +718,24 @@ It can also be nil, if the definition is not associated with any file."
716 (if doc 718 (if doc
717 (progn (terpri) 719 (progn (terpri)
718 (princ doc) 720 (princ doc)
719 (with-current-buffer standard-output 721 (if (subrp (symbol-function function))
720 (beginning-of-line) 722 (with-current-buffer standard-output
721 ;; Builtins get the calling sequence at the end of 723 (beginning-of-line)
722 ;; the doc string. Move it to the same place as 724 ;; Builtins get the calling sequence at the end of
723 ;; for other functions. 725 ;; the doc string. Move it to the same place as
724 (when (looking-at (format "(%S[ )]" function)) 726 ;; for other functions.
725 (let ((start (point-marker))) 727 (if (looking-at (format "(%S[ )]" function))
726 (goto-char (point-min)) 728 (let ((start (point-marker)))
727 (forward-paragraph) 729 (goto-char (point-min))
728 (insert-buffer-substring (current-buffer) start) 730 (forward-paragraph)
729 (insert ?\n) 731 (insert-buffer-substring (current-buffer) start)
730 (delete-region (1- start) (point-max)) 732 (insert ?\n)
731 (goto-char (point-max))))) 733 (delete-region (1- start) (point-max)))
734 (goto-char (point-min))
735 (forward-paragraph)
736 (insert
737 "[Missing arglist. Please make a bug report.]\n"))
738 (goto-char (point-max))))
732 (help-setup-xref (list #'describe-function function) 739 (help-setup-xref (list #'describe-function function)
733 interactive-p)) 740 interactive-p))
734 (princ "not documented"))))) 741 (princ "not documented")))))