* lisp/help-fns.el (help-fns-edit-variable): Extract the text
property directly at point instead of trying to determine the
variable at point and always assuming there is one. (Bug#71374)
The file etc/symbol-releases.eld now contains explicit version
information for selected symbols that our NEWS* scraper doesn't
resolve correctly.
* etc/NEWS.unknown: Remove this file, replaced with...
* etc/symbol-releases.eld: ...this new file.
* lisp/help-fns.el (help-fns--first-release-override)
(help-fns--mention-first-function-release)
(help-fns--mention-first-variable-release): New.
(help-fns--mention-first-release): Try the override information first
before scraping the NEWS* files.
* lisp/help-fns.el (help-fns--edit-variable): Remove variable
declaration, as 'string-edit' makes manually storing the
variable name unnecessary.
(help-fns-edit-variable): Use 'read-string-from-buffer' instead
of custom major mode.
(help-fns--edit-value-mode-map, help-fns--edit-value-mode)
(help-fns-edit-mode-done, help-fns-edit-mode-cancel): Remove
functionality provided by 'string-edit'.
This fixes a regression introduced in
dd38097f0b, which prevented proper
argument name highlighting in function docstrings in the output
buffer of 'describe-function'.
* lisp/help-fns.el (help-do-arg-highlight): New optional arg
that says if we're highlighting arguments in the usage string or
in the docstring. Tweak generated regex to only expect argument
name to be preceded by function name in usage string.
(help-highlight-arguments): Use new argument for usage string.
help-xref-button fails if not preceded by a valid match, so a
preceding unconditional search should not be allowed to fail
silently.
* lisp/emacs-lisp/ert.el (ert-describe-test):
* lisp/help-fns.el (help-fns--compiler-macro)
(help-fns-function-description-header, describe-variable)
(help-fns--customize-variable, describe-face)
(help-fns--face-attributes, describe-keymap): Let unconditional
re-search-backward before help-xref-button fail early, as that would
indicate a logic bug, and the backtrace would more accurately point
to the actual source of the mistake.
Instead of choosing English words to describe the kind of function,
use the actual type of the function object (from `cl-type-of`)
directly, and make it a button to display info about that type.
* lisp/help-fns.el (help-fns-function-description-header): Use the
function's type name in the description instead of "prose".
Use `insert` instead of `princ`, so as to preserve the text-properties
of the button.
* lisp/emacs-lisp/cl-extra.el (cl-help-type): Move to `help-mode.el`
and rename to `help-type`.
(cl--describe-class): Adjust accordingly.
* lisp/help-mode.el (help-type): New type, moved and renamed from
`cl-extra.el`.
Consolidate code used in profiler and help--describe-command,
and improve it while we're at it.
Also use #' to quote a few function names along the way.
* lisp/help-fns.el (help-fns--function-numbers, help-fns--function-names):
New vars.
(help-fns--display-function): New aux function.
(help-fns-function-name): New function, inspired from
`help--describe-command`.
* lisp/help.el (help--describe-command): Use `help-fns-function-name`.
(help--for-help-make-sections): Remove redundant "" arg to `mapconcat`.
* lisp/profiler.el (profiler-format-entry, profiler-fixup-entry):
Delete functions.
(profiler-report-make-entry-part): Use `help-fns-function-name` instead.
(profiler-report-find-entry): Use `push-button`.
* lisp/transient.el (transient--debug): Use `help-fns-function-name`
when available.
(describe-mode, describe-mode--minor-modes): Use 'describe-mode-outline'.
* lisp/help-mode.el (help-setup-xref): After disabling outline-minor-mode
also kill all outline-related local variables. So that they won't affect
the output of other help commands in the same help buffer.
We used to print dynamic docstrings "manually" for two reasons:
- References should look like `(#$ . POS)` but `prin1` was unable
to print just `#$` for an sexp.
- `make-docfile` needed to find those docstrings and the object
to which they belonged.
The second point is moot now that we don't use `make-docfile` on
`.elc` files. So this patch lifts the first restriction,
using `print-number-table`.
The rest of the patch then simplifies and regularises the
bytecompiler's generation of dynamic docstrings, which can
now also easily be done for "inner" defvars and other places.
* src/print.c (print_preprocess, print_object): Handle strings in
`print-number-table`.
(Vprint_number_table): Improve docstring.
* lisp/emacs-lisp/bytecomp.el:
(byte-compile--list-with-n): New function.
(byte-compile--docstring-style-warn): Rename from
`byte-compile-docstring-style-warn` and change calling convention.
(byte-compile--\#$, byte-compile--docstrings): New vars.
(byte-compile-close-variables): Bind them.
(byte-compile--docstring): New function.
(byte-compile-from-buffer): Set `byte-compile--\#$`.
(byte-compile-output-file-form): Use `byte-compile--\#$` instead
of special casing specific forms.
(byte-compile--output-docform-recurse, byte-compile-output-docform):
Delete functions.
(byte-compile-file-form-autoload, byte-compile-file-form-defalias)
(byte-compile-file-form-defvar-function, byte-compile-lambda):
Use `byte-compile--docstring` and `byte-compile--list-with-n`.
(byte-compile--declare-var): Add optional `not-toplevel` arg.
(byte-compile-defvar): Add `toplevel` arg. Use `byte-compile--docstring`.
(byte-compile-file-form-defvar): Delegate to `byte-compile-defvar`.
(byte-compile--custom-declare-face): New function. Use it for
`custom-declare-face`.
(byte-compile-file-form-defmumble): Use `byte-compile-output-file-form`
* src/doc.c (Fdocumentation_stringp): New function.
(syms_of_doc): Defsubr it.
(store_function_docstring): Remove left-over code from when we
used DOC for the docstring of some Lisp files.
* lisp/cus-face.el (custom-declare-face): Accept dynamic docstrings.
* lisp/faces.el (face-documentation): Handle dynamic docstrings.
* lisp/help-fns.el (describe-face): Simplify accordingly.
Try and avoid using the `derived-mode-parent` property directly
and use the new API functions instead.
* lisp/emacs-lisp/derived.el (define-derived-mode):
Use `derived-mode-set-parent`.
* lisp/loadhist.el (unload--set-major-mode):
* lisp/info-look.el (info-lookup-select-mode):
* lisp/ibuf-ext.el (ibuffer-list-buffer-modes):
* lisp/files.el (dir-locals--get-sort-score):
* lisp/emacs-lisp/cl-generic.el (cl--generic-derived-specializers):
Use `derived-mode-all-parents`.
* lisp/help-fns.el (help-do-arg-highlight): Fix regexp. (Bug#65580)
Avoid highlighting (parts of) the function name as arguments in the
output of 'describe-function' when the function has an argument with
the same name. To achieve this, refine the regular expression that
'help-do-arg-highlight' uses such that it doesn't match anything in
the function name.
* lisp/help-fns.el (help-fns-function-description-header):
Describe lexbound uncompiled functions as functions.
Whether they technically close over any lexical variables isn't of
interest here.
0f183770c5 Fix byte-compiled files that use 'bind-key' from use-package
acfcf7f369 Fix "Paste from Kill Menu" in non X toolkit builds
04996b2124 Handle tabs in the SQL shown in the column listing
573fcf2712 Add new keyword to 'typescript-ts-mode'
db7d70d3ca ; Add commentary to 'describe-function's completion
* lisp/help-fns.el (help-fns--analyze-function):
Add back the NOERROR argument to function-alias-p, needed because
Emacs 29 doesn't prevent the creation of circular function aliases.
This fixes a failure in help-fns-tests.
* lisp/help-fns.el (help-fns--analyze-function):
For aliases, use the base function name if at the end of the chain.
This fixes a regression introduced in d30fde6b0c.
Reported by Michael Heerdegen.
(cherry picked from commit 024bd1f090)
* lisp/help-fns.el (help-fns--analyze-function):
For aliases, use the base function name if at the end of the chain.
This fixes a regression introduced in d30fde6b0c.
Reported by Michael Heerdegen.
* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Improve comment.
(comp-funciton-type-spec): New function.
* lisp/help-fns.el (help-fns--signature): Update to make use of
`comp-funciton-type-spec'.
3899acbb33 ; * src/fringe.c: Fix description of large circle. (Bug#...
2b10e1827d sql: add missing postgresql types
9ac1259278 Fix display of menu-bar bindings of commands in *Help* bu...
ecdd3a9efa Improve Completion Example section in the Emacs manual
626e1ac62b Improve 'message-server-alist' docstring
327986936c Add index entry for fallback modes
1c4783c330 ; * etc/NEWS: Copyedits and grammar fixes.
3d6f755331 xref-search-program-alist: Fix searching larger file list...
1b8b2cf61b Fix typo and inaccuracy in the ELisp Reference manual
df17682ebf ; Support 'dart-ts-mode' in Eglot
e0dc60e078 ; Fix typos in gdb-mi.el
60560cc7ad Fix description of lexical environment's internals
1456adf424 ; Eglot: fix a typo in a customization type
2f59595f5f ; * etc/NEWS: Grammar fixes.
596b780ab7 Update to Org 9.6.4-2-g0f6ae7
a0b04a2247 Documentation copyedits for 'package-install-upgrade-buil...
580d8278c5 Allow upgrading built-in packages with 'package-install'
329304c23f ; * src/term.c (init_tty): Fix last change. (Bug#62877)
200dbf7d30 Minor changes in c-ts-mode.el's support of DEFUNs
9686b015a0 Fix strike-through attribute support on TTY frames
39035fbfc5 Avoid crashes in 'describe-keymap' due to shadowing
# Conflicts:
# etc/NEWS
# lisp/progmodes/c-ts-mode.el
# lisp/progmodes/eglot.el
* lisp/help-fns.el (help-fns--insert-menu-bindings): Propertize
with 'help-key-binding' face only the menu items, not the arrows
between successive items. This is because 'char-displayable-p' is
unreliable when we propertize the character with an arbitrary
face: that face could specify a font which doesn't support the
character after all, while 'char-displayable-p' assumes there are
no restrictions on fonts that can be used for displaying the
character. Also, make the code more efficient by avoiding the
call to 'char-displayable-p' inside the loop.
To fix bug#62300, we do the same for `...' as we already did for \[...]
* help-fns.el (describe-function-1): Look for `...' references in
addition to key substitution markup.
* lisp/emacs-lisp/bytecomp.el (byte-compile-form):
* lisp/help-fns.el (help-fns--interactive-only): Fix obvious mistake.
Since `interactive-only` is not supposed to be anything other than
a symbol at these points it was not a very consequential bug.
Make `interactive-only` declarations apply to aliases of the same
function as well since this quality isn't in the name but in what
the function does.
* lisp/emacs-lisp/bytecomp.el (byte-compile-form):
* lisp/help-fns.el (help-fns--interactive-only):
Follow aliases when retrieving the `interactive-only` property.
Make `fset` and `defalias` signal an error on attempts to create
circular alias chains. This is more effective, efficient and
convenient than permitting alias loops to be created and trying to
detect them at run time each time a function is called, which is what
we have been doing until now, badly.
* lisp/help-fns.el (help-fns--analyze-function):
Don't pass obsolete argument.
* lisp/subr.el (function-alias-p):
* src/data.c (indirect_function, Findirect_function): Simplify.
Now error-free, second argument obsolete.
(Ffset): Detect loops.
* test/lisp/help-fns-tests.el (help-fns--analyze-function-recursive):
* test/lisp/subr-tests.el (test-alias-p):
Adapt tests.
* test/src/data-tests.el (data-tests-fset, data-tests-defalias): New.
* doc/lispref/eval.texi (Function Indirection):
* doc/lispref/functions.texi (Defining Functions, Function Cells):
Update manual.
* etc/NEWS: Announce.
cae528457c ; Add 2023 to copyright years.
b394359261 Improve documentation of 'isearch-open-overlay-temporary'
ab3210e709 Document 'use-package' in the 2 main manuals
# Conflicts:
# etc/refcards/ru-refcard.tex
# lib/explicit_bzero.c
# m4/explicit_bzero.m4