]> git.eshelyaron.com Git - emacs.git/log
emacs.git
5 weeks agoAdd 'and', 'named', and 'anonymous' predicate for tree-sitter
Yuan Fu [Mon, 13 Jan 2025 07:41:47 +0000 (23:41 -0800)]
Add 'and', 'named', and 'anonymous' predicate for tree-sitter

* doc/lispref/parsing.texi (User-defined Things): Mention the
new predicate.
* src/treesit.c (treesit_traverse_validate_predicate): Recognize
named, anonymous, and and predicates.
(treesit_traverse_match_predicate): Handle named, anonymous, and
and predicates.

(cherry picked from commit f0e63558bd3dfd9e57cacfba8690f9dd29774947)

5 weeks ago; Move c-ts-mode keyword variables forward
Yuan Fu [Mon, 13 Jan 2025 07:38:24 +0000 (23:38 -0800)]
; Move c-ts-mode keyword variables forward

* lisp/progmodes/c-ts-mode.el (c-ts-mode--type-keywords):
(c-ts-mode--operators):
(c-ts-mode--c++-operators):
(c-ts-mode--c++-operator-keywords): Move before
c-ts-mode--keywords to avoid undefined variable error.

(cherry picked from commit 4687fff4f0a473fd887bf0800976c356eecd7eb2)

5 weeks agoAdd special indent rule for FOR_EACH_TAIL in c-ts-mode
Yuan Fu [Mon, 13 Jan 2025 07:03:41 +0000 (23:03 -0800)]
Add special indent rule for FOR_EACH_TAIL in c-ts-mode

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--emacs-macro-rules): New function
(c-ts-mode--simple-indent-rules): Add new rule.

(cherry picked from commit 8cfa3447b71a3586378e90e5690da6c1faaa77b6)

5 weeks agoFix c-ts-mode indentation (bug#75442)
Yuan Fu [Mon, 13 Jan 2025 06:23:36 +0000 (22:23 -0800)]
Fix c-ts-mode indentation (bug#75442)

* lisp/progmodes/c-ts-mode.el (c-ts-mode--simple-indent-rules):
Use standalone-parent instead of parent.
* test/lisp/progmodes/c-ts-mode-resources/indent.erts:
New test.

(cherry picked from commit 04032cd00af7617c709140f3c80b5604b05c11e8)

5 weeks agoAdd newly supported keywords to c-ts-mode (bug#75226)
Yuan Fu [Sun, 12 Jan 2025 08:35:20 +0000 (00:35 -0800)]
Add newly supported keywords to c-ts-mode (bug#75226)

For the new keywords, test if the grammar supports them before
useing it.

* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--optional-c-keywords): New variable.
(c-ts-mode--ms-keywords): New variable.
(c-ts-mode--compute-optional-keywords): New function.
(c-ts-mode--keywords): Add new optional keywords.
(c-ts-mode--c++-operators): New variable.
(c-ts-mode--c++-operator-keywords): New variable.
(c-ts-mode--font-lock-settings): Use c-ts-mode--c++-operators.

(cherry picked from commit 7d3bc1ff2f44215ad24fdd8b243e7cee8ff66fa0)

5 weeks agoLisp Reference Manual: Index standard symbol properties.
Stephen Gildea [Mon, 13 Jan 2025 04:13:08 +0000 (20:13 -0800)]
Lisp Reference Manual: Index standard symbol properties.

* doc/lispref/symbols.texi (Standard Properties):
* doc/lispref/commands.texi:
* doc/lispref/customize.texi (Variable Definitions):
* doc/lispref/help.texi:
* doc/lispref/keymaps.texi:
* doc/lispref/minibuf.texi (Minibuffer History):
* doc/lispref/modes.texi (Setting Hooks):
* doc/lispref/sequences.texi (Char-Tables):
* doc/lispref/text.texi (Undo):
* doc/lispref/variables.texi: Each standard symbol property has exactly
one index entry, uniformly formatted as "(symbol property)".

(cherry picked from commit c98d9e8bf58c75e3ed6c7d2f9c5e63fc17bf9cf7)

5 weeks agofix for bibtex.el in prior commit
Roland Winkler [Mon, 13 Jan 2025 00:43:16 +0000 (18:43 -0600)]
fix for bibtex.el in prior commit

* lisp/textmodes/bibtex.el (bibtex-string-file-path)
(bibtex-file-path): Check for undefined environment variable
BIBINPUTS.

(cherry picked from commit 615f06ea534cd565f439b08d563a31ca2b0eea92)

5 weeks agoUse eabs in Fcurrent_time_zone
Stefan Kangas [Sun, 12 Jan 2025 21:41:30 +0000 (22:41 +0100)]
Use eabs in Fcurrent_time_zone

* src/timefns.c (Fcurrent_time_zone): Use eabs.
* test/src/timefns-tests.el
(timefns-tests-current-time-zone): New test.

(cherry picked from commit ccd927d741df928d4de578dffac74bc67d24c8b0)

5 weeks agoDelete obsolete coccinelle files
Stefan Kangas [Sun, 12 Jan 2025 21:08:51 +0000 (22:08 +0100)]
Delete obsolete coccinelle files

These files relates to a 13 year old attempt at a generational GC that
was never merged.

* admin/coccinelle/frame.cocci:
* admin/coccinelle/window.cocci: Delete files.

(cherry picked from commit 85c73bb901e2adbad78e19c9a4f4d1ef74ac3d6d)

5 weeks agobibtex-string-file-path and bibtex-file-path are lists of directories
Roland Winkler [Sun, 12 Jan 2025 21:17:28 +0000 (15:17 -0600)]
bibtex-string-file-path and bibtex-file-path are lists of directories

* lisp/textmodes/bibtex.el (bibtex-string-file-path, bibtex-file-path):
These user options are now lists of directories.  For backward compatibility,
the old, obsolete format is still supported.
(bibtex-string-files-init, bibtex-initialize): Change accordingly.
Use file-name-extension and file-name-with-extension.
* etc/NEWS: Entry for new format of bibtex-string-file-path and
bibtex-file-path.

(cherry picked from commit 14b5ba7c61fd8fb1e2c8fe956ee925b4a59c10c8)

5 weeks agoEmphasize the use of :tag for new customization types
Mauro Aranda [Sun, 12 Jan 2025 18:19:40 +0000 (15:19 -0300)]
Emphasize the use of :tag for new customization types

* doc/lispref/customize.texi (Type Keywords): Name important use
cases of the :tag keyword.
(Defining New Types): Emphasize the use of the :tag keyword when
using the lazy widget.  (Bug#74409)

(cherry picked from commit 99b85e116f09e68e0d5750c9772d0a2489680078)

5 weeks agoAdd treesit-thing-settings to yaml-ts-mode and enable transpose-sexps
Juri Linkov [Sun, 12 Jan 2025 18:17:16 +0000 (20:17 +0200)]
Add treesit-thing-settings to yaml-ts-mode and enable transpose-sexps

* lisp/treesit.el (treesit-major-mode-setup): Move setting of
'transpose-sexps-function' outside of 'treesit-thing-defined-p'
since 'treesit-transpose-sexps' doesn't depend on the 'sexp' thing.

* lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode):
Add 'treesit-thing-settings' with the 'list' thing,
but use it only for list commands, not sexp commands (bug#73404).

(cherry picked from commit 2d2bc6f1bc678b21c46af26cf343e24acdb48b79)

5 weeks agoAdd new option 'rotate-windows-change-selected'
Pranshu Sharma [Sun, 12 Jan 2025 17:45:30 +0000 (18:45 +0100)]
Add new option 'rotate-windows-change-selected'

* lisp/window-x.el: Fix header information.
(rotate-windows-change-selected): New option.
(rotate-window-layout-counterclockwise)
(rotate-window-layout-clockwise): Fix doc-strings.
(rotate-windows): Handle 'rotate-windows-change-selected'.

(cherry picked from commit 7648faedd3aeabadc66c67630809ef6178f4851a)

5 weeks ago; Add some niceties to .lldbinit
Gerd Möllmann [Sun, 12 Jan 2025 07:44:18 +0000 (08:44 +0100)]
; Add some niceties to .lldbinit

* src/.lldbinit: Handle some signals for tty Emacs.
New commands xreload and xattach. Common breakpoints.

(cherry picked from commit d00de6f166af77e686d0dd7a0d22fcf8f0e09f37)

5 weeks ago* lisp/treesit.el: Fix 'treesit--explorer-tree-mode-map'.
Juri Linkov [Sun, 12 Jan 2025 07:39:36 +0000 (09:39 +0200)]
* lisp/treesit.el: Fix 'treesit--explorer-tree-mode-map'.

(treesit--explorer-tree-mode-map): Move this map
before its mode 'treesit--explorer-tree-mode',
otherwise the map has no effect.

(cherry picked from commit 54e4b305032d4dadbee286179fa78e01d4d15182)

5 weeks ago; * src/keymap.c: Fix last change (bug#75219).
Eli Zaretskii [Sun, 12 Jan 2025 06:24:39 +0000 (08:24 +0200)]
; * src/keymap.c: Fix last change (bug#75219).

(cherry picked from commit 412c1a4f0e1df8c82bd94f02e21c1ef62b3d53d5)

5 weeks agoFix mouse-2 clicks on mode line and header line
Eli Zaretskii [Sun, 12 Jan 2025 06:22:24 +0000 (08:22 +0200)]
Fix mouse-2 clicks on mode line and header line

* src/keymap.c (Fcurrent_active_maps): For clicks on mode-line and
header-line, always override the keymaps at buffer position.
(Bug#75219)

(cherry picked from commit c41ea047a434710c4b7bc8280695c83fbe5fff35)

5 weeks agoAlign term-mode control character handling
Daniel Colascione [Sat, 11 Jan 2025 20:48:19 +0000 (12:48 -0800)]
Align term-mode control character handling

Terminal emulators generally ignore exotic ASCII control
characters like SOH and STX. Make term-mode do the same.

* lisp/term.el (term-emulate-terminal): ignore ASCII control
characters like other terminal emulators do

(cherry picked from commit 6cea3233a12f3964c46bffb0b6215e9c8cd92962)

5 weeks agoMake Eshell's "ls" command return a non-zero status on errors
Jim Porter [Sat, 11 Jan 2025 19:50:19 +0000 (11:50 -0800)]
Make Eshell's "ls" command return a non-zero status on errors

* lisp/eshell/em-ls.el (eshell/ls): Set exit code when calling 'error-func'.

(cherry picked from commit aff9261ab2ab3cf3435cf006e600a575bc2e3d6b)

5 weeks ago; * src/term.c (term_mouse_position): Fix 'fp' pointer.
Juri Linkov [Sat, 11 Jan 2025 18:40:11 +0000 (20:40 +0200)]
; * src/term.c (term_mouse_position): Fix 'fp' pointer.

(cherry picked from commit 3d375ced1f22fcd3b370d715ffdd055684bce5ac)

5 weeks agoImprove treesit list navigation support for #if/#endif (bug#73404)
Juri Linkov [Sat, 11 Jan 2025 18:28:43 +0000 (20:28 +0200)]
Improve treesit list navigation support for #if/#endif (bug#73404)

* lisp/treesit.el (treesit--forward-list-with-default): Improve to
better support the case when point is inside an opening/closing node
with a name longer than 1 character such as "#if" and "#endif".
(treesit-navigate-thing): No need to check for thing 'list'
since list commands now use other functions.

* lisp/progmodes/c-ts-mode.el (c-ts-mode--thing-settings): Add
more preproc nodes such as #if/#endif and #ifdef/#endif and their
variants to the 'list' thing.

(cherry picked from commit db4bf410f2bae6c77f2a0e660dcc680d73a18cd1)

5 weeks ago* lisp/progmodes/typescript-ts-mode.el: Fix syntax of tsx tags.
Juri Linkov [Sat, 11 Jan 2025 17:39:56 +0000 (19:39 +0200)]
* lisp/progmodes/typescript-ts-mode.el: Fix syntax of tsx tags.

(tsx-ts--s-p-query): Bind 'jsx_opening_element' and
'jsx_closing_element' to @jsx to be able to use the < and > syntax
for angle brackets in 'tsx-ts--syntax-propertize-captures' (bug#73978).

(cherry picked from commit fafcc8458e805e5c7d7785aa7e943bacfadcf79d)

5 weeks agoFix handling of 'minibuffer' frame parameter for tty frames
Martin Rudalics [Sat, 11 Jan 2025 17:07:21 +0000 (18:07 +0100)]
Fix handling of 'minibuffer' frame parameter for tty frames

* src/frame.c (make_terminal_frame): Fix handling of
'minibuffer' frame parameter for tty child frames.  Support
'minibuffer-only' child frames.

(cherry picked from commit b7dc4ba213e3c1aac5637546e48088206b6e91eb)

5 weeks ago; * lisp/window-x.el (window--transpose-1): Simplify.
Eshel Yaron [Sat, 11 Jan 2025 18:10:08 +0000 (19:10 +0100)]
; * lisp/window-x.el (window--transpose-1): Simplify.

5 weeks ago; * lisp/progmodes/scheme.el: Fix typo.
Eshel Yaron [Sat, 11 Jan 2025 17:55:08 +0000 (18:55 +0100)]
; * lisp/progmodes/scheme.el: Fix typo.

5 weeks agoFix cherry-picking
Eshel Yaron [Sat, 11 Jan 2025 17:10:40 +0000 (18:10 +0100)]
Fix cherry-picking

5 weeks ago; * src/term.c (tty_frame_at, term_mouse_position): Fix last change.
Eli Zaretskii [Sat, 11 Jan 2025 16:39:19 +0000 (18:39 +0200)]
; * src/term.c (tty_frame_at, term_mouse_position): Fix last change.

(cherry picked from commit 912310285860363f7cf9032e949124b93a51dbca)

5 weeks ago; * etc/NEWS: Fix last change.
Eli Zaretskii [Sat, 11 Jan 2025 13:05:41 +0000 (15:05 +0200)]
; * etc/NEWS: Fix last change.

(cherry picked from commit 1dfde9f70d2e4b417fe309ba490b33136e7ae870)

5 weeks agoibuffer: Add the "Recency" column
Daniel Mendler [Sat, 28 Dec 2024 12:21:46 +0000 (13:21 +0100)]
ibuffer: Add the "Recency" column

Define a column which shows how many seconds ago the respective
buffer has been displayed.  The time is formatted with the
`seconds-to-string' function, with the new arguments READABLE=t
and ABBREV=t.
* lisp/ibuffer.el (ibuffer-recency-header-map): New keymap.
(define-ibuffer-column recency): New column.
* etc/NEWS: Mention new `recency' column.  (Bug#73047)

(cherry picked from commit 266e1c34d89e5f0a8ece789e77b24187c8c7d448)

5 weeks agoFix widget buttons when button prefix includes space
David Ponce [Wed, 1 Jan 2025 11:03:07 +0000 (08:03 -0300)]
Fix widget buttons when button prefix includes space

* lisp/wid-edit.el (widget-specify-button): Give the invisible
space the same 'face' property as the rest of the button.
(Bug#73911)

(cherry picked from commit 5060bf6ed64a6e96b4c660e6ad5204a23133b71d)

5 weeks agoFix checkbox's child creation
Mauro Aranda [Wed, 1 Jan 2025 11:22:45 +0000 (08:22 -0300)]
Fix checkbox's child creation

* lisp/wid-edit.el (widget-checklist-add-item): Swap function
calls so that child is actually a widget.  (Bug#72156)

(cherry picked from commit d66b8d4becb6804d3bd912a000dc64ccfdbe6810)

5 weeks agoDocument that 'package-vc' doesn't support built-in packages
Eli Zaretskii [Sat, 11 Jan 2025 10:58:03 +0000 (12:58 +0200)]
Document that 'package-vc' doesn't support built-in packages

* doc/misc/use-package.texi (Install package):
* doc/emacs/package.texi (Fetching Package Sources): Document that
upgrading built-in packages is not yet supported using
'package-vc'.  (Bug#75328)

(cherry picked from commit 26c5fadf474a56d56064899bc3447bba6d3c3037)

5 weeks ago; Skip commit ee61b9a050b4fbc9940d11bc95437e5113865c8b
Eshel Yaron [Sat, 11 Jan 2025 17:08:18 +0000 (18:08 +0100)]
; Skip commit ee61b9a050b4fbc9940d11bc95437e5113865c8b

5 weeks ago; Simplify admin/run-codespell
Stefan Kangas [Sat, 11 Jan 2025 06:09:23 +0000 (07:09 +0100)]
; Simplify admin/run-codespell

* admin/run-codespell (emacs_run_codespell): Simplify.  Use env in
shebang to use more recent bash on macOS.

(cherry picked from commit ce43d13593a44ba36ba6702cf276fef8711ab738)

5 weeks ago; Remove duplicated word in files.el Commentary
Stefan Kangas [Sat, 11 Jan 2025 04:18:51 +0000 (05:18 +0100)]
; Remove duplicated word in files.el Commentary

(cherry picked from commit fa1470d0699172e0913290c78c66da293aa43f89)

5 weeks agoImprove checkdoc-common-verbs-wrong-voice docstring
Stefan Kangas [Sat, 11 Jan 2025 04:05:14 +0000 (05:05 +0100)]
Improve checkdoc-common-verbs-wrong-voice docstring

* lisp/emacs-lisp/checkdoc.el (checkdoc-common-verbs-wrong-voice):
Improve docstring.

(cherry picked from commit dabaea97465163c015890272c3d5001624690e08)

5 weeks agoDocument string-as-{unibyte,multibyte} as obsolete in manual
Stefan Kangas [Sat, 11 Jan 2025 01:28:15 +0000 (02:28 +0100)]
Document string-as-{unibyte,multibyte} as obsolete in manual

* doc/lispref/nonascii.texi (Selecting a Representation): Document
string-as-unibyte and string-as-multibyte as obsolete.

(cherry picked from commit 6de2ee5663d5cc51831dbdafd77bd71e0811c37b)

5 weeks agoFix go-ts-mode var spec indentation (Bug#75362)
Randy Taylor [Sun, 5 Jan 2025 21:48:00 +0000 (16:48 -0500)]
Fix go-ts-mode var spec indentation (Bug#75362)

v0.21.1 and onwards changed how this was indented.

* lisp/progmodes/go-ts-mode.el (go-ts-mode--indent-rules):
Add rule for var_spec_list.

(cherry picked from commit 7f76f872ebfd67fb52974426c47bf3d08724d716)

5 weeks agoAdd "text" as a thing in tsx-ts-mode
Kohei Tsuruta [Tue, 7 Jan 2025 15:36:14 +0000 (07:36 -0800)]
Add "text" as a thing in tsx-ts-mode

* lisp/progmodes/typescript-ts-mode.el (tsx-ts-mode):
Add definition of "text" (bug#75422).

Copyright-paperwork-exempt: yes
(cherry picked from commit 01464fc882dbb56d4271fbb89b7b847e8374d39c)

5 weeks agoImprove doc string of 'package-delete'
Nikolaos Chatzikonstantinou [Sun, 5 Jan 2025 13:16:06 +0000 (08:16 -0500)]
Improve doc string of 'package-delete'

* lisp/emacs-lisp/package.el (package-delete): Elaborate on the
kind of argument expected by the function.  (Bug#75382)

(cherry picked from commit 59c57337923ed515e923ea65f168e1197d376868)

5 weeks ago; * admin/MAINTAINERS: Remove Kelvin White.
Stefan Kangas [Thu, 9 Jan 2025 02:08:29 +0000 (03:08 +0100)]
; * admin/MAINTAINERS: Remove Kelvin White.

(cherry picked from commit 313a191d047a9d7d24ad0fee55739ce6133d887e)

5 weeks agoClarify that 'mac' line ending convention is not used on macOS
Stefan Kangas [Wed, 8 Jan 2025 03:50:53 +0000 (04:50 +0100)]
Clarify that 'mac' line ending convention is not used on macOS

* doc/emacs/mule.texi (Coding Systems):
* doc/lispref/nonascii.texi (Coding System Basics): Clarify that the
'mac' line ending convention is not used on macOS, and is now rare
outside of legacy software.

(cherry picked from commit 002960ceabfb4f91b1bc73a342a9bd5e719e739b)

5 weeks agoAdd language server for Odin
Ellis Kenyo [Tue, 7 Jan 2025 15:43:58 +0000 (15:43 +0000)]
Add language server for Odin

* lisp/progmodes/eglot.el (eglot-server-programs): Add language server
for the Odin programming language.  (Bug#75421)

Copyright-paperwork-exempt: yes
(cherry picked from commit 4210e065648dcc4fd7fbc22298047d19d679c84f)

5 weeks ago; Improve documentation of function-type display
Eli Zaretskii [Tue, 7 Jan 2025 15:20:22 +0000 (17:20 +0200)]
; Improve documentation of function-type display

* etc/NEWS: Document 'help-display-function-type'.

* doc/lispref/functions.texi (Declare Form):
* doc/lispref/objects.texi (Type Specifiers):
* doc/emacs/help.texi (Name Help): Better indexing of function
types.  (Bug#65288)

(cherry picked from commit ee1034422b0c84722a237ab6fdd410ab74674ee6)

5 weeks agoModernize "Commentary" section of files.el
Stefan Kangas [Tue, 7 Jan 2025 05:12:21 +0000 (06:12 +0100)]
Modernize "Commentary" section of files.el

* lisp/files.el: Modernize "Commentary" section.  (Bug#75398)

(cherry picked from commit 1c49edc40802ed4bb5f36c44b00e954efbddd42a)

5 weeks ago* INSTALL: Add advice how to invoke 'make install'. (Bug#74400)
Michael Albinus [Sun, 5 Jan 2025 08:25:37 +0000 (09:25 +0100)]
* INSTALL: Add advice how to invoke 'make install'.  (Bug#74400)

(cherry picked from commit 505c1123e18a8a710fc60e05a4c870497bf580f4)

5 weeks agoImprove the documentation of 'key-valid-p'
Hong Xu [Sat, 4 Jan 2025 20:32:24 +0000 (12:32 -0800)]
Improve the documentation of 'key-valid-p'

* lisp/keymap.el (key-valid-p): Add an function key and mouse
button example.  Mention '<left>' as a cursor control key
instead of a function key.  Briefly explain what an event may
be.  (Bug#75366)

(cherry picked from commit 82e16cae9cc02d6807561861621cf7b5b9ba928f)

5 weeks ago; Touch-ups for new window-x.el
Eshel Yaron [Sat, 11 Jan 2025 12:57:26 +0000 (13:57 +0100)]
; Touch-ups for new window-x.el

* lisp/window-x.el: Autoload commands, provide feature.
(window-tree-normal-sizes): Improve docstring.
(window--window-to-transpose, window--depmap): Remove.
(window--rotate-interactive-arg): New function.
(rotate-window-layout-anticlockwise): Rename to...
(rotate-window-layout-counterclockwise): ...this.
(rotate-window-layout-clockwise)
(flip-window-layout-horizontally)
(flip-window-layout-vertically, transpose-window-layout)
(rotate-windows-back, rotate-windows, window--transpose)
(window--transpose-1): Cosmetics.

6 weeks agoSupport TTY child frames with GPM mouse
Jared Finder [Tue, 7 Jan 2025 04:52:11 +0000 (20:52 -0800)]
Support TTY child frames with GPM mouse

* lisp/frame.el (x-list-fonts): Delete `frame-at', to move to
C implementation.
* lisp/xt-mouse.el (xterm-mouse-event): Call new `tty-frame-at'.
* src/term.c (tty_frame_at, Ftty_frame_at): New C function,
replacing `frame-at' only for TTYs.
(term_mouse_position): Use last_mouse_frame when it is set.
(handle_one_term_event): Call tty_frame_at to get frame under
mouse, store it in last_mouse_frame.  Alter event coordinates
based on mouse frame.
(syms_of_term): Add tty-frame-at, last_mouse_frame.
* src/termhooks.h: Make Gpm_Event parameter const.

(cherry picked from commit d018a26f9cfb29b166199e88ec6ee84d06733851)

6 weeks agoIn bibtex.el, fix widgets for customization types (bug#74409)
Roland Winkler [Sat, 11 Jan 2025 04:34:16 +0000 (22:34 -0600)]
In bibtex.el, fix widgets for customization types (bug#74409)

* lisp/textmodes/bibtex.el (bibtex-field-list, bibtex-entry-alist)
(bibtex-field-alist): Fix widgets for customization types (bug#74409).

(cherry picked from commit 2f63dab3ee566f5794fac4139a8f8b8b9e250a00)

6 weeks agoImprove some docstrings in bibtex.el
Roland Winkler [Sat, 11 Jan 2025 03:48:54 +0000 (21:48 -0600)]
Improve some docstrings in bibtex.el

* lisp/textmodes/bibtex.el: (bibtex-BibTeX-entry-alist)
(bibtex-biblatex-entry-alist, bibtex-BibTeX-field-alist): Improve docstrings.
(bibtex-biblatex-entry-alist): Minor fix.

(cherry picked from commit f51129b4fc3f50a20856d0d9bd1ac5b61daf08da)

6 weeks ago; Fix typo (Bug#75480)
john muhl [Sun, 5 Jan 2025 16:24:02 +0000 (10:24 -0600)]
; Fix typo (Bug#75480)

(cherry picked from commit e024bd1d1f904b271d337e85ef730afcc87e73d2)

6 weeks agoProtect Vframe_list updating from interruptions
Robert Pluim [Mon, 6 Jan 2025 15:38:07 +0000 (16:38 +0100)]
Protect Vframe_list updating from interruptions

* src/frame.c (delete_frame): When deleting the frame from
Vframe_list, block input, since input can arrive whilst we're
running lisp  (Bug#74902).

(cherry picked from commit 8e9ad92a140e89c3e29dd7ab148534289e7769db)

6 weeks agoAdd new file window-x.el
Pranshu Sharma [Fri, 10 Jan 2025 15:07:30 +0000 (16:07 +0100)]
Add new file window-x.el

* lisp/window-x.el: New file.
* etc/NEWS: Mention new commands to modify window layout.

(cherry picked from commit d1e6379d6ab6148b0c93369daf51f7d6b10a3c9a)

6 weeks ago; Fix recently added documentation
Eli Zaretskii [Fri, 10 Jan 2025 15:03:16 +0000 (17:03 +0200)]
; Fix recently added documentation

* doc/lispref/windows.texi (Splitting Windows): Fix punctuation.
(Resurrecting Windows): Fix typo.
* doc/lispref/elisp.texi (Top): Add the new node to @detailmenu.

(cherry picked from commit 4a8c885dfab87e85edd0897725a242a48f88436b)

6 weeks ago; * doc/lispref/windows.texi (Resurrecting Windows): Fix typo.
Eli Zaretskii [Fri, 10 Jan 2025 14:51:27 +0000 (16:51 +0200)]
; * doc/lispref/windows.texi (Resurrecting Windows): Fix typo.

(cherry picked from commit c2dbe029104d75866813c1d0c10c0b2173bb85c7)

6 weeks agoHave 'split-window' optionally resurrect deleted windows
Martin Rudalics [Fri, 10 Jan 2025 08:24:20 +0000 (09:24 +0100)]
Have 'split-window' optionally resurrect deleted windows

* src/window.c (Fwindow_old_buffer): Handle deleted window as
argument.
(make_parent_window): Remove function.
(Fsplit_window_internal): New argument REFER for resurrecting
deleted windows.  Incorporate functionality of defunct
make_parent_window.
(Fdelete_window_internal, delete_all_child_windows): Store any
deleted window's buffer in the window's old_buffer slot.
(window_dead_windows_table): Make it a 'value' type hash table
so the sequence number cannot affect its weakness.
* lisp/window.el (split-window): New argument REFER.
* doc/lispref/windows.texi (Resurrecting Windows): New section.
(Splitting Windows): Explain new argument REFER.
(Window Hooks): Rewrite description of 'window-old-buffer'.
* etc/NEWS: Mention new REFER argument for 'split-window'.

(cherry picked from commit 7f286e7d83665526929dea3f7180f3a5ba8ef14e)

6 weeks ago* lisp/progmodes/typescript-ts-mode.el: Fix syntax of tsx tags.
Juri Linkov [Fri, 10 Jan 2025 07:56:08 +0000 (09:56 +0200)]
* lisp/progmodes/typescript-ts-mode.el: Fix syntax of tsx tags.

(tsx-ts--syntax-propertize-captures): For tag angle brackets
use the same syntax as in 'sgml-make-syntax-table' (bug#73978).

(cherry picked from commit c0a52efed32ddc63b26c9e1d9dd769da55d857e5)

6 weeks agoUse the treesit thing 'list' with symbol property 'treesit-thing-symbol'
Juri Linkov [Fri, 10 Jan 2025 07:33:49 +0000 (09:33 +0200)]
Use the treesit thing 'list' with symbol property 'treesit-thing-symbol'

* doc/lispref/parsing.texi (User-defined Things): Mention new
functions 'treesit-forward-list', 'treesit-down-list',
'treesit-up-list', 'treesit-show-paren-data' that use the thing
'list' with the symbol property 'treesit-thing-symbol' (bug#73404).

* lisp/treesit.el: Put the property 'treesit-thing-symbol'
on the symbol 'list'.
(treesit--forward-list-with-default, treesit-down-list)
(treesit-up-list, treesit-navigate-thing)
(treesit-show-paren-data--categorize, treesit-major-mode-setup):
Replace 'sexp-list' with 'list'.

* lisp/progmodes/c-ts-mode.el (c-ts-mode--thing-settings):
* lisp/progmodes/js.el (js-ts-mode):
* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
* lisp/progmodes/typescript-ts-mode.el (typescript-ts-base-mode)
(tsx-ts-mode):
* lisp/textmodes/html-ts-mode.el (html-ts-mode):
Replace 'sexp-list' with 'list'.

* src/treesit.c (treesit_traverse_validate_predicate)
(treesit_traverse_match_predicate): Check if the 'pred'
symbol has the property 'Qtreesit_thing_symbol'.
(syms_of_treesit): New symbol 'Qtreesit_thing_symbol'.

(cherry picked from commit 42a5ac3b513ff03c64c9609fc7e79c2b7932b2a4)

6 weeks ago* lisp/man.el (Man-fit-to-window): Don't update on tty with MANWIDTH.
Juri Linkov [Thu, 9 Jan 2025 18:33:03 +0000 (20:33 +0200)]
* lisp/man.el (Man-fit-to-window): Don't update on tty with MANWIDTH.

Check if 'Man-columns' is non-nil before trying to reformat
the manpage buffer.  The value of the varible 'Man-columns'
is nil on a non-window system where "MANWIDTH" or "COLUMNS"
is defined.  And the return value of the function 'Man-columns'
is meaningless in this case anyway.  So no need to react
to changes in window width (bug#74924).

(cherry picked from commit 351b6ac16d29459c5800bd980d428e61ee43cb7d)

6 weeks agoImprove UI of customizing icons
David Ponce [Thu, 9 Jan 2025 10:01:40 +0000 (11:01 +0100)]
Improve UI of customizing icons

* lisp/cus-edit.el (custom-icon--images-sub-type)
(custom-icon--emojis-sub-type, custom-icon--symbols-sub-type)
(custom-icon--texts-sub-type, custom-icon--type): New defconst's.
(custom-icon-value-create): Use them.  (Bug#73178)

(cherry picked from commit 6d02539dd48255e1b53f48dbdc8069b50be63767)

6 weeks ago; Skip commit 81cf42c8af75b9ee2f2cee36254e3286b2077cbc
Eshel Yaron [Sat, 11 Jan 2025 11:18:20 +0000 (12:18 +0100)]
; Skip commit 81cf42c8af75b9ee2f2cee36254e3286b2077cbc

6 weeks agoIn xt_action_hook don't act on deleted window's scroll bar (Bug#75120)
Martin Rudalics [Thu, 9 Jan 2025 08:37:13 +0000 (09:37 +0100)]
In xt_action_hook don't act on deleted window's scroll bar (Bug#75120)

* src/xterm.c (xt_action_hook): Make sure window_being_scrolled
is live (Bug#75120).
* src/pdumper.c (dump_subr): Update pertinent hash of
HASH_Lisp_Subr.

(cherry picked from commit 0edafe0fb6bb3df4fed09eb345b690fbce2c01bb)

6 weeks ago; * lib-src/make-fingerprint.c: Fix copyright year.
Stefan Kangas [Thu, 9 Jan 2025 05:22:21 +0000 (06:22 +0100)]
; * lib-src/make-fingerprint.c: Fix copyright year.

This file is new with the portable dumper.

(cherry picked from commit b099777b52da1232e14883f50775a75d4d6aba62)

6 weeks ago; Fix indentation in itree.c
Stefan Kangas [Thu, 9 Jan 2025 04:12:14 +0000 (05:12 +0100)]
; Fix indentation in itree.c

(cherry picked from commit b6bec47c4abe84263cb88eda56d3a9d77f153f71)

6 weeks agoAdd button navigation to treesit-explorer (bug#75141)
Gabriel Santos [Fri, 27 Dec 2024 13:43:20 +0000 (10:43 -0300)]
Add button navigation to treesit-explorer (bug#75141)

* lisp/treesit.el (treesit--explorer-tree-mode-map): Define it
as a child of special-mode-map, adding keys for button
navigation.

(cherry picked from commit 493bb2eaf1610ec950e4a2f7229d6e1f939064b9)

6 weeks agoImprove 'gethash' docstring
Stefan Kangas [Thu, 9 Jan 2025 01:54:08 +0000 (02:54 +0100)]
Improve 'gethash' docstring

* src/fns.c (Fgethash): Improve docstring.  Avoid exposing the C
identifier 'dflt' to Lisp by providing a "usage:" string.

(cherry picked from commit 40fbed939a254566f3bce50c6f16c21e5d2441ad)

6 weeks agoFix documentation of Iroquoian input methods
Kierin Bell [Wed, 8 Jan 2025 23:29:55 +0000 (18:29 -0500)]
Fix documentation of Iroquoian input methods

* lisp/leim/quail/iroquoian.el: Fix typos in Oneida endonym and in the
docstring of `haudenosaunee-postfix' about keys for inputting Onondaga
nasals.  (Bug#75448)

* etc/NEWS: Fix typo in Oneida endonym.

(cherry picked from commit bdccd4ea9e903dcabfa65cdd44d979838cae4d29)

6 weeks agoRemove support for supertabular from RefTeX
Arash Esbati [Wed, 8 Jan 2025 19:47:43 +0000 (20:47 +0100)]
Remove support for supertabular from RefTeX

* doc/misc/reftex.texi (Builtin Label Environments):
* lisp/textmodes/reftex-vars.el (reftex-label-alist-builtin)
(reftex-default-label-alist-entries): Delete entries for the
supertabular environment.  supertabular is an extension of the
normal tabular environment, and therefore doesn't contain a
caption and label.  Hence, supporting supertabular in RefTeX is
useless.

(cherry picked from commit b71225ed90ab28ad88c22f8fcd1b87c5681eb0a7)

6 weeks ago; "time stamp" also can be spelled "timestamp"
Stephen Gildea [Wed, 8 Jan 2025 18:24:55 +0000 (10:24 -0800)]
; "time stamp" also can be spelled "timestamp"

* lisp/time-stamp.el (time-stamp):
* doc/emacs/files.texi (Time Stamps): Be findable as "timestamps".

(cherry picked from commit ab3cb717a08ef8a9939e38652f25a5ef312c76ce)

6 weeks agoReplace obsolete subfigure package with subfig
Arash Esbati [Wed, 8 Jan 2025 18:12:49 +0000 (19:12 +0100)]
Replace obsolete subfigure package with subfig

* doc/misc/reftex.texi (Builtin Label Environments): Mention the
subfig LaTeX package instead of the obsolete subfigure.

* lisp/textmodes/reftex-vars.el (reftex-label-alist-builtin):
Replace obsolete subfigure entry with subfig.  Adjust the macro
names accordingly and the regexp for matching the context.
Unify the descriptions of all entries.
(reftex-default-label-alist-entries): Use subfig as well.

(cherry picked from commit 5c3deffd9f4647e0dff33ffc84a28eb6fedb3012)

6 weeks agoAdd keywords var and final to Java Mode
Arsen Arsenović [Wed, 8 Jan 2025 13:57:33 +0000 (13:57 +0000)]
Add keywords var and final to Java Mode

* lisp/progmodes/cc-langs.el (c-type-modifier-prefix-kwds): Add
java entry for final.
(c-no-type-kwds): Add java entry for var.

(cherry picked from commit 6df0e18fed3f3012d56a72f1d5f6a44f2f039ce2)

6 weeks ago; * src/lisp.h (struct Lisp_Subr): Fix comment (again).
Eli Zaretskii [Wed, 8 Jan 2025 14:06:19 +0000 (16:06 +0200)]
; * src/lisp.h (struct Lisp_Subr): Fix comment (again).

(cherry picked from commit 5eca08bb23415b983bd4a80394554019b339a715)

6 weeks ago; * src/lisp.h (struct Lisp_Subr): Fix comment.
Eli Zaretskii [Wed, 8 Jan 2025 13:43:40 +0000 (15:43 +0200)]
; * src/lisp.h (struct Lisp_Subr): Fix comment.

(cherry picked from commit a427927123cea5ddbf2f2edc1db69ec7d83f2d42)

6 weeks agosubr.el doc clarifications.
Richard Stallman [Wed, 8 Jan 2025 13:40:32 +0000 (08:40 -0500)]
subr.el doc clarifications.

* subr.el (when-let, when-let*, and-let*): Doc clarifications.
Make `when-let* doc string self-contained.

(cherry picked from commit 67be8db518828bbf8fb3efc5bf87d02e4ce6d8d6)

6 weeks agoAdd autoload cookie and doc fix
Richard Stallman [Wed, 8 Jan 2025 13:26:40 +0000 (08:26 -0500)]
Add autoload cookie and doc fix

cond-star.el (cond*): Add autoload cookie.
Doc fix.

(cherry picked from commit 2a3385ab50c2f7281812b8fb582bcdba899f5f47)

6 weeks agoFix store_function_docstring for native subrs (Bug#74966)
Pip Cet [Wed, 8 Jan 2025 12:15:30 +0000 (12:15 +0000)]
Fix store_function_docstring for native subrs (Bug#74966)

Since native subrs can have either etc/DOC indexes or vector indexes,
we use the sign bit of the 'doc' field to distinguish the two cases.

* src/comp.c (native_function_doc, make_subr): Use one's complement of
doc index for native subrs.
* src/doc.c (store_function_docstring): Add assertion.
* src/lisp.h (struct Lisp_Subr): Document 'doc' sign bit.

(cherry picked from commit ac52993b996927031a6913927e1028de47be4312)

6 weeks agoAuto-adapt completion preview background color
Eshel Yaron [Thu, 9 Jan 2025 11:22:03 +0000 (12:22 +0100)]
Auto-adapt completion preview background color

Teach Completion Preview mode to automatically remap its
faces such that the background color of the preview overlay
matches the background color of the buffer text that is
being completed.  Crucially, this resolves an issue where
the preview overlay didn't look nice with hl-line-mode on.

Also see related discussion in bug#71282.

* lisp/completion-preview.el
(completion-preview-adapt-background-color): New option.
(completion-preview--bg-color): New function.
(completion-preview--face-remap-cookie-jar): New variable.
(completion-preview--make-overlay): Use them.

6 weeks agoFix some compilation warnings
Eshel Yaron [Thu, 9 Jan 2025 10:55:00 +0000 (11:55 +0100)]
Fix some compilation warnings

6 weeks ago; Fix indentation in src/nsterm.h
Stefan Kangas [Wed, 8 Jan 2025 06:29:33 +0000 (07:29 +0100)]
; Fix indentation in src/nsterm.h

Reduce the diff between master and scratch/igc.

(cherry picked from commit 631f43d2bbe403e48d63d963281f1d948dee5263)

6 weeks agoMove define_error declaration and docstring
Stefan Kangas [Wed, 8 Jan 2025 05:39:22 +0000 (06:39 +0100)]
Move define_error declaration and docstring

* src/lisp.h (define_error): Move declaration to its proper place, make
external, and move its docstring...
* src/eval.c (define_error): ...to its function definition.

(cherry picked from commit 2ec7396d5d190302c16b8d9bd7da14ac9381a21e)

6 weeks ago; Fix indentation
Stefan Kangas [Wed, 8 Jan 2025 04:57:27 +0000 (05:57 +0100)]
; Fix indentation

(cherry picked from commit 9811f80d252ae14dd655fce031fee5ffa95b689e)

6 weeks ago; Mark ERC keep-place-indicator test as :unstable
F. Jason Park [Wed, 8 Jan 2025 01:17:50 +0000 (17:17 -0800)]
; Mark ERC keep-place-indicator test as :unstable

* test/lisp/erc/erc-scenarios-keep-place-indicator.el
(erc-scenarios-keep-place-indicator--follow): Don't run on EMBA pending
investigation of test timing out.

(cherry picked from commit 601a1f1f2797488ea40292c27945fbfbe1bc3241)

6 weeks agoImprove use of Flyspell's API in erc-spelling
F. Jason Park [Sun, 5 Jan 2025 23:59:46 +0000 (15:59 -0800)]
Improve use of Flyspell's API in erc-spelling

* etc/ERC-NEWS: Announce deprecation of `erc-spelling-flyspell-verify'
and `erc-spelling-unhighlight-word'.  A slight behavioral change not
worth mentioning is that, previously, ERC arranged for Flyspell to
ignore any word immediately following a forward slash anywhere in the
prompt input, even those for which the slash served as mere
punctuation (a "stroke"), as in "something/misspelt."  As of this
change, Flyspell only unconditionally exempts an initial slash-prepended
word, like "tableflip" in "ERC> /tableflip", and checks all others that
follow against known slash commands.
* lisp/erc/erc-spelling.el: Change top-level assignment of `erc-mode'
symbol-property `flyspell-mode-predicate' from
`erc-spelling-flyspell-verify' to `erc-spelling--flyspell-input-p'.
(erc-spelling-mode, erc-spelling-disable): Remove local member from
`flyspell-incorrect-hook'.
(erc-spelling-init): Add `erc-spelling--flyspell-check' to
`flyspell-incorrect-hook' locally.  Don't bother explicitly setting
`flyspell-generic-check-word-predicate' because Flyspell already does
that for clients using the `flyspell-mode-predicte' interface.
(erc-spelling-flyspell-verify, erc-spelling-unhighlight-word): Mark
obsolete.
(erc-spelling--flyspell-check, erc-spelling--flyspell-input-p): New
functions, essentially the two halves of a reworked and bifurcated
`erc-spelling-flyspell-verify'.  Though used as a predicate, the first
is not named as such because it performs side effects.
* test/lisp/erc/erc-scenarios-spelling.el: New file.
* test/lisp/erc/resources/spelling/auto-correct.eld: New file.
(Bug#75327)

(cherry picked from commit f9ecde75bbcd315557481585a1146f976f719504)

6 weeks agoFix regression in erc-nicks involving color pools
F. Jason Park [Mon, 6 Jan 2025 00:58:50 +0000 (16:58 -0800)]
Fix regression in erc-nicks involving color pools

* lisp/erc/erc-nicks.el (erc-nicks-colors): Tweak doc.
(erc-nicks--create-pool-function): On graphic displays, set value to
`erc-nicks--create-culled-pool', the original default.  This fixes a bug
in which ERC mapped all pool members to a primary color, thus excluding
the bulk of them.  Thanks to Trevor Arjeski for discovering it.
(erc-nicks--create-coerced-pool): Mention the text-terminal-only
requirement in doc.
(erc-nicks-refresh): Improve doc.
* test/lisp/erc/erc-nicks-tests.el (erc-nicks-tests--track-faces):
Enable `erc-track-mode' prior to running body.

(cherry picked from commit c266c22b418541714889e85831de93c10a3c3fde)

6 weeks agoUpdate RefTeX manual
Arash Esbati [Tue, 7 Jan 2025 21:02:13 +0000 (22:02 +0100)]
Update RefTeX manual

* doc/misc/reftex.texi: (Builtin Label Environments): Mention
supported LaTeX packages ctable, minted and listings.
(Reference Styles): Update the supported reference styles and the
corresponding macros.
(Citation Styles): Mention support for biblatex package.
(Language Support): Describe usage of non-ASCII characters in the
LaTeX \label definition.
(Style Files): Mention biblatex.el as well.
(Options - Defining Label Environments): Add entry for
`reftex-label-regexps' option.
Other minor improvements.

(cherry picked from commit 8d687695c528e4edb04cca5602470d349e333258)

6 weeks agobibtex-braced-string-syntax-table: fix bug #68477
Roland Winkler [Tue, 7 Jan 2025 17:56:48 +0000 (11:56 -0600)]
bibtex-braced-string-syntax-table: fix bug #68477

* lisp/textmodes/bibtex.el (bibtex-braced-string-syntax-table):
Give all parentheses the syntax punctuation so that we do not
choke because of unbalanced parentheses other than braces (bug

(cherry picked from commit 1ef7deb2f723f9129135e8676366d79eee83e870)

6 weeks agoPrefer `%s` format over `%S` for buffers
Juri Linkov [Tue, 7 Jan 2025 18:44:09 +0000 (20:44 +0200)]
Prefer `%s` format over `%S` for buffers

This restores the `%s` format` for buffers
after fba3c7ff3f68f05d32541440e0a22ec667c0ad66.

* lisp/gnus/nnimap.el (nnimap-make-process-buffer):
* lisp/gnus/nntp.el (nntp-make-process-buffer):
* lisp/simple.el (next-error-internal):
Prefer more user-readable `%s` format over `%S` for buffers.

(cherry picked from commit 4bf0f6655142b9e216325d051943b7b7ca4d2cd7)

6 weeks ago; Skip commit d5c3173366354b94dc9a421caaf8b66015038998
Eshel Yaron [Wed, 8 Jan 2025 08:57:46 +0000 (09:57 +0100)]
; Skip commit d5c3173366354b94dc9a421caaf8b66015038998

6 weeks ago(calendar-read-date): Remove redundant buglet-binding
Eshel Yaron [Wed, 8 Jan 2025 08:57:08 +0000 (09:57 +0100)]
(calendar-read-date): Remove redundant buglet-binding

6 weeks agoImprove docstring of image-dired-show-all-from-dir
Stefan Kangas [Tue, 7 Jan 2025 07:15:41 +0000 (08:15 +0100)]
Improve docstring of image-dired-show-all-from-dir

* lisp/image/image-dired.el (image-dired-show-all-from-dir):
Improve docstring.

(cherry picked from commit e41a7d8127423307018f369e8739319f1de9b3fa)

6 weeks agoimage-dired-show-all-from-dir: Reuse dired's default-directory
Sacha Chua [Thu, 2 Jan 2025 19:52:28 +0000 (14:52 -0500)]
image-dired-show-all-from-dir: Reuse dired's default-directory

* lisp/image/image-dired.el (image-dired-show-all-from-dir): Delegate
figuring out default-directory to dired.  This handles the case where
image-dired is called with a cons cell that has a directory in the car
and a list of files in the cdr, which dired can handle, and therefore
allows image-dired-show-all-from-dir to show an arbitrary list of
images.  It also means that image-dired-show-all-from-dir can handle
wildcards.
Ref: https://lists.gnu.org/r/emacs-devel/2025-01/msg00048.html

(cherry picked from commit d4503ccc2769035184e474542fc6c1df7e908ae0)

6 weeks ago; Silence byte-compiler
Stefan Kangas [Mon, 6 Jan 2025 19:06:49 +0000 (20:06 +0100)]
; Silence byte-compiler

(cherry picked from commit d98516a27b9ff77e1106ae5801c7ca8802eaa656)

6 weeks agoNew test for finding C header files
Stefan Kangas [Mon, 6 Jan 2025 19:03:48 +0000 (20:03 +0100)]
New test for finding C header files

The assumption here is that if there is a C compiler, there is also a
math.h header somewhere.  The test should fail if we can't find that
file, and hopefully that will provoke users to create bug reports.

Let's see how far we can take this idea; we might have to give up and
disable the test in some configurations.  But doing that now seems
premature, even if we had a list of affected systems (which we don't).

* lisp/man.el (man--find-header-file): Factor out new function...
(Man-view-header-file): ...from here.
* test/lisp/man-tests.el (man-tests-find-header-file): New test.

(cherry picked from commit 15d940ad1fc3ca3a72c23d9873a32a1a68d0cb05)

6 weeks agoFix finding C headers with clang
Stefan Kangas [Mon, 6 Jan 2025 11:29:21 +0000 (12:29 +0100)]
Fix finding C headers with clang

This fixes following "#include" references in 'M-x man' buffers, and
using ffap, both on macOS machines, and on systems where for some reason
clang is available but gcc is not.

* lisp/subr.el (internal--c-header-file-path): Fix finding C
headers with clang.
(internal--gcc-is-clang-p): New function factored out from...
* lisp/emacs-lisp/ert-x.el (ert-gcc-is-clang-p): ...here.
* lisp/man.el (Man-header-file-path): Bump :version tag.

* test/lisp/subr-tests.el
(subr-tests-internal--c-header-file-path/clang-mocked): New test.

(cherry picked from commit 3dc3dbc2e38340aba7f818eab21abfd93a132175)

6 weeks agoNew function internal--c-header-file-path
Stefan Kangas [Mon, 6 Jan 2025 09:08:01 +0000 (10:08 +0100)]
New function internal--c-header-file-path

It is not clear to me where this function properly belongs, so let's put
it in subr.el for now.  This avoids code duplication without introducing
a dependency between man and ffap.  It can always be moved later.

* lisp/subr.el (internal--c-header-file-path): New function.
* lisp/man.el (Man-header-file-path):
* lisp/ffap.el (ffap-c-path): Use above new function.

* test/lisp/subr-tests.el (ert-x): Require.
(subr-tests-internal--c-header-file-path)
(subr-tests-internal--c-header-file-path/gcc-mocked): New tests.

(cherry picked from commit 888ff3755d499ca74f9d8cdf9e4d2c7dc0331236)

6 weeks agotime-stamp: lower- and title-case weekday and month names
Stephen Gildea [Mon, 6 Jan 2025 19:00:07 +0000 (11:00 -0800)]
time-stamp: lower- and title-case weekday and month names

* lisp/time-stamp.el (time-stamp-string-preprocess): new formats for
lowercase weekday name, lowercase month name, and system name
* test/lisp/time-stamp.el: new tests
(formatz-generate-tests): Better doc strings for generated test fns.

(cherry picked from commit 3de5fcd0a60b01639276f360561037403f8d7389)

6 weeks ago* lisp/treesit.el: Use forward-list-default-function for C-M-n
Juri Linkov [Mon, 6 Jan 2025 18:02:18 +0000 (20:02 +0200)]
* lisp/treesit.el: Use forward-list-default-function for C-M-n

(treesit--forward-list-with-default): New internal function
with body from 'treesit-forward-sexp-list' (bug#73404).
(treesit-forward-sexp-list, treesit-forward-list):
Replace body with a call to the shared implementation
'treesit--forward-list-with-default' using the
corresponding default function as an argument.

(cherry picked from commit 997b9b8d38fd8a770fb1e0b3c85abae2c0d6cdd3)

6 weeks agoEglot: new eglot--format to fix quote substitution woes (bug#73472)
João Távora [Mon, 6 Jan 2025 10:47:13 +0000 (10:47 +0000)]
Eglot: new eglot--format to fix quote substitution woes (bug#73472)

* lisp/progmodes/eglot.el (eglot--guess-contact): Use eglot--format.
(eglot--format): New helper.
(eglot--error, eglot--message, eglot--warn)
(eglot--apply-text-edits, eglot-rename): Use eglot--format.

(cherry picked from commit c3ec174a6c2d1118e82aecceb203634f7b567e20)

6 weeks agoImprove integer file mode options docstrings
Stefan Kangas [Mon, 6 Jan 2025 10:07:09 +0000 (11:07 +0100)]
Improve integer file mode options docstrings

* lisp/eshell/esh-util.el (eshell-private-file-modes)
(eshell-private-directory-modes):
* lisp/gnus/mail-source.el (mail-source-default-file-modes):
* lisp/printing.el (pr-file-modes):
* lisp/gnus/mm-decode.el (mm-attachment-file-modes):
* lisp/gnus/nnmail.el (nnmail-default-file-modes):
* lisp/recentf.el (recentf-save-file-modes):
* lisp/vc/ediff-init.el (ediff-temp-file-mode):
* lisp/vc/emerge.el (emerge-temp-file-mode): Better document the fact
that these are integer and not octal values.

* lisp/epg.el (epg--start):
* lisp/emacs-lisp/package.el (package-import-keyring): Use octal values
to make the code more self-documenting.

(cherry picked from commit da5df90fadbec9db692ff34abcd28ce5a5b29c2a)