* lisp/help-fns.el (describe-variable): Store the type.
* lisp/help-mode.el (help-view-source): Use the type. This fixes
the problem when looking for a variable defined in a C file.
* lisp/help-fns.el (describe-symbol): Use it.
* lisp/help.el (describe-key): Use it.
* lisp/simple.el (separator-line): New face.
(make-separator-line): New function (bug#49630).
* lisp/help-fns.el (help-fns--list-local-commands): Speed up (bug#49579).
A predicate checks if there are no key bindings for a given function. A
full list of bindings is not needed, even a single binding is sufficient
to say the function is bound. Set FIRSTONLY arg in where-is-internal so
this predicate runs faster, with functional equivalence. For some
configurations this has a noticeable improvement on the speed of
describe-mode.
Copyright-paperwork-exempt: yes
* lisp/emacs-lisp/shortdoc.el (shortdoc-display-group): Allow
taking an optional parameter to place point on a specific function.
(shortdoc--display-function): Go to the function in question in
the shortdoc buffer.
Since Emacs Lisp is more than Lisp-2, separately output letters
for each namespace: functions, variables, faces, classes.
Use non-letter characters for additional properties
such as advice, obsolete, local.
(help--symbol-completion-table-affixation): Use format "%-4s".
https://lists.gnu.org/archive/html/emacs-devel/2021-06/msg00524.html
* lisp/help-fns.el (describe-command): New command.
(help-fns--describe-function-or-command-prompt): New helper
function to prompt for a function or function. (Bug#46627)
(describe-function): Use above new helper function.
* lisp/help.el (help-map): Bind above new command to `C-h x'.
(help-for-help): Add this new command to the help summary.
* lisp/menu-bar.el (menu-bar-describe-menu): Add the new command to
the help menu.
* doc/emacs/help.texi (Help Summary, Name Help): Document
'describe-command', and update documentation on 'describe-function'.
* etc/tutorials/TUTORIAL: Change reference from 'describe-function' to
'describe-command'.
* lisp/faces.el (help-key-binding): New face.
* lisp/help.el
(help-for-help): Rename from 'help-for-help-internal'. Use
'substitute-command-keys' syntax.
(help): Make into alias for 'help-for-help'.
(help-for-help-internal): Make into obsolete alias for
'help-for-help'.
(help--key-description-fontified): New function to add the
'help-key-binding' face.
(help-key-description, substitute-command-keys)
(describe-map-tree, help--describe-command)
(help--describe-translation, describe-map):
* lisp/help-fns.el (help-fns--key-bindings, describe-mode):
Use above new function.
* lisp/isearch.el (isearch-help-for-help-internal): Use
`substitute-command-keys' syntax.
* lisp/help-macro.el (make-help-screen): Use
'substitute-command-keys' and 'help--key-description-fontified'.
Simplify.
* src/keymap.c (describe_key_maybe_fontify): New function to add
the 'help-key-binding' face to keybindings.
(describe_vector): Use above new keybinding.
(syms_of_keymap) <Qfont_lock_face, Qhelp_key_binding>: New
DEFSYMs.
(fontify_key_properties): New static variable.
* lisp/tooltip.el (tooltip-show): Avoid overriding faces in
specified tooltip text.
* test/lisp/help-tests.el (with-substitute-command-keys-test):
Don't test for text properties.
(help-tests-substitute-command-keys/add-key-face)
(help-tests-substitute-command-keys/add-key-face-listing):
New tests.
* lisp/help-fns.el (help-fns--first-release): Restrict the version
guesser to top-level section -- looking in all headings leads to
false positives (bug#46889).
* lisp/help-fns.el (describe-variable): Remove the
"Documentation:" line (bug#46702). This makes the help text more
compact and seems easier to read, too.
* lisp/help-fns.el (describe-variable): Add a newline for better
readability (bug#46702). This also has the side effect of
buttonizing `function-references-like-this' in the "Its value is"
part.
* lisp/help-mode.el (help-make-xrefs): Adjust comments.
* lisp/help-fns.el (help-fns--signature): Don't ask the user to
make a bug report (bug#30223) because the symbol may very well be
one that the user has defined themselves.
(help-fns-function-description-header): Ditto.
* lisp/help-fns.el (keymap-name-history): Define the history
variable (bug#45879). This avoids problems in other completing
systems like Helm.
Copyright-paperwork-exempt: yes
* lisp/emacs-lisp/shortdoc.el (shortdoc--display-function): Use
describe-function as a fallback link when a function is not documented
in any Info manual. Also make the link respond to mouse-1, like the
rest of *Help* links, and add a proper help-echo property.
* lisp/help-fns.el (help-fns--mention-shortdoc-groups): Same link
improvement as described before, this time for the shortdoc groups
(bug#45750).
These were found by relint 1.19.
* lisp/help-fns.el (help-fns--first-release): Use string-end instead
of line-end when matching a file name.
* lisp/org/ob-core.el (org-babel--string-to-number): Put hyphen last
in alternative.
* lisp/org/org-agenda.el (org-agenda-filter): Escape '+' correctly.
* doc/lispref/minibuf.texi (Completion Variables)
(Programmed Completion): Add affixation-function.
* lisp/help-fns.el (help--symbol-completion-table-affixation): New function.
(help--symbol-completion-table): Set affixation-function when
completions-detailed is non-nil.
* lisp/minibuffer.el (completion-metadata): Add affixation-function
to docstring.
(completions-annotations): Inherit from shadow with italic.
(completions-detailed): New defcustom.
(completion--insert-strings): Count string-width on all strings in
completion list. Insert prefix and suffix.
(completion-extra-properties): Add affixation-function to docstring.
(minibuffer-completion-help): Call affixation-function.
(minibuffer-default-prompt-format): Move down closer to its use.
https://lists.gnu.org/archive/html/emacs-devel/2020-11/msg00613.html
* doc/lispref/help.texi (Documentation Groups): Document it.
* lisp/help-fns.el (help-fns--mention-shortdoc-groups): Output
references to the shortdocs.
* lisp/emacs-lisp/shortdoc.el: New file.
* lisp/emacs-lisp/autoload.el (update-directory-autoloads):
.eln files have been moved so remove the '.eln' match.
* lisp/emacs-lisp/bytecomp.el (byte-compile-refresh-preloaded):
Likewise.
* lisp/emacs-lisp/find-func.el (find-library-suffixes): Clean-up
as '.eln' is no more in `load-suffixes'.
* lisp/help-fns.el (find-lisp-object-file-name): Clean-up as
`symbol-file' will return the '.elc' file.
* src/lread.c (Fget_load_suffixes): Remove logic as '.eln' is not
anymore in load-suffixes.
(openp): Two spaces.
This reverts commit de4f347901.
read-file-name already displays a long path when given a default
(like INITIAL in many other prompting functions), so using
format-prompt here is superfluous.