mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-25 07:28:20 +00:00
* lisp/help-fns.el: Minor fixes
(describe-mode--minor-modes): Don't burp on minor modes that lack a docstring. (describe-mode--minor-modes): Simplify eta-redex. (find-lisp-object-file-name): Use `autoload-file`. (help-fns--describe-function-or-command-prompt): Allow the user to insist on choosing a function even if it appears not to exist.
This commit is contained in:
parent
513c5d827d
commit
c12838c73e
@ -229,7 +229,7 @@ interactive command."
|
||||
(lambda (f) (if want-command
|
||||
(commandp f)
|
||||
(or (fboundp f) (get f 'function-documentation))))
|
||||
t nil nil
|
||||
'confirm nil nil
|
||||
(and fn (symbol-name fn)))))
|
||||
(unless (equal val "")
|
||||
(setq fn (intern val)))
|
||||
@ -424,7 +424,7 @@ If ALSO-C-SOURCE is non-nil, instead of returning `C-source',
|
||||
this function will attempt to locate the definition of OBJECT in
|
||||
the C sources, too."
|
||||
(let* ((autoloaded (autoloadp type))
|
||||
(file-name (or (and autoloaded (nth 1 type))
|
||||
(file-name (or (and autoloaded (autoload-file type))
|
||||
(symbol-file
|
||||
;; FIXME: Why do we have this weird "If TYPE is the
|
||||
;; value returned by `symbol-function' for a function
|
||||
@ -2179,8 +2179,7 @@ documentation for the major and minor modes of that buffer."
|
||||
;; Document the minor modes fully.
|
||||
(insert (buttonize
|
||||
(propertize pretty-minor-mode 'help-minor-mode mode)
|
||||
(lambda (mode)
|
||||
(describe-function mode))
|
||||
#'describe-function
|
||||
mode))
|
||||
(let ((indicator
|
||||
(format-mode-line (assq mode minor-mode-alist))))
|
||||
@ -2189,7 +2188,8 @@ documentation for the major and minor modes of that buffer."
|
||||
"no indicator"
|
||||
(format "indicator%s"
|
||||
indicator)))))
|
||||
(insert (help-split-fundoc (documentation mode) nil 'doc)))))
|
||||
(insert (or (help-split-fundoc (documentation mode) nil 'doc)
|
||||
"No docstring")))))
|
||||
(forward-line -1)
|
||||
(fill-paragraph nil)
|
||||
(forward-paragraph 1)
|
||||
|
Loading…
Reference in New Issue
Block a user