1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-22 07:09:54 +00:00
Commit Graph

566 Commits

Author SHA1 Message Date
Philip Kaludercic
d277123f4b
; Improve robustness of 'help-fns-edit-variable'
* 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)
2024-09-02 22:55:32 +02:00
Mattias Engdegård
59e0b82776 Better ad-hoc Emacs release of symbol introduction override
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.
2024-08-31 18:46:36 +02:00
Po Lu
a268496727 Merge from savannah/emacs-30
3419e7ea52 Correct Android failure to open an old CJK font
45ae4de0e7 * lisp/help-fns.el (help-definition-prefixes): Don't dele...
fc7581ae2e ; Fix documentation of secure-hash functions
21be5cadaf ; * lisp/subr.el (sha1): Fix typo in docstring.
8715619d48 ; * etc/NEWS: Fix wording of last change.
023d387a7b Update to Org 9.7.10
b54e8b3741 ; * etc/NEWS: Announce 'shr-fill-text'.
acfd91bc0c ; * lisp/emacs-lisp/compat.el: Fix header style.
55337dc36a * test/infra/gitlab-ci.yml (.tree-sitter-template): Adapt...
d8e9eb73c2 Bump use-package version for Emacs 30.1
4d9d3fec1b * Makefile.in (CHANGELOG_HISTORY_INDEX_MAX): Bump.
502285e84a ; * admin/make-tarball.txt: Some clarifications.
2024-08-20 21:57:25 +08:00
Stefan Monnier
45ae4de0e7 * lisp/help-fns.el (help-definition-prefixes): Don't delete the hashtable
Fixes bug#72511.
2024-08-20 08:09:54 -04:00
Philip Kaludercic
d50c82f3e9
Simplify 'help-enable-variable-value-editing' using 'string-edit'
* 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'.
2024-07-28 13:59:38 +02:00
Andrea Corallo
c04eccd667 Add 'help-find-source' and bind it to C-h 4 s
* lisp/help-fns.el (help-find-source): New function.
* lisp/help.el (help-map): Bind 'help-find-source' to C-h z.
(help-for-help): Add 'help-find-source'.
2024-05-29 16:34:51 +02:00
Stefan Monnier
fde8dc9287 Redirect calls to subr-native-elisp-p to native-comp-function-p
* test/src/comp-tests.el (comp-tests-bootstrap, lambda-return)
(lambda-return2, free-fun, free-fun2, free-fun-silly-name, speed--1)
(compile-forms, comp-test-defsubst, primitive-redefine-compile-44221)
(48029-1, 61917-1, tco, fw-prop-1, pure):
* test/lisp/help-fns-tests.el (help-fns-test-lisp-defun):
* lisp/subr.el (subr-primitive-p, primitive-function-p, symbol-file):
* lisp/help-fns.el (find-lisp-object-file-name):
* lisp/emacs-lisp/disass.el (disassemble-internal):
* lisp/emacs-lisp/comp.el (comp--call-optim-form-call):
* lisp/emacs-lisp/comp-run.el (comp-warn-primitives):
* lisp/emacs-lisp/comp-common.el (comp-function-type-spec):
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns):
* lisp/emacs-lisp/bytecomp.el (<trailer>): Rename `subr-native-elisp-p`
to `native-comp-function-p`.
2024-05-28 20:53:25 -04:00
Eshel Yaron
9d3fb195af
Fix argument name highlighting in 'describe-function' output
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.
2024-05-23 22:14:14 +02:00
Andrea Corallo
da8b06bd61 Merge branch 'lisp-func-type-decls' into 'master' 2024-05-02 17:06:07 +02:00
Basil L. Contovounesios
65fa47e3fa Assume match before calling help-xref-button
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.
2024-05-01 12:38:51 +02:00
Andrea Corallo
d8c941df7d Make use of Lisp function declarations
* lisp/emacs-lisp/comp.el (comp-primitive-func-cstr-h): Rename.
(comp--get-function-cstr): Define new function.
(comp--add-call-cstr, comp--fwprop-call): Update.
* lisp/emacs-lisp/comp-common.el (comp-function-type-spec): Update.
* lisp/help-fns.el (help-fns--signature): Mention when a type is
declared.
* lisp/emacs-lisp/comp.el (comp-primitive-func-cstr-h): Rename.
2024-04-29 19:27:23 +02:00
Stefan Monnier
0286a11f31 (help-fns-function-description-header): Fix last change (bug#70209)
* lisp/help-fns.el (help-fns-function-description-header): Don't make
a button for the type if it's not a type.
2024-04-05 18:29:16 -04:00
Stefan Monnier
200a0e5e7d * lisp/help-fns.el (help-fns-function-description-header): Fix bug#70209
Replace the whimsical "" default by something actually useful.
2024-04-05 07:41:42 -04:00
Stefan Monnier
accd79c939 (help-fns-function-description-header): Print functions' type
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`.
2024-03-22 08:47:13 -04:00
Eli Zaretskii
c1530a2e49 ; * lisp/help-fns.el (help-fns-function-name): Doc fix. 2024-03-22 09:54:37 +02:00
Stefan Monnier
a1f8702e83 (help-fns-function-name): New function
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.
2024-03-21 19:40:20 -04:00
Juri Linkov
cc58626f64 * lisp/help-fns.el (describe-mode-outline): New user option (bug#64684).
(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.
2024-02-22 19:38:17 +02:00
Stefan Monnier
e9a668274e bytecomp.el: Rewrite the way we print dynamic docstrings
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.
2024-02-02 13:07:53 -05:00
Stefan Monnier
27ff4d9c49 * lisp/help-fns.el (help-fns--parent-mode): Mention the extra parents
As suggested by Stefan Kangas in bug#68246.
2024-01-15 19:00:50 -05:00
Po Lu
ecf08f0621 Merge from savannah/emacs-29
dc4e6b1329 ; Update copyright years in more files
64b3777631 ; Run set-copyright from admin.el
8e1c56ae46 ; Add 2024 to copyright years

# Conflicts:
#	doc/misc/modus-themes.org
#	doc/misc/texinfo.tex
#	etc/NEWS
#	etc/refcards/ru-refcard.tex
#	etc/themes/modus-operandi-theme.el
#	etc/themes/modus-themes.el
#	etc/themes/modus-vivendi-theme.el
#	lib/alloca.in.h
#	lib/binary-io.h
#	lib/c-ctype.h
#	lib/c-strcasecmp.c
#	lib/c-strncasecmp.c
#	lib/careadlinkat.c
#	lib/cloexec.c
#	lib/close-stream.c
#	lib/diffseq.h
#	lib/dup2.c
#	lib/filemode.h
#	lib/fpending.c
#	lib/fpending.h
#	lib/fsusage.c
#	lib/getgroups.c
#	lib/getloadavg.c
#	lib/gettext.h
#	lib/gettime.c
#	lib/gettimeofday.c
#	lib/group-member.c
#	lib/malloc.c
#	lib/md5-stream.c
#	lib/md5.c
#	lib/md5.h
#	lib/memmem.c
#	lib/memrchr.c
#	lib/nanosleep.c
#	lib/save-cwd.h
#	lib/sha1.c
#	lib/sig2str.c
#	lib/stdlib.in.h
#	lib/strtoimax.c
#	lib/strtol.c
#	lib/strtoll.c
#	lib/time_r.c
#	lib/xalloc-oversized.h
#	lisp/auth-source-pass.el
#	lisp/emacs-lisp/lisp-mnt.el
#	lisp/emacs-lisp/timer.el
#	lisp/info-look.el
#	lisp/jit-lock.el
#	lisp/loadhist.el
#	lisp/mail/rmail.el
#	lisp/net/ntlm.el
#	lisp/net/webjump.el
#	lisp/progmodes/asm-mode.el
#	lisp/progmodes/project.el
#	lisp/progmodes/sh-script.el
#	lisp/textmodes/flyspell.el
#	lisp/textmodes/reftex-toc.el
#	lisp/textmodes/reftex.el
#	lisp/textmodes/tex-mode.el
#	lisp/url/url-gw.el
#	m4/alloca.m4
#	m4/clock_time.m4
#	m4/d-type.m4
#	m4/dirent_h.m4
#	m4/dup2.m4
#	m4/euidaccess.m4
#	m4/fchmodat.m4
#	m4/filemode.m4
#	m4/fsusage.m4
#	m4/getgroups.m4
#	m4/getloadavg.m4
#	m4/getrandom.m4
#	m4/gettime.m4
#	m4/gettimeofday.m4
#	m4/gnulib-common.m4
#	m4/group-member.m4
#	m4/inttypes.m4
#	m4/malloc.m4
#	m4/manywarnings.m4
#	m4/mempcpy.m4
#	m4/memrchr.m4
#	m4/mkostemp.m4
#	m4/mktime.m4
#	m4/nproc.m4
#	m4/nstrftime.m4
#	m4/pathmax.m4
#	m4/pipe2.m4
#	m4/pselect.m4
#	m4/pthread_sigmask.m4
#	m4/readlink.m4
#	m4/realloc.m4
#	m4/sig2str.m4
#	m4/ssize_t.m4
#	m4/stat-time.m4
#	m4/stddef_h.m4
#	m4/stdint.m4
#	m4/stdio_h.m4
#	m4/stdlib_h.m4
#	m4/stpcpy.m4
#	m4/strnlen.m4
#	m4/strtoimax.m4
#	m4/strtoll.m4
#	m4/time_h.m4
#	m4/timegm.m4
#	m4/timer_time.m4
#	m4/timespec.m4
#	m4/unistd_h.m4
#	m4/warnings.m4
#	nt/configure.bat
#	nt/preprep.c
#	test/lisp/register-tests.el
2024-01-02 10:28:14 +08:00
Po Lu
8e1c56ae46 ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
Stefan Monnier
7705bdfa5b Adjust affected callers of derived-mode-p` to use the new convention
* lisp/align.el (align-rules-list): Prefer `derived-mode-p` over
`provided-mode-derived-p`.
(align--rule-should-run):
* lisp/window.el (display-buffer-reuse-mode-window):
* lisp/whitespace.el (whitespace-enable-predicate):
* lisp/transient.el (transient--do-suffix-p):
* lisp/so-long.el (so-long--set-auto-mode):
* lisp/simple.el (command-completion-with-modes-p):
* lisp/progmodes/tcl.el (tcl-current-word):
* lisp/progmodes/idlwave.el (idlwave-fix-keywords):
* lisp/progmodes/gdb-mi.el (gdb, gdb-locals-mode-map)
(gdb-registers-mode-map, gdb-function-buffer-p):
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-style-setter)
(c-ts-mode-set-style):
* lisp/progmodes/bug-reference.el (bug-reference--try-setup-gnus-article):
* lisp/help-fns.el (help-fns--list-local-commands):
* lisp/emulation/viper.el (viper-mode)
(viper-this-major-mode-requires-vi-state):
* lisp/emacs-lisp/easy-mmode.el (easy-mmode--globalized-predicate-p):
* lisp/dired.el (dired-hide-details-mode, dired-click-to-select-mode):
* lisp/calendar/todo-mode.el (todo-reset-nondiary-marker)
(todo-reset-done-string, todo-reset-comment-string):
* lisp/vc/vc.el (vc-deduce-backend): Use new calling convention for
`derived-mode-p` and `provided-mode-derived-p`.
2023-11-23 11:59:49 -05:00
Stefan Monnier
492920dd5b Use new derived-mode-all/set-parents functions.
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`.
2023-11-08 23:24:35 -05:00
Eshel Yaron
8a635ac849 ; Substitute quotes in obsoletion notice in 'C-h f'
* lisp/help-fns.el (help-fns--obsolete): Substitute quotes in string
arguments to 'obsolete' declarations.

* lisp/emacs-lisp/advice.el (defadvice): Markup symbols in 'obsolete'
declaration.  (Bug#66240)
2023-09-28 21:44:09 +02:00
Eshel Yaron
dd38097f0b Fix regexp in help-do-arg-highlight
* 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.
2023-09-01 20:29:27 +02:00
Stefan Kangas
967fa846fc Use ensure-list in many more places
* lisp/align.el (align-region):
* lisp/auth-source-pass.el (auth-source-pass--build-result-many):
* lisp/auth-source.el (auth-source-ensure-strings):
* lisp/calendar/appt.el (appt-disp-window):
* lisp/cedet/mode-local.el (mode-local-map-mode-buffers):
* lisp/cus-edit.el (custom-prompt-variable)
(custom-variable-menu-create):
* lisp/dired-x.el (dired-mark-extension, dired-mark-suffix):
* lisp/emacs-lisp/checkdoc.el (checkdoc-defun-info):
* lisp/emacs-lisp/eieio.el (object-add-to-list):
* lisp/emulation/cua-base.el (cua--M/H-key):
* lisp/epg.el (epg--list-keys-1):
* lisp/faces.el (read-face-name):
* lisp/format.el (format-decode):
* lisp/gnus/gnus-score.el (gnus-home-score-file)
(gnus-all-score-files):
* lisp/gnus/gnus-uu.el (gnus-uu-grab-articles):
* lisp/gnus/message.el (message-make-forward-subject):
* lisp/gnus/nnmairix.el (nnmairix-create-search-group):
* lisp/gnus/spam.el (spam-copy-or-move-routine):
* lisp/help-fns.el (describe-face):
* lisp/ibuf-macs.el (define-ibuffer-filter):
* lisp/international/mule-cmds.el (select-safe-coding-system):
* lisp/net/imap.el (imap-send-command):
* lisp/printing.el (pr-menu-get-item):
* lisp/speedbar.el (speedbar-add-supported-extension)
(speedbar-add-ignored-directory-regexp):
* lisp/textmodes/rst.el (rst-forward-line-looking-at):
* lisp/vc/ediff-util.el (ediff-other-buffer):
* lisp/vc/diff.el (diff-no-select):
* lisp/vc/vc-dir.el (vc-dir-mark-state-files):
* lisp/wid-edit.el (widget-prompt-value):
* lisp/windmove.el (windmove-default-keybindings)
(windmove-display-default-keybindings)
(windmove-delete-default-keybindings)
(windmove-swap-states-default-keybindings):
* lisp/window.el (display-buffer-reuse-mode-window):
* lisp/woman.el (woman-expand-directory-path): Prefer ensure-list.
2023-08-27 21:45:30 +02:00
Mattias Engdegård
f4fe820707 Don't describe lexbound uncompiled function as 'closures'
* 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.
2023-08-21 17:05:53 +02:00
Eli Zaretskii
f01a94fc58 ; * lisp/help-fns.el (help-display-function-type): Doc fix (bug#65288). 2023-08-21 15:14:26 +03:00
Andrea Corallo
652e45b70d * Introduce `help-display-function-type' customizable var (bug#65288).
* lisp/help-fns.el (help-display-function-type): New
	customizable var.
	(help-fns--signature): Make use of.
2023-08-20 22:36:47 +02:00
Eli Zaretskii
3d7041834f Revert "Fix slow "C-h f" in Emacs built without native compilation"
This reverts commit 545f95d1a3.
It is no longer needed, as comp.el and comp-cstr.el are now
byte-compiled even if native-compilation is not built-in.
2023-08-16 16:06:20 +03:00
Stefan Monnier
7ba76dc9c3 lisp/help-fns.el: Revert commit c12838c73e
* lisp/help-fns.el (help-fns--describe-function-or-command-prompt):
Don't allow specifying a non-existing function.
2023-08-15 10:21:51 -04:00
Eli Zaretskii
545f95d1a3 Fix slow "C-h f" in Emacs built without native compilation
* lisp/help-fns.el (help-fns--signature): Don't try calling
'comp-function-type-spec' if Emacs was built without native
compilation.  (Bug#65250)
2023-08-14 18:08:54 +03:00
Stefan Kangas
bbd69f1663 Delete useless conditional in describe-keymap
* lisp/help-fns.el (describe-keymap): Delete useless
conditional.  (Bug#65128)
2023-08-08 03:40:03 +02:00
Eli Zaretskii
dde3b9350e Merge from origin/emacs-29
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
2023-08-04 03:17:51 -04:00
Eli Zaretskii
db7d70d3ca ; Add commentary to 'describe-function's completion
* lisp/help-fns.el
(help-fns--describe-function-or-command-prompt): Add a comment
(bug#64902).
2023-08-03 11:26:32 +03:00
Mattias Engdegård
3560dfdb86 ; Fix backport of help-fns--analyze-function bug fix
* 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.
2023-07-31 16:14:07 +02:00
Mattias Engdegård
96d52f8944 Fix function help for advised aliases (bug#64797)
* 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)
2023-07-30 10:27:14 +03:00
Mattias Engdegård
024bd1f090 Fix function help for advised aliases (bug#64797)
* 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.
2023-07-27 17:09:30 +02:00
Mattias Engdegård
508005b3cf ; * lisp/emacs-lisp/comp.el (comp-funciton-type-spec): typo 2023-06-04 14:09:39 +02:00
Andrea Corallo
53dc1f3fe0 Print know function types in C-h f
* 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'.
2023-06-04 13:06:39 +02:00
Andrea Corallo
ecc1d990d9 'describe-function' shows function inferred type when available
* lisp/help-fns.el (help-fns--signature): Print function type for
native compiled code.
* etc/NEWS: Add entry.
2023-05-30 18:28:25 +02:00
Eli Zaretskii
f1ce49d148 Merge from origin/emacs-29
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
2023-04-21 07:29:14 -04:00
Eli Zaretskii
9ac1259278 Fix display of menu-bar bindings of commands in *Help* buffers
* 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.
2023-04-19 20:46:40 +03:00
Stefan Monnier
616b22b5b9 Merge from origin/emacs-29
8f42db010d Improve indenting "case" in Python
c4d490490d ; * test/src/fns-tests.el: Fix last change
875e77a66a * test/infra/Dockerfile.emba (emacs-native-comp): Add zli...
64a2b0d36f Fix failure of fns-tests-collate-strings on Cygwin
90fc6b987a * lisp/savehist.el (savehist-save): Preserve shared struc...
08fbc13375 Adapt Tramp manual
accb387166 Fix system time sampling on MS-Windows
33d436eefa Fix treesit_ensure_parsed (bug#62333)
d93a439846 * lisp/help-fns.el (find-lisp-object-file-name): Fix bug#...
be8147c53f Improve "Bugs" in the Emacs manual
2023-03-27 17:16:58 -04:00
Stefan Monnier
d93a439846 * lisp/help-fns.el (find-lisp-object-file-name): Fix bug#62376 part2
Nowadays `loaddefs.el` are byte-compiled, so adjust pattern accordingly
2023-03-23 13:43:45 -04:00
Stefan Monnier
5904bdf581 (describe-function): Load file for `...' references
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.
2023-03-21 21:48:24 -04:00
Mattias Engdegård
450be633bb Remove stray quotes
* 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.
2023-02-21 18:32:51 +01:00
Mattias Engdegård
7a59f20a4e Follow aliases for interactive-only declarations
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.
2023-02-21 12:32:48 +01:00
Mattias Engdegård
db3fea2e5c Detect and prevent function alias loops in fset and defalias
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.
2023-02-21 10:42:00 +01:00
Eli Zaretskii
3c55fbd4ad Merge from origin/emacs-29
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
2023-01-01 05:47:47 -05:00