]> git.eshelyaron.com Git - emacs.git/log
emacs.git
7 weeks agoGo back to remapping 'header-line' face
Eshel Yaron [Sun, 5 Jan 2025 12:16:32 +0000 (13:16 +0100)]
Go back to remapping 'header-line' face

7 weeks agoAllow to remap 'header-line' face
Eli Zaretskii [Sun, 5 Jan 2025 10:40:39 +0000 (12:40 +0200)]
Allow to remap 'header-line' face

* src/xfaces.c (realize_basic_faces): Bind 'face-remapping-alist'
to nil while realizing basic faces.
(lookup_basic_face): Force realizing a face whose 'inherit'
attribute is non-nil.  (Bug#73862)

(cherry picked from commit dc41ddb4d6bd7dc45cb9c37bc89c8c08f256baec)

7 weeks ago; Fix warnings in a tty-only build on MS-Windows
Eli Zaretskii [Sun, 5 Jan 2025 09:03:07 +0000 (11:03 +0200)]
; Fix warnings in a tty-only build on MS-Windows

* lisp/org/org.el (dnd-open-local-file):
* lisp/dired.el (tool-bar--image-expression):
* lisp/term/android-win.el (x-handle-args): Declare.
* lisp/w32-fns.el (w32-system-shells):
(w32-allow-system-shell):
* lisp/net/shr.el (image-scaling-factor):
* lisp/net/eww.el (image-scaling-factor):
* lisp/image.el (image-scaling-factor): Defvar.
(image-recompute-map-p): Move to before the first use.
Reported by Angelo Graziosi <angelo.g0@libero.it>.

(cherry picked from commit 7eb8596ff5f1964f91664a6b7cac3199a5af5ba7)

7 weeks ago* lisp/treesit.el: Fix treesit-show-paren-data (bug#75198)
Juri Linkov [Sun, 5 Jan 2025 07:43:22 +0000 (09:43 +0200)]
* lisp/treesit.el: Fix treesit-show-paren-data (bug#75198)

(treesit-show-paren-data--categorize): Use 'treesit-thing-defined-p'
to check if the thing exists for the language at POS before calling
'treesit-parent-until' that raises an error for an undefined thing.
(treesit-thing-defined-p): Add the alias signature to the docstring.

(cherry picked from commit 47ff8ab307da2a1ccfe3e701db871f47c1d3b380)

7 weeks agoFix setup of coding-systems on MS-Windows
Eli Zaretskii [Sun, 5 Jan 2025 05:56:27 +0000 (07:56 +0200)]
Fix setup of coding-systems on MS-Windows

* src/emacs.c (main) [HAVE_PDUMPER] [WINDOWSNT]: Call
'w32_init_file_name_codepage' again after loading the pdumper
file.
* src/w32.c (w32_init_file_name_codepage) [HAVE_PDUMPER]:
Reinitialize additional variables.  (Bug#75207)

(cherry picked from commit cc5cd4de93d1e5ba205cbf0c370aef4559bc342b)

7 weeks agoDelete duplicate note on ancient platforms
Stefan Kangas [Sun, 5 Jan 2025 04:26:52 +0000 (05:26 +0100)]
Delete duplicate note on ancient platforms

* etc/MACHINES: Delete note on platforms removed in Emacs 23.1 from the
introduction, since it is duplicated again at the end of the file.

(cherry picked from commit 441788e06d87c8cbd5efc9f2e00ba9072a824c55)

7 weeks ago; Update lisp/ldef-boot.el
Eshel Yaron [Sun, 5 Jan 2025 11:49:17 +0000 (12:49 +0100)]
; Update lisp/ldef-boot.el

7 weeks agoFix tsx-ts-mode syntax propertize function (bug#73978)
Yuan Fu [Sat, 4 Jan 2025 19:53:39 +0000 (11:53 -0800)]
Fix tsx-ts-mode syntax propertize function (bug#73978)

* lisp/progmodes/typescript-ts-mode.el:
(tsx-ts--syntax-propertize-captures): Apply punctuation syntax
on balanced pairs, instead of using string syntax.

(cherry picked from commit 87f83f1c1771ad3ca4d84bf2fc7a337e241952be)

7 weeks ago* lisp/treesit.el (treesit-transpose-sexps): Improve (bug#60655).
Juri Linkov [Sat, 4 Jan 2025 18:30:07 +0000 (20:30 +0200)]
* lisp/treesit.el (treesit-transpose-sexps): Improve (bug#60655).

Use 'treesit-thing-next' and 'treesit-thing-prev' with
'treesit-node-named' to transpose named siblings that leaves the right
punctuation in anonymous nodes between named siblings.  Fall back
to 'transpose-sexps-default-function' inside strings and comments.
(treesit-node-named): New helper function.

(cherry picked from commit d9a0e781978725953ab44556f5222b1be32df7a7)

7 weeks agoUpdate doc string of 'insert'
Ulrich Müller [Sat, 4 Jan 2025 09:37:59 +0000 (10:37 +0100)]
Update doc string of 'insert'

* src/editfns.c (Finsert): Mention 'decode-coding-string' instead
of the obsolete 'string-as-multibyte' in doc string.  (Bug#75345)

(cherry picked from commit 6468c3f7a74133b130d15172d770c8b7eebfeac5)

7 weeks agoDon't always enable xterm-mouse-mode (bug#74833)
Jared Finder [Thu, 2 Jan 2025 06:36:25 +0000 (22:36 -0800)]
Don't always enable xterm-mouse-mode (bug#74833)

Many terminals set the environment variable TERM to "xterm" even when they
don't support all functionality in xterm.  This means that enabling
xterm-mouse-mode can break critical editing workflows like copy/paste.  This
adds checks for the specific terminal Emacs is run in and only enables
xterm-mouse-mode on terminals knows to support all critical editing workflows.

* etc/NEWS: Update announcement
* lisp/term/xterm.el (xterm--auto-xt-mouse-allowed-names)
(xterm--auto-xt-mouse-allowed-types): New variables to control
what terminals automatically enable xterm-mouse-mode.
(xterm--report-background-handler, xterm--version-handler): Use
xterm--read-string.
(xterm--read-string, xterm--query-name-and-version): New
function.
(xterm--init): Check what terminal is running and if
xterm-mouse-mode was manually called.
* lisp/xt-mouse.el (xterm-mouse-mode-called): New variable.
(xterm-mouse-mode): Set xterm-mouse-mode-called.  Mention
automatic call by xterm--init.  Delete outdated comment text.

(cherry picked from commit ba6429081a8560979136cf6fa40ff3f3c4859a53)

7 weeks agoUpdate eln-cache when --init-directory is used
Eli Zaretskii [Sat, 4 Jan 2025 12:44:10 +0000 (14:44 +0200)]
Update eln-cache when --init-directory is used

* lisp/startup.el (normal-top-level): Update eln-cache after
'user-emacs-directory' is set by --init-directory.  Patch by
Jordan Isaacs <jordan@snowytrees.dev>.  (Bug#75022)

(cherry picked from commit b63ba892f9b28062a4ece9db7e4abd79a88ceea6)

7 weeks ago* lisp/vc/ediff-util.el: Loop the ediff-session-registry instead of buffers
Lin Sun [Sun, 29 Dec 2024 06:55:01 +0000 (06:55 +0000)]
* lisp/vc/ediff-util.el: Loop the ediff-session-registry instead of buffers

This avoids aborting the loop if an error happens in some buffer.
(Bug#74881)

(cherry picked from commit 5fe7f86367c95dbc65dfed5acb34f8dca2b40fe9)

7 weeks agoUse `keymap*-set' over `global-set-key'/`define-key' in elisp intro
Hong Xu [Thu, 19 Dec 2024 22:33:35 +0000 (14:33 -0800)]
Use `keymap*-set' over `global-set-key'/`define-key' in elisp intro

* doc/lispintro/emacs-lisp-intro.texi (Key Bindings): Since
`global-set-key' and `define-key' are considered legacy, we encourage
`keymap-global-set' and `keymap-set' now.  (Bug#74999)

(cherry picked from commit 6d8c3c0cbe42c4b288679456f0eec9a78593e2a5)

7 weeks agoFix documentation and prompt in 'package-isolate'
Eli Zaretskii [Sat, 4 Jan 2025 12:18:54 +0000 (14:18 +0200)]
Fix documentation and prompt in 'package-isolate'

* lisp/emacs-lisp/package.el (package-isolate): Fix doc string and
the prompt.  (Bug#75163)

(cherry picked from commit 4b2bb63b7ac386daabb0bbd2dc00fb542a9bcc21)

7 weeks agoFix mouse clicks on characters with parenthesis syntax
Eli Zaretskii [Sat, 4 Jan 2025 10:51:40 +0000 (12:51 +0200)]
Fix mouse clicks on characters with parenthesis syntax

* lisp/mouse.el (context-menu-region, mouse-skip-word)
(mouse-start-end): Use 'syntax-after' instead of 'char-syntax', to
pay attention to 'syntax-table' text properties.  (Bug#74415)

(cherry picked from commit 742b792175bd7149b1401a45aae1af83798bf188)

7 weeks agoImprove doxygen font-lock rules in c-ts-mode (bug#75012)
Filippo Argiolas [Thu, 26 Dec 2024 07:06:55 +0000 (08:06 +0100)]
Improve doxygen font-lock rules in c-ts-mode (bug#75012)

And also c++-ts-mode.

* lisp/progmodes/c-ts-common.el:
(c-ts-mode-doxygen-comment-font-lock-settings): Add rules for type,
storageclass and note/warning/error tags.

Copyright-paperwork-exempt: yes
(cherry picked from commit 752ba27425db5332fc18e962117f24b9300ccf78)

7 weeks ago; Minor change in treesit-admin--generate-compatibility-report
Yuan Fu [Sat, 4 Jan 2025 07:34:50 +0000 (23:34 -0800)]
; Minor change in treesit-admin--generate-compatibility-report

* admin/tree-sitter/treesit-admin.el:
(treesit-admin--generate-compatibility-report): Use th for
languages.

(cherry picked from commit a9c1620809e1613606829585a3a733366256cdd0)

7 weeks ago; Minor rephrasing in treesit-admin--verify-major-mode-queries
Yuan Fu [Mon, 30 Dec 2024 08:28:48 +0000 (00:28 -0800)]
; Minor rephrasing in treesit-admin--verify-major-mode-queries

* admin/tree-sitter/treesit-admin.el:
(treesit-admin--verify-major-mode-queries): Minor rephrase.

(cherry picked from commit d32f3eed991b0fa8def484787d95852fd9c10972)

7 weeks ago; Fix typo in treesit-explore-mode
Yuan Fu [Sat, 4 Jan 2025 05:39:32 +0000 (21:39 -0800)]
; Fix typo in treesit-explore-mode

* lisp/treesit.el (treesit-explore-mode): We added the hook to
kill-buffer-hook, so make sure to remove it from
kill-buffer-hook, not post-command-hook.

(cherry picked from commit 55f43f5b220ed3cc49141257918e51e403dd85ac)

7 weeks agoAutomatically redraw frames for filtered faces
Daniel Colascione [Sat, 4 Jan 2025 04:36:55 +0000 (23:36 -0500)]
Automatically redraw frames for filtered faces

Automatically redraw frames when we detect that a window
parameter used in a face filter is changed.  (Bug#75291)

* src/window.c (Fset_window_parameter): redraw window, actually
whole frame in this implementation, on face-relevant parameter
change
(syms_of_window): add window_auto_redraw_on_parameter_change
* src/xfaces.c (evaluate_face_filter): record properties

(cherry picked from commit b828d36deded145ebbd3419f618cf52f7862c4c8)

7 weeks agoExtract new function man--maybe-fontify-manpage
Stefan Kangas [Fri, 3 Jan 2025 21:06:43 +0000 (22:06 +0100)]
Extract new function man--maybe-fontify-manpage

* lisp/man.el (man--maybe-fontify-manpage): Extract function from...
(Man-getpage-in-background, Man-update-manpage)
(Man-bgproc-filter): ...here.

(cherry picked from commit 8e9317a1de66314dee96266863827c00cdefde2f)

7 weeks ago; Fix indentation
Stefan Kangas [Fri, 3 Jan 2025 20:32:16 +0000 (21:32 +0100)]
; Fix indentation

(cherry picked from commit e825502ded0d526716e0f22704f7ebef7720deb5)

7 weeks agoUpdate to Transient v0.8.3-2-gf0478b29
Jonas Bernoulli [Fri, 3 Jan 2025 18:51:08 +0000 (19:51 +0100)]
Update to Transient v0.8.3-2-gf0478b29

(cherry picked from commit 58df9e272b9a13f954990af9da66c11e5d141a05)

7 weeks ago(mpc-cmd-find): Try and fix bug#41493
Stefan Monnier [Fri, 3 Jan 2025 18:24:26 +0000 (13:24 -0500)]
(mpc-cmd-find): Try and fix bug#41493

* lisp/mpc.el (mpc--proc-alist-to-alists): Don't presume that we
have either `directory` or `file` entries, instead allow both at
the same time.
(mpc-cmd-find) <Directory>: Don't presume that `directory`
entries have no associated data, so throw them away only after
having parsed them with `mpc--proc-alist-to-alists`.

(cherry picked from commit 3740d9c83825546e0fbde05492777fff221e9fbd)

7 weeks agoAdd more text-based browser alternatives
Stefan Kangas [Fri, 3 Jan 2025 16:32:58 +0000 (17:32 +0100)]
Add more text-based browser alternatives

* lisp/net/browse-url.el (browse-url-text-browser): Add more
alternatives.

(cherry picked from commit e0b4e9ece907ca86410835d2cd374917830eabae)

7 weeks agoUpdate fontification for attribute values in heex-ts-mode
Wilhelm Kirschbaum [Mon, 30 Dec 2024 10:56:40 +0000 (12:56 +0200)]
Update fontification for attribute values in heex-ts-mode

Attribute values are strings as with html-ts-mode.

* lisp/progmodes/heex-ts-mode.el (heex-ts--font-lock-settings):
Change to attribute value to @font-lock-string-face.  (Bug#75192)

(cherry picked from commit 921f454f5087f16d9afc5574525baa92df91b8d0)

7 weeks agoAdd expression handling to heex-ts-mode
Wilhelm Kirschbaum [Mon, 30 Dec 2024 10:45:08 +0000 (12:45 +0200)]
Add expression handling to heex-ts-mode

On the latest update of the grammar expressions were added and won't be
seen as directives anymore.

* lisp/progmodes/heex-ts-mode.el
(heex-ts--sexp-regexp): Match on expression as well.
(heex-ts--indent-rules): Indent on expression end.  (Bug#75191)
* test/lisp/progmodes/heex-ts-mode-resources/indent.erts: Add expression
indent test.

(cherry picked from commit ae2589ea7a59ac3bde19b025ba4a7968c77208d7)

7 weeks ago; * etc/NEWS: Document change of 'make-cursor-line-fully-visible'.
Eli Zaretskii [Fri, 3 Jan 2025 08:27:46 +0000 (10:27 +0200)]
; * etc/NEWS: Document change of 'make-cursor-line-fully-visible'.

Bug#65214, bug#74430.

(cherry picked from commit 0cacf8063910ac2409641109ec7b3af24437fd2c)

7 weeks agoImprove temporary file handling in browse-url
Stefan Kangas [Fri, 3 Jan 2025 06:50:07 +0000 (07:50 +0100)]
Improve temporary file handling in browse-url

* lisp/net/browse-url.el (browse-url-delete-temp-file): Don't add
to kill-buffer-hook on top level.
(browse-url--temp-file-setup): New macro to set 'kill-buffer-hook'
buffer-locally to above function when creating a temporary file.  Use
stricter permissions to protect user privacy on multi-user systems.
(browse-url-of-file, browse-url-of-buffer): Use above new macro.

(browse-url-delete-temp-file): Simplify calling convention by removing
unused argument.

(cherry picked from commit 279a7d950ffff1b4f4a420848502a018b3998ee1)

7 weeks ago; * exec/configure.ac (config-mips.m4): Fix typo.
Po Lu [Fri, 3 Jan 2025 05:04:05 +0000 (13:04 +0800)]
; * exec/configure.ac (config-mips.m4): Fix typo.

(cherry picked from commit b683280f87bb039a7fcf41d03cf1766e980fa378)

7 weeks agoRemove gnudoit support from browse-url.el
Stefan Kangas [Fri, 3 Jan 2025 03:08:44 +0000 (04:08 +0100)]
Remove gnudoit support from browse-url.el

* lisp/net/browse-url.el (browse-url-gnudoit-program)
(browse-url-gnudoit-args, browse-url-w3-gnudoit): Remove support
for gnudoit, obsolete since Emacs 25.1.

(cherry picked from commit 597161fe1e4a62bd8a2c7b80b7219529ec5bc16d)

7 weeks ago* lisp/man.el (Man-mode): Improve docstring.
Stefan Kangas [Fri, 3 Jan 2025 02:36:38 +0000 (03:36 +0100)]
* lisp/man.el (Man-mode): Improve docstring.

(cherry picked from commit f47a29da5c4dd490a6de78da84f0fc272bb82993)

7 weeks ago; Skip commit 004a48b3d46af169cbc1c9a690de7ad71483862c
Eshel Yaron [Sat, 4 Jan 2025 20:55:45 +0000 (21:55 +0100)]
; Skip commit 004a48b3d46af169cbc1c9a690de7ad71483862c

7 weeks agoNew defgroup man-faces
Stefan Kangas [Thu, 2 Jan 2025 20:33:52 +0000 (21:33 +0100)]
New defgroup man-faces

* lisp/man.el: Delete redundant option :group specifiers.
(man-imenu-title): New defgroup.
(Man-overstrike, Man-underline, Man-reverse): Add faces to above
new defgroup.

(cherry picked from commit 58c95e9bab21b313661503f0499f14e1e0ad038d)

7 weeks agoRespect 'manual-program' variable
Stefan Kangas [Thu, 2 Jan 2025 19:19:24 +0000 (20:19 +0100)]
Respect 'manual-program' variable

* lisp/man.el (Man-man-k-flags): Respect 'manual-program'
variable.

(cherry picked from commit ca79916179ffb5ddc801e1ccb12c5ff72f6516d8)

7 weeks ago(describe-variable): Fix bug#73872
Stefan Monnier [Thu, 2 Jan 2025 19:58:10 +0000 (14:58 -0500)]
(describe-variable): Fix bug#73872

* lisp/help-fns.el (describe-variable): Put a `syntax-table` property
on the printed value for better navigation.  Remove `set-syntax-table`
since `lisp-data-mode` already did it.
(describe-variable): Remove `set-syntax-table`, not needed any more.

* lisp/help-mode.el (help-mode-syntax-table): `;` shouldn't start a comment.
(help-make-xrefs): Use `with-syntax-table`.

(cherry picked from commit 8f81c2b02ff98a69c7c5025881063ae85ee5b1d3)

7 weeks agoadmin/merge-gnulib now warns if module lists change
Paul Eggert [Thu, 2 Jan 2025 19:29:26 +0000 (11:29 -0800)]
admin/merge-gnulib now warns if module lists change

From suggestions by Eli Zaretski and Stefan Kangas in:
https://lists.gnu.org/r/emacs-devel/2025-01/msg00036.html
https://lists.gnu.org/r/emacs-devel/2025-01/msg00037.html
* admin/merge-gnulib: For style consistency,
prefer ‘[ EXPR ]’ to ‘test EXPR’ and prefer -e to -f.
Fix bug that forgot to clean lib directory if it’s ./lib.
Check for lib/gnulib.mk.in, which we used directly, not ‘configure’.
(LC_ALL): Set to C.
(autogen): New function, to make it clearer to user when
commands are operating in some other directory.
(get_module_list): New function.
(old_modules, new_modules): New vars.
If they differ, issue a warning.

(cherry picked from commit f65520cad46273967da2343feeb2201363c190e0)

7 weeks agoPrefer `%S` format over `%s` for non strings
Stefan Monnier [Thu, 2 Jan 2025 19:29:49 +0000 (14:29 -0500)]
Prefer `%S` format over `%s` for non strings

* lisp/reveal.el (reveal-open-new-overlays, reveal-close-old-overlays):
* lisp/gnus/nnimap.el (nnimap-header-parameters)
(nnimap-make-process-buffer):
* lisp/gnus/nntp.el (nntp-make-process-buffer):
* lisp/progmodes/flymake.el (flymake--disable-backend):
* lisp/simple.el (next-error-internal):
Prefer `%S` format over `%s` for non strings.

(cherry picked from commit fba3c7ff3f68f05d32541440e0a22ec667c0ad66)

7 weeks ago; Skip commit cd6e2a082854fb3e73ad98d1d2b945ae482ca4ac
Eshel Yaron [Sat, 4 Jan 2025 20:43:18 +0000 (21:43 +0100)]
; Skip commit cd6e2a082854fb3e73ad98d1d2b945ae482ca4ac

7 weeks ago; Skip commit 7fa975adbce3f2ce4ba40ea52110b992a52262b6
Eshel Yaron [Sat, 4 Jan 2025 20:43:09 +0000 (21:43 +0100)]
; Skip commit 7fa975adbce3f2ce4ba40ea52110b992a52262b6

7 weeks ago[project-vc]: Make project-buffers more consistent with project-files
Dmitry Gutov [Thu, 2 Jan 2025 16:58:40 +0000 (18:58 +0200)]
[project-vc]: Make project-buffers more consistent with project-files

* lisp/progmodes/project.el (project-buffers):
Catch 'file-missing' error to continue anyway if .git does not
exist (bug#74826).

(cherry picked from commit afe776051ec84c4bb37fc20b8dcfff3b1c81018e)

7 weeks ago(elisp-flymake-byte-compile): Improve UX with `debug-on-error`
Stefan Monnier [Thu, 2 Jan 2025 15:51:38 +0000 (10:51 -0500)]
(elisp-flymake-byte-compile): Improve UX with `debug-on-error`

* lisp/progmodes/elisp-mode.el (elisp-flymake-byte-compile): Don't jump
into the debugger just because the content is not trusted.

(cherry picked from commit a720458fdd0283e3b7457632070504ff8962be86)

7 weeks agoFix NEWS entries for BibTeX mode.
Roland Winkler [Thu, 2 Jan 2025 15:11:04 +0000 (09:11 -0600)]
Fix NEWS entries for BibTeX mode.

(cherry picked from commit 2a5725b99a7b8034ac51b603c1bd9c8099e4adb0)

7 weeks ago; Fix the MS-DOS build
Po Lu [Thu, 2 Jan 2025 12:29:12 +0000 (20:29 +0800)]
; Fix the MS-DOS build

* msdos/sedlibmk.inp: Adapt to new GNulib module names.

(cherry picked from commit 1bc8412ecbf58a16efc4e9ddb0d46ef25ce7c14f)

7 weeks agoFix volatile Android build
Po Lu [Thu, 2 Jan 2025 12:26:43 +0000 (20:26 +0800)]
Fix volatile Android build

* exec/Makefile.in (config-mips.m4): Call config.status in
builddir.

(cherry picked from commit be9577d4a1e0308a066f50140662a1f04b7a6c16)

7 weeks agoAdjust nt/gnulib-cfg.mk to recent Gnulib import
Eli Zaretskii [Thu, 2 Jan 2025 07:44:44 +0000 (09:44 +0200)]
Adjust nt/gnulib-cfg.mk to recent Gnulib import

* nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_dirent-h)
(OMIT_GNULIB_MODULE_inttypes-h-incomplete)
(OMIT_GNULIB_MODULE_stdio-h, OMIT_GNULIB_MODULE_stdlib-h)
(OMIT_GNULIB_MODULE_sys_select-h, OMIT_GNULIB_MODULE_sys_stat-h)
(OMIT_GNULIB_MODULE_sys_time-h, OMIT_GNULIB_MODULE_sys_types-h)
(OMIT_GNULIB_MODULE_unistd-h): Rename to follow Gnulib renaming
the modules from "FOO" to "FOO-h".

(cherry picked from commit d0b9d35fbf733adf747df7eb55d4e9f35b53bdbe)

7 weeks ago; Fix recent changes in bibtex.el documentation
Eli Zaretskii [Thu, 2 Jan 2025 07:44:09 +0000 (09:44 +0200)]
; Fix recent changes in bibtex.el documentation

* lisp/textmodes/bibtex.el (bibtex-BibTeX-entry-alist)
(bibtex-BibTeX-field-alist): Doc fixes.

* etc/NEWS: Fix format of a new bibtex entry.

(cherry picked from commit b082a8d9510a0fbbc0b92538e87252e6786b9e61)

7 weeks agoProvide more flexibility for definition of BibTeX entries.
Roland Winkler [Thu, 2 Jan 2025 05:09:58 +0000 (23:09 -0600)]
Provide more flexibility for definition of BibTeX entries.

* lisp/textmodes/bibtex.el (bibtex-aux-opt-alist): Rename from
bibtex-user-optional-fields.
(bibtex-BibTeX-entry-alist, bibtex-biblatex-entry-alist): Permit
aliases that inherit their definition from another entry.
(bibtex-BibTeX-aux-entry-alist, bibtex-biblatex-aux-entry-alist)
(bibtex-BibTeX-aux-opt-alist, bibtex-biblatex-aux-opt-alist): New
user variables.
(bibtex-entry-alist): Honor these new variables.
(bibtex-field-alist): New function.
(bibtex-include-OPTkey): Default changed to nil, declared
obsolete.  Use bibtex-aux-opt-alist instead.
(bibtex-set-dialect): Use cl-flet and bibtex-field-alist.
(bibtex-dialect-select-map): New variable.
(bibtex-init-dialect): New function.
(bibtex-field-list): Simplify.
(bibtex-print-help-message): Bug fix.

(cherry picked from commit b26418694e8a573cd500d71029c0e8f53598ea3c)

7 weeks ago* lisp/progmodes/grep.el (grep-mode-map): Improve docstring.
Stefan Kangas [Thu, 2 Jan 2025 01:48:36 +0000 (02:48 +0100)]
* lisp/progmodes/grep.el (grep-mode-map): Improve docstring.

(cherry picked from commit fec6078f62c717edfe6ad5fe87f531ccbbd8e08f)

7 weeks agoPrefer defvar-keymap in grep.el
Stefan Kangas [Thu, 2 Jan 2025 01:46:39 +0000 (02:46 +0100)]
Prefer defvar-keymap in grep.el

* lisp/progmodes/grep.el (grep-mode-map, grep-edit-mode-map):
Prefer defvar-keymap.

(cherry picked from commit 885f6993b72a7eccb012a1b5be16210351d02d53)

7 weeks ago; Update missed copyright year
Stefan Kangas [Thu, 2 Jan 2025 01:41:06 +0000 (02:41 +0100)]
; Update missed copyright year

(cherry picked from commit 21c7c594e8ef04da11ba796a18e7c63da359a7ad)

7 weeks agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Wed, 1 Jan 2025 23:18:19 +0000 (15:18 -0800)]
Update from Gnulib by running admin/merge-gnulib

(cherry picked from commit 3adf3f546e1ccd9c178dec2710f8e6e3e529373a)

7 weeks agoAdjust to Gnulib’s recent module renaming
Paul Eggert [Wed, 1 Jan 2025 23:17:45 +0000 (15:17 -0800)]
Adjust to Gnulib’s recent module renaming

* admin/merge-gnulib (GNULIB_MODULES, AVOIDED_MODULES):
Change to match Gnulib’s current module names.

(cherry picked from commit bdb13a0e5c5bab0300b1dc2e18956b15f8f59c13)

7 weeks ago; Skip commit 78bc5949db489b143f7424540d6cc56fc529c9ea
Eshel Yaron [Sat, 4 Jan 2025 20:40:33 +0000 (21:40 +0100)]
; Skip commit 78bc5949db489b143f7424540d6cc56fc529c9ea

7 weeks agoFix copyright years by hand
Paul Eggert [Wed, 1 Jan 2025 07:41:51 +0000 (07:41 +0000)]
Fix copyright years by hand

These are dates that admin/update-copyright did not update.

(cherry picked from commit b36b1be491e0b19062fa38ee197aa3daeba96415)

7 weeks agoUpdate copyright year to 2025
Paul Eggert [Wed, 1 Jan 2025 07:39:17 +0000 (07:39 +0000)]
Update copyright year to 2025

Run "TZ=UTC0 admin/update-copyright".

(cherry picked from commit 4da38c632161867e914b3a13dc760f8019255f94)

7 weeks agoSync build-aux/update-copyright from Gnulib
Paul Eggert [Wed, 1 Jan 2025 07:34:51 +0000 (07:34 +0000)]
Sync build-aux/update-copyright from Gnulib

* build-aux/update-copyright: Copy from Gnulib.
This should simplify this year's updating.

(cherry picked from commit 5d70928f2afea5ee4e1aa117aa9cfded56193b56)

7 weeks agoCC Mode: Fix various minor indentation bugs
Alan Mackenzie [Tue, 31 Dec 2024 18:39:57 +0000 (18:39 +0000)]
CC Mode: Fix various minor indentation bugs

As part of this, introduce a second anchor point to the
syntactic symbols brace-list-intro and enum-intro, the position
of the opening brace.

* lisp/progmodes/cc-align.el
(c-lineup-item-after-paren-at-boi): New function.

* /lisp/progmodes/cc-engine.el
(c-foreign-truncate-lit-pos-cache)
(c-foreign-init-lit-pos-cache): Use
c-truncate-lit-pos/state-cache in place of an older function.
(c-no-bracelist-cache): Update its definition to exclude
conses.
(c-strip-conses): New function.
(c-inside-bracelist-p): Use c-strip-conses.
(c-add-stmt-syntax): In the "go out a block" loop, go out of a
brace at BOI when there's non-whitespace text after it.
Refactor an `if' form containing a cond form into a cond form.
Add the new second second anchor point into syntactic contexts
with brace-list-intro and enum-intro.  Anchor brace-list-close
and enum-close elements on the individual declarations in
struct, etc., variable declarations.
(c-guess-basic-syntax, CASE 20): Use the new constraint-cont
syntactic symbol.
(c-guess-basic-syntax, CASE 9B): Anchor brace-list-close and
enum-close elements on the individual declarations in struct,
etc., variable declarations.
(c-guess-basic-syntax, CASEs 9C, 9D): Add the new second anchor
point into brace-list-intro and enum-intro syntactic contexts.

* lisp/progmodes/cc-mode.el (c-locate-first-punctuation-prop):
New function.
(c-depropertize-CPP): Use c-locate-first-punctuation-prop.

* lisp/progmodes/cc-vars.el (c-offsets-alist): Amend the
entries for constraint-cont, brace-list-intro, and enum-intro,
using c-lineup-item-after-paren-at-boi.

* doc/misc/cc-mode.texi (List Line-Up): Add a description of
c-lineup-item-after-paren-at-boi.

(cherry picked from commit 643e32340d1342cee8af3f1f604ea1c1ad12837a)

7 weeks ago; * src/doc.c (store_function_docstring): Fix typo.
Pip Cet [Mon, 30 Dec 2024 21:55:38 +0000 (21:55 +0000)]
; * src/doc.c (store_function_docstring): Fix typo.

(cherry picked from commit 2f1052d9b0de551dc3a463ed54e21c63517497ab)

7 weeks agoImprove treesit-forward-sexp-list, treesit-down-list, treesit-up-list
Juri Linkov [Mon, 30 Dec 2024 18:07:40 +0000 (20:07 +0200)]
Improve treesit-forward-sexp-list, treesit-down-list, treesit-up-list

* lisp/treesit.el (treesit-forward-sexp-list): Rewrite to support
the value of ARG more than 1.  In this case every step moves forward
either over the next treesit-based list or over the syntax-based symbol.
(treesit-down-list, treesit-up-list): Rewrite to support the fallback
to the syntax-based navigation while inside the treesit-based list.
Also use a loop for ARG more than 1 (bug#73404).

(cherry picked from commit 687ff86e802c9883f292f58a890178d08311a821)

7 weeks ago* lisp/treesit.el (treesit-show-paren-data--categorize): Fix it.
Juri Linkov [Mon, 30 Dec 2024 17:54:39 +0000 (19:54 +0200)]
* lisp/treesit.el (treesit-show-paren-data--categorize): Fix it.

Copy the implementation of treesit-parent-until here, and call
its treesit-node-match-p with the argument IGNORE-MISSING set to t
that causes it to fail silently instead of raising an error when
the predicate 'sexp-list' is not defined in an embedded language.
(treesit-major-mode-setup): Set show-paren-data-function to
treesit-show-paren-data only when 'sexp-list' thing is defined
that is used by treesit-show-paren-data--categorize (bug#75198).

(cherry picked from commit 4068948a74586056cf03a22cae2448d7b4e4a7bd)

7 weeks ago; * doc/lispref/modes.texi (Customizing Keywords): Fix typo (bug#75193).
Kohei Tsuruta [Sun, 29 Dec 2024 22:47:10 +0000 (14:47 -0800)]
; * doc/lispref/modes.texi (Customizing Keywords): Fix typo (bug#75193).

(cherry picked from commit 7acfea19358da3a02e5884f5e7d56c87d7b16616)

7 weeks ago; Minor Tramp changes
Michael Albinus [Mon, 30 Dec 2024 11:42:00 +0000 (12:42 +0100)]
; Minor Tramp changes

* lisp/net/tramp.el (tramp-handle-make-process):
* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
* lisp/net/tramp-androidsu.el (tramp-androidsu-handle-make-process):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process):
* lisp/net/tramp-smb.el (tramp-smb-handle-start-file-process):
Don't use connection property "remote-command", it's superfluous.

* lisp/net/tramp-archive.el (tramp-archive-local-file-name):
Add `tramp-archive-method' to `tramp-methods' temporarily.

(cherry picked from commit 7671d50b149edd9e19c29f5fa8ee71c01e2f583d)

7 weeks agoMake typescript-ts-mode work with latest grammar
Yuan Fu [Mon, 30 Dec 2024 08:21:55 +0000 (00:21 -0800)]
Make typescript-ts-mode work with latest grammar

* lisp/progmodes/typescript-ts-mode.el:
(tsx-ts-mode--font-lock-compatibility-bb1f97b): Return dummy
query when neither query works.  In latest grammar, neither will
work, because typescript grammar doesn't include jsx grammar
anymore.

(cherry picked from commit ec3f9434c7d615dc37ba444a2200f13c84984299)

7 weeks agoAdd verified grammar version comment for tree-sitter modes
Yuan Fu [Mon, 30 Dec 2024 08:21:46 +0000 (00:21 -0800)]
Add verified grammar version comment for tree-sitter modes

* lisp/progmodes/c-ts-mode.el:
* lisp/progmodes/cmake-ts-mode.el:
* lisp/progmodes/dockerfile-ts-mode.el:
* lisp/progmodes/elixir-ts-mode.el:
* lisp/progmodes/go-ts-mode.el:
* lisp/progmodes/heex-ts-mode.el:
* lisp/progmodes/java-ts-mode.el:
* lisp/progmodes/js.el:
* lisp/progmodes/json-ts-mode.el:
* lisp/progmodes/lua-ts-mode.el:
* lisp/progmodes/php-ts-mode.el:
* lisp/progmodes/ruby-ts-mode.el:
* lisp/progmodes/rust-ts-mode.el:
* lisp/textmodes/css-mode.el:
* lisp/textmodes/html-ts-mode.el: Add comments.

(cherry picked from commit 732a1108b0b553028ada334172635f039012a7f7)

7 weeks agoGenerate compatibility report for multiple Emacs versions
Yuan Fu [Mon, 30 Dec 2024 08:14:37 +0000 (00:14 -0800)]
Generate compatibility report for multiple Emacs versions

* admin/tree-sitter/compat-template.html: Update template.
* admin/tree-sitter/treesit-admin.el:
(treesit-admin--builtin-language-sources): Add sources.
(treesit-admin--builtin-modes): New variable.
(treesit-admin--verify-major-mode-queries): Don't need to pass
LANGS argument anymore.
(treesit-admin-verify-major-mode-queries): Move, and use
treesit-admin--builtin-modes.
(treesit-admin--mode-languages): Set some variables so it gets
all the languages.
(treesit-admin--find-latest-compatible-revision): Also return
commit timestamp.
(treesit-admin--generate-compatibility-report): New parameter
EMACS-EXECUTABLES.  Support generating report for multiple Emacs
versions.
* lisp/treesit.el (treesit--language-git-timestamp): New function.

(cherry picked from commit 0b1986ba5243b150bf6891f51827a4dae28447b0)

7 weeks agoAdd treesit-admin-generate-compatibility-report
Yuan Fu [Sun, 29 Dec 2024 08:31:37 +0000 (00:31 -0800)]
Add treesit-admin-generate-compatibility-report

This function can generate a HTML report on latest compatible
grammar versions for each major mode.

* admin/tree-sitter/compat-template.html: Update.
* admin/tree-sitter/treesit-admin.el:
(treesit-admin--validate-mode-lang): Change so that emacs 30 can
also run it.
(treesit-admin--find-latest-compatible-revision): Support
running checks with a different Emacs executable.
(treesit-admin--generate-compatibility-report): New function.

(cherry picked from commit d9cfe1fe92ffda7e52dcb434e34bfdd1258f2688)

7 weeks ago; Move treesit-admin into tree-sitter directory
Yuan Fu [Sun, 29 Dec 2024 07:08:43 +0000 (23:08 -0800)]
; Move treesit-admin into tree-sitter directory

* admin/tree-sitter/compat-template.html: New file.
* admin/tree-sitter/treesit-admin.el: Move.

(cherry picked from commit 5ec170985f4a9b2facc5ac883d0312f9cd270034)

7 weeks agoAdd treesit-admin--last-compatible-grammar-for-modes
Yuan Fu [Sun, 29 Dec 2024 07:06:52 +0000 (23:06 -0800)]
Add treesit-admin--last-compatible-grammar-for-modes

This function computes the latest compatible grammar version for
each major mode.

* admin/treesit-admin.el (treesit-admin-file-name): Move.
(treesit-admin--compat-template-file-name): New variable.
(treesit-admin--mode-languages): New function.
(treesit-admin--find-latest-compatible-revision): Return a plist
instead.
(treesit-admin--last-compatible-grammar-for-modes): New function.

(cherry picked from commit c9624c21117f7bece4d5a8271888155de5d086a2)

7 weeks agoAdd treesit-admin--find-latest-compatible-revision
Yuan Fu [Sun, 29 Dec 2024 02:36:59 +0000 (18:36 -0800)]
Add treesit-admin--find-latest-compatible-revision

This function can find the last grammar revision that is
compatible with a major mode.

* admin/treesit-admin.el (treesit-admin-file-name): New
variable.
(treesit-admin--validate-mode-lang):
(treesit-admin--find-latest-compatible-revision): New functions.

(cherry picked from commit d5ad51f25fba84ac9fad7baf8781a761d1cead24)

7 weeks agoRefactor treesit-admin--verify-major-mode-queries
Yuan Fu [Sat, 28 Dec 2024 22:54:17 +0000 (14:54 -0800)]
Refactor treesit-admin--verify-major-mode-queries

Make treesit-admin--verify-major-mode-queries use
treesit--install-language-grammar-1, rathre than the interactive
command treesit-install-language-grammar.

* admin/treesit-admin.el:
(treesit-admin--verify-major-mode-queries): Add parameter
SOURCE-ALIST.  Use treesit--install-language-grammar-1.
(treesit-admin-verify-major-mode-queries): Pass
treesit-admin--builtin-language-sources to
treesit-admin--verify-major-mode-queries.

* lisp/treesit.el (treesit-install-language-grammar): Don't
return revision of the git repo.

(cherry picked from commit 9e1e9fdff44f047489d45ba4a73776cb0298574f)

7 weeks agoRefactor treesit--install-language-grammar-1
Yuan Fu [Sat, 28 Dec 2024 22:41:55 +0000 (14:41 -0800)]
Refactor treesit--install-language-grammar-1

Separate treesit--install-language-grammar-1 into two functions,
one clones the repository, the other builds and installs the
grammar.

* lisp/treesit.el (treesit--install-language-grammar-1):
Refactor out treesit--build-grammar.
(treesit--build-grammar): New function.
(treesit--language-git-revision): Now takes REPO-DIR as an
argument.

(cherry picked from commit e2f791715299d97f401a38c75fa11bb51fdb8292)

7 weeks agoSupport COMMIT in treesit-language-source-alist
Yuan Fu [Sat, 28 Dec 2024 21:57:50 +0000 (13:57 -0800)]
Support COMMIT in treesit-language-source-alist

* lisp/treesit.el (treesit-language-source-alist): Add COMMIT
field.
(treesit--install-language-grammar-1): Support COMMIT.

(cherry picked from commit a22730f4d788d6476d5f3c6717ba8a3d4046e819)

7 weeks ago* lisp/treesit.el (treesit-show-paren-data--categorize): Improve.
Juri Linkov [Mon, 30 Dec 2024 07:23:05 +0000 (09:23 +0200)]
* lisp/treesit.el (treesit-show-paren-data--categorize): Improve.

Instead of using only the immediate parent, try to search more levels
using 'treesit-parent-until' (bug#75122).

(cherry picked from commit dc653bf0636d481303f558e2034550648ee58947)

7 weeks ago; * etc/NEWS: Improve recently added entries for tree-sitter.
Eli Zaretskii [Sun, 29 Dec 2024 19:54:59 +0000 (21:54 +0200)]
; * etc/NEWS: Improve recently added entries for tree-sitter.

(cherry picked from commit ce74534ef8cc46fd9fbdc9363da5994b1ae1cf58)

7 weeks ago; * etc/NEWS: Improve last change.
Eli Zaretskii [Sun, 29 Dec 2024 19:44:58 +0000 (21:44 +0200)]
; * etc/NEWS: Improve last change.

(cherry picked from commit 2e8f875067bc7068f79cb3e249de9da68c54d210)

7 weeks ago; * etc/NEWS: Remove implementation details of 'treesit-show-paren-data'
Juri Linkov [Sun, 29 Dec 2024 19:15:07 +0000 (21:15 +0200)]
; * etc/NEWS: Remove implementation details of 'treesit-show-paren-data'

(cherry picked from commit d2c05c219ed1abbbda34f68489d21a0b2cd513e1)

7 weeks agoTreesit support for show-paren-mode (bug#75122)
Juri Linkov [Sun, 29 Dec 2024 18:08:11 +0000 (20:08 +0200)]
Treesit support for show-paren-mode (bug#75122)

* lisp/treesit.el (treesit-show-paren-data--categorize):
New internal function.
(treesit-show-paren-data): New function.
(treesit-major-mode-setup): Set 'show-paren-data-function' to
'treesit-show-paren-data'.

(cherry picked from commit 1addae07be1982a6cafc0e0b3955b59bd1fb481c)

7 weeks agoAdd new variable 'up-list-function' for 'treesit-up-list'
Juri Linkov [Sun, 29 Dec 2024 17:57:28 +0000 (19:57 +0200)]
Add new variable 'up-list-function' for 'treesit-up-list'

* lisp/emacs-lisp/lisp.el (up-list-function): New variable (bug#73404).
(up-list-default-function): New function.
(up-list): Split part to 'up-list-default-function'.

* lisp/treesit.el (treesit-up-list): New function.
(treesit-major-mode-setup): Set 'up-list-function' to
'treesit-up-list'.

(cherry picked from commit ec8dd27f008bca810209354a189d241479fe4d32)

7 weeks agoAdd new variable 'down-list-function' for 'treesit-down-list'
Juri Linkov [Sun, 29 Dec 2024 17:51:18 +0000 (19:51 +0200)]
Add new variable 'down-list-function' for 'treesit-down-list'

* lisp/emacs-lisp/lisp.el (down-list-default-function): New function.
(down-list-function): New variable (bug#73404).
(down-list): Move meat to 'down-list-default-function',
and call 'down-list-function' when non-nil.  Don't raise an error
in strings or comments when 'down-list-function' is non-nil.

* lisp/treesit.el (treesit--scan-error): New internal function.
(treesit-forward-sexp, treesit-forward-list): Use 'treesit--scan-error'.
(treesit-down-list): New function.
(treesit-major-mode-setup): Set 'down-list-function' to
'treesit-down-list'.

(cherry picked from commit 3c50edb2b500c6ac18696e99c3f8df597dea54d4)

7 weeks agoAdd new variable 'forward-list-function' for 'treesit-forward-list'
Juri Linkov [Sun, 29 Dec 2024 17:42:40 +0000 (19:42 +0200)]
Add new variable 'forward-list-function' for 'treesit-forward-list'

* lisp/emacs-lisp/lisp.el (forward-list-default-function): New function.
(forward-list-function): New variable (bug#73404).
(forward-list): Move meat to 'forward-list-default-function',
and call 'forward-list-function' when non-nil.

* lisp/treesit.el (treesit-forward-list): Rewrite to not rely on
'treesit-forward-sexp'.
(treesit-major-mode-setup): Set 'forward-list-function' to
'treesit-forward-list'.

(cherry picked from commit 3db984c72b8609c84f06a0fd62e59b4823ea0876)

7 weeks ago(font-lock-set-defaults): Try and fix bug#74281
Stefan Monnier [Sun, 29 Dec 2024 15:18:37 +0000 (10:18 -0500)]
(font-lock-set-defaults): Try and fix bug#74281

* lisp/font-lock.el (font-lock-set-defaults): Set
`font-lock--syntax-table-affects-ppss` more carefully, and
include ' among the "safe" syntaxes.

(cherry picked from commit c85d2e3519bf93837cead012a8281ee9bb4be9a8)

7 weeks ago; Add missing parameters in keymap doc
Kohei Tsuruta [Fri, 27 Dec 2024 23:27:34 +0000 (15:27 -0800)]
; Add missing parameters in keymap doc

* doc/lispref/keymaps.texi (Controlling Active Maps): Add missing
parameters.  (Bug#75174)

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

7 weeks agoSome minor Tramp changes
Michael Albinus [Sun, 29 Dec 2024 11:26:05 +0000 (12:26 +0100)]
Some minor Tramp changes

* lisp/net/tramp-sh.el (tramp-sh-handle-process-file): Do proper quoting.

* lisp/net/tramp.el (tramp-string-empty-or-nil-p):
Declare `tramp-suppress-trace' property.
(tramp-skeleton-make-symbolic-link): Drop volume letter when flushing.

* test/lisp/net/tramp-tests.el (tramp-test39-make-lock-file-name):
Adapt test.
(tramp-test42-utf8): Do not run expensive tests on MS Windows.

(cherry picked from commit 680906c136adfefda3a5d8be2b3ab7527521a449)

7 weeks ago; * doc/misc/calc.texi: Fix makeinfo warnings (bug#75166).
Eli Zaretskii [Sat, 28 Dec 2024 20:38:17 +0000 (22:38 +0200)]
; * doc/misc/calc.texi: Fix makeinfo warnings (bug#75166).

(cherry picked from commit 07e9f27c3e029a52669ddcf68d4ecddba0f7903e)

7 weeks agoMake browser windows pop up when browsing URLs on Wayland
Daniel Colascione [Mon, 23 Dec 2024 18:34:11 +0000 (13:34 -0500)]
Make browser windows pop up when browsing URLs on Wayland

When a user invokes browse-url, the browser window viewing the URL
should be raised in the user's desktop environment.  On X11, running
xdg-open as a subprocess does the job.  However, on Wayland, this
approach doesn't work: xdg-open makes the web browser browse a URL all
right, but doesn't raise the browser window in the GUI.  Therefore, if
the browser window is behind Emacs, browse-url appears to do nothing.
Repeated invocations of browse-url cause the browser to load multiple
tabs in the background, surprising the user when he gives up in
frustration and manually switches to the browser window.

There's no subprocess we can run to make the right thing happen.
Wayland requires that we pass along event activation information to the
browser using the xdg_activation_v1 protocol.

This change adds x-gtk-launch-uri to invoke GTK-native URL-dispatch
machinery.  This machinery DTRT on both X11 and Wayland.  We fall back
to the default browser machinery if we're not on a GTK frame.

The logic is more complicated than it has to be because the GTK URI
launch mechanism requires that we launch with respect to a specific GTK
window, and in some environments (e.g., running emacs -nw in a PGTK
Emacs) we don't have a GTK window.  We also want to preserve the effect
of customizing browse-url-browser-function, so adding an entry to
browse-url-default-handlers that preempts URI open when we happen to be
on a GTK frame is the wrong thing to do.

* lisp/net/browse-url.el (browse-url--browser-defcustom-type):
(browse-url--inhibit-pgtk): avoid infinite recursion
(browse-url-default-browser): use pgtk launch
(x-gtk-launch-uri): new function
(browse-url-default-gtk-browser): ues it

* src/pgtkfns.c (unwind_gerror_ptr): new function
(Fx_gtk_launch_uri): new function
(syms_of_pgtkfns): register it

* etc/NEWS: mention the new feature

(cherry picked from commit 72eb5f8bedbe441f6a3952557b9aa3ef6fd6235d)

7 weeks agoCC Mode: Minor corrections and tidy ups for cache invalidation
Alan Mackenzie [Sat, 28 Dec 2024 17:16:04 +0000 (17:16 +0000)]
CC Mode: Minor corrections and tidy ups for cache invalidation

These cache variables are c-lit-pos-cache-limit,
c-semi-near-cache-limit, c-full-near-cache-limit, and
c-state-cache-invalid-pos.

* lisp/progmodes/cc-awk.el
(c-awk-set-string-regexp-syntax-table-properties): Invalidate
the caches after changing the 'syntax-table property.

* lisp/progmodes/cc-defs.el (c-put-string-fence-trim-caches):
New macro.
(c-unmark-<-or->-as-paren): New name for c-unmark-<->-as-paren.
(Also renamed throughout CC Mode)

* lisp/progmodes/cc-engine.el (c-propertize-ml-string-opener):
Add missing cache invalidation.

* lisp/progmodes/cc-mode.el (c-neutralize-CPP-line): Remove
syntax-table properties from < and > as needed.
(c-put-syn-tab): Add missing cache invalidation.

(cherry picked from commit 0334b0743f83a3e69d1d3a426efbba1d2a5f2cc6)

7 weeks agoAlways match underscore variables for elixir-ts-mode
Wilhelm Kirschbaum [Sun, 15 Sep 2024 07:46:07 +0000 (09:46 +0200)]
Always match underscore variables for elixir-ts-mode

The code comment is invalid, as it is common to treat any _variable as a
comment.

* lisp/progmodes/elixir-ts-mode.el (elixir-ts-font-lock-settings):
Add ":override t" to comment identifier match.  (Bug#75156)

(cherry picked from commit 43a8f0de5ecbe8430917968af703f4a630567461)

7 weeks agoAdd tramp-archive-local-file-name
Michael Albinus [Sat, 28 Dec 2024 14:53:08 +0000 (15:53 +0100)]
Add tramp-archive-local-file-name

* lisp/net/tramp-archive.el (tramp-archive-file-name-p):
Add ;;;###tramp-autoload cookie.
(tramp-archive-local-file-name): New defun.

(cherry picked from commit e32484547d0813665334bfd34b741492dde0d374)

7 weeks ago; Fix last change
Eli Zaretskii [Sat, 28 Dec 2024 12:38:55 +0000 (14:38 +0200)]
; Fix last change

* lisp/vc/ediff-util.el (ediff--delete-temp-files-on-kill-emacs):
Add commentary explaining the precautions.  (Bug#74881)

(cherry picked from commit c9be6f731de12b1c9eda0c51e188953e56ba0767)

7 weeks agoMake image cache aware of image-scaling-factor (bug#74725)
Alan Third [Fri, 27 Dec 2024 11:46:45 +0000 (11:46 +0000)]
Make image cache aware of image-scaling-factor (bug#74725)

* src/dispextern.h (struct image): Add scale so it can be compared in
search_image_cache.
* src/image.c (search_image_cache): Calculate the scale factor and
compare with the cached value.
(image_compute_scale): Compute the image's scale factor and optionally
store it in the image struct.
(compute_image_size): Move scale calculation code into
image_compute_scale and use it.

(cherry picked from commit 691c161a81221905f7e2690ee747ba9163b1b645)

7 weeks ago* lisp/vc/ediff-util.el: Remove temp Ediff files on kill-emacs
Lin Sun [Sun, 15 Dec 2024 06:52:17 +0000 (06:52 +0000)]
* lisp/vc/ediff-util.el: Remove temp Ediff files on kill-emacs

(ediff--delete-temp-files-on-kill-emacs): New function.
(ediff-setup): Install it in 'kill-emacs-hook'.  (Bug#74881)

(cherry picked from commit 2ba49f8a12ea378cc38cd1f0eacd88b6ef7e74e4)

7 weeks ago; Fix inaccuracy in ELisp Reference manual
Eli Zaretskii [Sat, 28 Dec 2024 12:04:26 +0000 (14:04 +0200)]
; Fix inaccuracy in ELisp Reference manual

* doc/lispref/objects.texi (Basic Char Syntax): Fix inaccurate
wording.  (Bug#75113)

(cherry picked from commit 2ba6387d1d63072c5faaa7798c8ef7b00ca883c3)

7 weeks ago; * etc/PROBLEMS: Mention problems with XPM support in GDK (bug#75018).
Eli Zaretskii [Sat, 28 Dec 2024 11:54:45 +0000 (13:54 +0200)]
; * etc/PROBLEMS: Mention problems with XPM support in GDK (bug#75018).

(cherry picked from commit 8ac6a178804c36e92de7271a5eeb2c66909acb05)

7 weeks agoAdd missing fontification matches for elixir-ts-mode
Wilhelm Kirschbaum [Sun, 15 Sep 2024 07:46:35 +0000 (09:46 +0200)]
Add missing fontification matches for elixir-ts-mode

* lisp/progmodes/elixir-ts-mode.el (elixir-ts--font-lock-settings): Add
matches for missing tokens and fix atom type face.  (Bug#75156)

(cherry picked from commit 624322d5f6a8e92c641a5ce6087e3f6d91a44997)

7 weeks ago; Fix copyright year
Stefan Kangas [Sat, 28 Dec 2024 01:24:07 +0000 (02:24 +0100)]
; Fix copyright year

(cherry picked from commit 5bafb11b4002b0bfd94c67d2983ca217255f1013)

7 weeks agoAdd command to clear erc-track's mode-line indicator
Alex Bochannek [Sat, 21 Dec 2024 19:39:08 +0000 (11:39 -0800)]
Add command to clear erc-track's mode-line indicator

* etc/ERC-NEWS: Mention new command `erc-track-clear'.
* lisp/erc/erc-track.el (erc-track-clear): New command to reset buffer
activity indicator in ERC's mode-line construct.  (Bug#75014)

(cherry picked from commit 63cc335a524ab5b6fb8e9bc93041382baf1321db)

7 weeks agoReuse process in erc-server-delayed-check-reconnect
F. Jason Park [Tue, 24 Dec 2024 06:21:34 +0000 (22:21 -0800)]
Reuse process in erc-server-delayed-check-reconnect

* doc/misc/erc.texi (Integrations): Set `erc-server-reconnect-function'
to `erc-server-delayed-check-reconnect' in SOCKS example, and add
definition for `erc-open-socks-tls-stream'.  Mention possible
inaccuracies related to error detection with certain reconnect
strategies.
* lisp/erc/erc-backend.el (erc-server--reconnect-opened): New function.
(erc-server-delayed-check-reconnect): Attempt to reuse process if server
sends a complete PONG, and attempt to accommodate connectors that set
:nowait to nil.
(erc--server-delayed-check-connectors): Remove variable.
(erc-server-prefer-check-reconnect): Inline what was the internal
variable `erc--server-delayed-check-connectors' because it's no longer
used in unit tests.  Add `erc-open-socks-tls-stream' to the set of
connector functions thought to be compatible with the "check" reconnect
strategy.
* test/lisp/erc/erc-scenarios-base-auto-recon.el
(erc-scenarios-base-auto-recon-no-proto): Adapt to expect "reuse" behavior.
* test/lisp/erc/resources/base/reconnect/ping-pong.eld: Delete unused file.
* test/lisp/erc/resources/base/reconnect/unexpected-disconnect.eld:
Capture PING cookie to send back to client.
* test/lisp/erc/resources/erc-d/resources/proxy-solo.eld: Delete unused
file.  (Bug#62044)

(cherry picked from commit f5ebe47ba7723919f09adf8f28d896cfa8757842)

7 weeks ago(package--download-and-read-archives): Fix bug#75065
Stefan Monnier [Fri, 27 Dec 2024 16:58:30 +0000 (11:58 -0500)]
(package--download-and-read-archives): Fix bug#75065

* lisp/emacs-lisp/package.el (package--download-and-read-archives):
Include the error info in the error message.
Suggested by Konstantin Kharlamov <Hi-Angel@yandex.ru>.
(package-refresh-contents, package-menu--perform-transaction):
Use `error-message-string`.

(cherry picked from commit a99e1cc745047977b0b7cbd25fe9df66e9c86a39)