]> git.eshelyaron.com Git - emacs.git/log
emacs.git
6 days agoPrevent buffer overflow in line-numbering code
Eli Zaretskii [Sat, 15 Feb 2025 11:15:36 +0000 (13:15 +0200)]
Prevent buffer overflow in line-numbering code

* src/xdisp.c (maybe_produce_line_number): Limit the value of
'display-line-numbers-width' to what can be shown in the window,
and set dimension of the lnum_buf[] accordingly.  (Bug#75969)

(cherry picked from commit 0f768b8843bcdbbfa1c64aeee64d2de7d62c0d13)

6 days agoAdd two missing NULL checks of malloc'd values on Android
Po Lu [Sat, 15 Feb 2025 08:58:18 +0000 (16:58 +0800)]
Add two missing NULL checks of malloc'd values on Android

* src/android.c (sendDndUri, sendDndText): Verify that allocated
string memory is non-nil before writing to it.

(cherry picked from commit 58e4bfe3408f5f4562bf02ac200b680329f487c2)

6 days ago; * etc/PROBLEMS: Document how to grant storage permissions on Wear OS.
Po Lu [Sat, 15 Feb 2025 06:46:37 +0000 (14:46 +0800)]
; * etc/PROBLEMS: Document how to grant storage permissions on Wear OS.

(cherry picked from commit 81ca9c75f1170f2b4cc85c69e859f68da4c508e4)

6 days ago(smerge-refine-exchange-point): Error cleanly outside refinement
Stefan Monnier [Sat, 15 Feb 2025 05:39:54 +0000 (00:39 -0500)]
(smerge-refine-exchange-point): Error cleanly outside refinement

* lisp/vc/smerge-mode.el (smerge-refine-regions): Cover each region
with an overlay.
(smerge-refine-exchange-point): Use it to detect more reliably that
we're not inside a refined region.

(cherry picked from commit fe04b4fc27d50b7087ee622281672866dbf87818)

6 days ago(smerge-refine-exchange-point): New command
Stefan Monnier [Sat, 15 Feb 2025 04:28:52 +0000 (23:28 -0500)]
(smerge-refine-exchange-point): New command

* lisp/vc/smerge-mode.el (smerge--refine-highlight-change):
Allow empty region and always create an overlay.  Also, remember any
adjustment we applied the overlay's boundaries.
(smerge-refine-regions): Always create two overlays per hunk and "connect"
them via `smerge--refine-other`.
(smerge-refine-exchange-point): New command.

(cherry picked from commit 18ebbba6c422617a16cc36082a8ba871b5bfce2c)

6 days agolisp/term/xterm.el (xterm--query-name-and-version): Don't quote lambda
Stefan Monnier [Sat, 15 Feb 2025 04:05:29 +0000 (23:05 -0500)]
lisp/term/xterm.el (xterm--query-name-and-version): Don't quote lambda

(cherry picked from commit 8d968c0f22347c9a4b65fdd142c0f050db918745)

6 days ago; Another attempt at fixing c-ts-common--prev-standalone-sibling
Yuan Fu [Sat, 15 Feb 2025 01:44:02 +0000 (17:44 -0800)]
; Another attempt at fixing c-ts-common--prev-standalone-sibling

* lisp/progmodes/c-ts-common.el:
(c-ts-common--prev-standalone-sibling): Fix.

(cherry picked from commit b58552ca983ad37e51fb375bd45bd12a2beda3b2)

6 days agoPrefer `(defsubst A ...)` to `(cl-proclaim (inline A))`
Stefan Kangas [Fri, 14 Feb 2025 23:40:52 +0000 (00:40 +0100)]
Prefer `(defsubst A ...)` to `(cl-proclaim (inline A))`

* lisp/emacs-lisp/cl-macs.el: Remove cl-proclaim...
* lisp/emacs-lisp/cl-extra.el (cl-map, cl-notany, cl-notevery)
(cl-revappend, cl-nreconc):
* lisp/emacs-lisp/cl-lib.el (cl-acons): ...and use defsubst
instead.  (Bug#76294)

(cherry picked from commit dc86f59e926f618d4e3568a332b42ea0647a08ba)

6 days agoInline important-return-value declarations in cl-lib.el
Stefan Kangas [Fri, 14 Feb 2025 21:46:07 +0000 (22:46 +0100)]
Inline important-return-value declarations in cl-lib.el

These declarations are now properly added to 'cl-lib.el' itself, or to
'cl-loaddefs.el'.  This means that they will now correctly show up
immediately when loading 'cl-lib.el', instead of only after 'cl-macs.el'
is pulled in by an autoload.  C.f. Bug#76247.

I did not considered worth reproducing everywhere the list saying which
functions among the below belong to these two categories:
1. Functions that are side-effect-free except for the behavior of
   functions passed as argument.
2. Functions that mutate and return a list.

AFAIU, this is not actionable with our current byte-compiler, i.e. we
can't add any extra declarations based on it.  However, if the list
should be needed at some point, for example due to improvements in the
compiler, this commit will be where to find it.  In the worst case, and
with more work, it's also deducible from the source code itself.

* lisp/emacs-lisp/cl-macs.el: Move important-return-value declarations
from here...
* lisp/emacs-lisp/cl-extra.el (cl-map, cl-maplist, cl-mapcan)
(cl-mapcon, cl-some, cl-every, cl-notany, cl-notevery, cl-nreconc):
* lisp/emacs-lisp/cl-lib.el (cl-mapcar, cl-adjoin, cl-subst):
* lisp/emacs-lisp/cl-seq.el (cl-reduce, cl-remove, cl-remove-if)
(cl-remove-if-not, cl-delete, cl-delete-if, cl-delete-if-not)
(cl-remove-duplicates, cl-delete-duplicates, cl-substitute)
(cl-substitute-if, cl-substitute-if-not, cl-nsubstitute)
(cl-nsubstitute-if, cl-nsubstitute-if-not, cl-find, cl-find-if)
(cl-find-if-not, cl-position, cl-position-if, cl-position-if-not)
(cl-count, cl-count-if, cl-count-if-not, cl-mismatch, cl-search)
(cl-sort, cl-stable-sort, cl-merge, cl-member, cl-member-if)
(cl-member-if-not, cl-assoc, cl-assoc-if, cl-assoc-if-not, cl-rassoc)
(cl-rassoc-if, cl-rassoc-if-not, cl-union, cl-nunion, cl-intersection)
(cl-nintersection, cl-set-difference, cl-nset-difference)
(cl-set-exclusive-or, cl-nset-exclusive-or, cl-subsetp, cl-subst-if)
(cl-subst-if-not, cl-nsubst, cl-nsubst-if, cl-nsubst-if-not, cl-sublis)
(cl-nsublis, cl-tree-equal): ...to have them inline here.

(cherry picked from commit f05ce9e6bbe7202060580c122e033f5e4ac98e90)

6 days ago; Fix c-ts-common--prev-standalone-sibling
Yuan Fu [Fri, 14 Feb 2025 16:36:24 +0000 (08:36 -0800)]
; Fix c-ts-common--prev-standalone-sibling

* lisp/progmodes/c-ts-common.el:
(c-ts-common--prev-standalone-sibling): Fix.

(cherry picked from commit ac9cf20919c46169a2e3aaa2b75ccb37dd5b5ff1)

6 days agoFix some uses of `%s` for non-strings/names
Stefan Monnier [Fri, 14 Feb 2025 16:25:52 +0000 (11:25 -0500)]
Fix some uses of `%s` for non-strings/names

* lisp/files.el (normal-mode, set-auto-mode--apply-alist):
* lisp/gnus/nnimap.el (nnimap-command):
* lisp/emacs-lisp/bytecomp.el (bytecomp--check-cus-type):
Prefer %S over %s for arbitrary sexps and lists.

(cherry picked from commit 300bae4f7c75291c1d1af0eced102ce9b1c44000)

6 days agoCorrect docstrings describing "Re" alternatives.
Robert Pluim [Fri, 14 Feb 2025 10:56:19 +0000 (11:56 +0100)]
Correct docstrings describing "Re" alternatives.

* lisp/mail/mail-utils.el (mail-re-regexps): Use "Re", not "Re:".
* lisp/mail/rmail.el (rmail-re-abbrevs): Here also.

(cherry picked from commit b967891088db359fe16ce8317441e930651fb2ea)

6 days ago; * doc/misc/message.texi (Message Headers): Improve wording.
Stefan Kangas [Fri, 14 Feb 2025 15:09:32 +0000 (16:09 +0100)]
; * doc/misc/message.texi (Message Headers): Improve wording.

(Bug#72442)

(cherry picked from commit 7c22f13ba394d47992a0df3678d23b5bd3da3820)

6 days ago; Skip commit 2b68e3f48b81dd0303f3f7e83f8c62ebc26e87df
Eshel Yaron [Sat, 15 Feb 2025 19:30:40 +0000 (20:30 +0100)]
; Skip commit 2b68e3f48b81dd0303f3f7e83f8c62ebc26e87df

6 days agoDocument cl-n... set operations consistently
Basil L. Contovounesios [Sun, 2 Feb 2025 17:05:57 +0000 (18:05 +0100)]
Document cl-n... set operations consistently

The docstrings of cl-nintersection and cl-nset-difference have been
inconsistent with their manual entries since the beginning of
emacs.git history (bug#76017).  This patch settles on the weaker and
thus backward-compatible requirement that only their first argument
be safe to mutate.

* lisp/emacs-lisp/bytecomp.el: Include only first argument in
mutates-arguments property.
* lisp/emacs-lisp/cl-seq.el (cl-nintersection, cl-nset-difference):
Make docstring consistent with manual in that the second argument is
not modified.
* test/lisp/emacs-lisp/cl-seq-tests.el (cl-nintersection-test)
(cl-nset-difference-test): Simplify.
(cl-nset-difference): Pass fresh list as second argument, otherwise
destructive modifications to it could go undetected.

(cherry picked from commit ac143186c04ffd729cfe11abd99f02abdf742f64)

6 days agoConsolidate some cl-lib tests
Basil L. Contovounesios [Sun, 2 Feb 2025 16:18:52 +0000 (17:18 +0100)]
Consolidate some cl-lib tests

For discussion, see bug#75633#16 and the following thread:
https://lists.gnu.org/r/emacs-devel/2025-02/msg00053.html

* test/lisp/emacs-lisp/cl-extra-tests.el (cl-lib-test-remprop)
(cl-lib-test-coerce-to-vector, cl-parse-integer): Move here from
cl-lib-tests.el.
(cl-extra-test-remprop): Remove duplicate test, folding body...
(cl-get): ...into this test.
(cl-extra-test-concatenate): Remove duplicate test, folding body...
(cl-concatenate): ...into this test.
* test/lisp/emacs-lisp/cl-lib-tests.el: Update historic commentary.
(cl-lib-test-remprop, cl-lib-test-coerce-to-vector)
(cl-parse-integer): Move to cl-extra-tests.el.
(cl-lib-test-remove-if-not, cl-lib-test-remove)
(cl-lib-test-set-functions, cl-lib-test-string-position)
(cl-lib-test-mismatch, cl-nset-difference): Move to cl-seq-tests.el.
(cl-lib-test-gensym, cl-lib-keyword-names-versus-values)
(cl-lib-empty-keyargs, mystruct, cl-lib-struct-accessors)
(cl-lib-struct-constructors, cl-lib-arglist-performance, cl-the)
(cl-flet-test, cl-lib-test-typep, cl-lib-symbol-macrolet)
(cl-lib-symbol-macrolet-4+5, cl-lib-symbol-macrolet-2)
(cl-lib-symbol-macrolet-hide, cl-lib-defstruct-record): Move to
cl-macs-tests.el.
(cl-lib-test-endp): Remove duplicate test, folding body into
cl-seq-endp-test.
(cl-lib-set-difference): Remove duplicate test, folding body into
cl-set-difference-test.
* test/lisp/emacs-lisp/cl-macs-tests.el: Do not require cl-macs and
pcase.
(mystruct, cl-lib-struct-accessors, cl-lib-struct-constructors)
(cl-lib-arglist-performance, cl-lib-defstruct-record)
(cl-lib-symbol-macrolet, cl-lib-symbol-macrolet-4+5)
(cl-lib-symbol-macrolet-2, cl-lib-symbol-macrolet-hide, cl-flet-test)
(cl-lib-keyword-names-versus-values, cl-lib-empty-keyargs)
(cl-lib-test-gensym, cl-the, cl-lib-test-typep): Move here from
cl-lib-tests.el.
(cl-case-error, cl-case-warning): Fix indentation.
* test/lisp/emacs-lisp/cl-seq-tests.el: Require cl-lib rather than
cl-seq.
(cl-seq-endp-test): Absorb body of cl-lib-test-endp.
(cl-lib-test-remove, cl-lib-test-remove-if-not)
(cl-lib-test-string-position, cl-lib-test-mismatch)
(cl-lib-test-set-functions, cl-nset-difference): Move here from
cl-lib-tests.el.
(cl-set-difference-test): Absorb body of cl-lib-set-difference.

(cherry picked from commit 0edf094e54c721f6039b878cafb8ed02fac74a0f)

6 days agoAdapt PuTTY integration into Tramp
Michael Albinus [Fri, 14 Feb 2025 14:21:30 +0000 (15:21 +0100)]
Adapt PuTTY integration into Tramp

* doc/misc/tramp.texi (Inline methods, External methods):
PuTTY must be at least version 0.82.

* lisp/net/tramp-cache.el (with-tramp-saved-connection-property)
(with-tramp-saved-connection-properties): Add traces.

* lisp/net/tramp-sh.el (tramp-methods) <plink, plinkx, pscp, psftp>:
Adapt `tramp-login-args' and `tramp-copy-args' arguments.  (Bug#75746)

(cherry picked from commit 9ded6fd73e929977a38d4c644aa4e9fe66e76e90)

6 days agoAvoid crashes in lread.c when invalid characters are read
Pip Cet [Fri, 14 Feb 2025 13:49:49 +0000 (13:49 +0000)]
Avoid crashes in lread.c when invalid characters are read

* src/lread.c (readchar): Don't crash for non-fixnum return values.
(read_filtered_event): Don't crash for invalid symbol properties.
(Fread_char):
(Fread_char_exclusive):
(character_name_to_code): Check 'FIXNUMP' before using 'XFIXNUM'.
(read_char_escape): Crash on invalid Lisp-supplied data when
ENABLE_CHECKING; otherwise, signal an error.

(cherry picked from commit 608113628c2750b09b925b17c96a29b2dc9abc37)

6 days ago; Skip commit d82d4689794586d9303b4232be4583df16e11a31
Eshel Yaron [Sat, 15 Feb 2025 19:30:22 +0000 (20:30 +0100)]
; Skip commit d82d4689794586d9303b4232be4583df16e11a31

6 days ago; Skip commit b9b9c33dcbe7fe5ac36da65b351253451064348c
Eshel Yaron [Sat, 15 Feb 2025 19:30:19 +0000 (20:30 +0100)]
; Skip commit b9b9c33dcbe7fe5ac36da65b351253451064348c

6 days ago; Skip commit 87a61eba1b8287d63b318d4af6ce47169ba574fd
Eshel Yaron [Sat, 15 Feb 2025 19:30:15 +0000 (20:30 +0100)]
; Skip commit 87a61eba1b8287d63b318d4af6ce47169ba574fd

6 days ago; * src/fns.c (Fmapconcat): Doc fix (bug#76242).
Eli Zaretskii [Thu, 13 Feb 2025 09:03:26 +0000 (11:03 +0200)]
; * src/fns.c (Fmapconcat): Doc fix (bug#76242).

(cherry picked from commit 316e47c5af402f70b78092f9c941c4cf240fceb3)

6 days ago; Skip commit 3cfbeb3fca148a383ebe053f0107733e38cc0ba7
Eshel Yaron [Sat, 15 Feb 2025 19:30:08 +0000 (20:30 +0100)]
; Skip commit 3cfbeb3fca148a383ebe053f0107733e38cc0ba7

6 days ago; Change "virus" to "malicious" in lispref
Stefan Kangas [Thu, 13 Feb 2025 02:02:39 +0000 (03:02 +0100)]
; Change "virus" to "malicious" in lispref

* doc/lispref/functions.texi (Function Safety): Replace 'virus' with
'malicious' to ensure broader accuracy, as 'malicious' encompasses all
harmful software types.

(cherry picked from commit c68886ddb76ff93ff94a1334b3f4279d8de89293)

6 days ago; Skip commit 6701866be4d986f272cde712e834b34a44754477
Eshel Yaron [Sat, 15 Feb 2025 19:29:56 +0000 (20:29 +0100)]
; Skip commit 6701866be4d986f272cde712e834b34a44754477

6 days ago; * .mailmap: Add entry for Thuna. (Bug#76221)
Stefan Kangas [Wed, 12 Feb 2025 14:33:32 +0000 (15:33 +0100)]
; * .mailmap: Add entry for Thuna.  (Bug#76221)

Note that this is deliberately different from the display in
AUTHORS, on request from the author.

(cherry picked from commit 02851768b72c42fb0c67e7fd16516e42dfc02a4b)

6 days agoFix author name
Robert Pluim [Wed, 12 Feb 2025 13:00:55 +0000 (14:00 +0100)]
Fix author name

* admin/authors.el (authors-aliases): Fix entry for
"thuna.cing@gmail.com"  (Bug#76221).

(cherry picked from commit 2d7a8cbf4c87c94c117c29ebe0c07a9b50044a82)

6 days agoUse c-ts-common's comment setup in go-ts-mode (bug#75978)
Yuan Fu [Wed, 12 Feb 2025 04:38:00 +0000 (20:38 -0800)]
Use c-ts-common's comment setup in go-ts-mode (bug#75978)

c-ts-common-comment-setup sets up fill-paragraph-function, which
enables filling for comments.

* lisp/progmodes/go-ts-mode.el (go-ts-mode):
(go-mod-ts-mode): Use c-ts-common-comment-setup.

(cherry picked from commit 19314257485e88a82b128fe39c60ffd08862da58)

6 days agoAdd java-language-server to eglot-server-programs
Robert Brown [Wed, 9 Nov 2022 00:23:10 +0000 (19:23 -0500)]
Add java-language-server to eglot-server-programs

* lisp/progmodes/eglot.el (eglot-server-programs): Add support for Java
server <https://github.com/georgewfraser/java-language-server>.
(Bug#59138)

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

6 days ago; (project-forget-projects-under): Improve interactive behavior
Eshel Yaron [Sat, 15 Feb 2025 19:26:25 +0000 (20:26 +0100)]
; (project-forget-projects-under): Improve interactive behavior

6 days agoRemove some stale Texinfo references
Eshel Yaron [Sat, 15 Feb 2025 16:47:04 +0000 (17:47 +0100)]
Remove some stale Texinfo references

6 days ago; Update lisp/ldefs-boot.el
Eshel Yaron [Sat, 15 Feb 2025 16:41:20 +0000 (17:41 +0100)]
; Update lisp/ldefs-boot.el

6 days agoFix bug#76305
Eshel Yaron [Sat, 15 Feb 2025 16:37:42 +0000 (17:37 +0100)]
Fix bug#76305

6 days agoDrop finder.el and package.el
Eshel Yaron [Sat, 15 Feb 2025 16:37:20 +0000 (17:37 +0100)]
Drop finder.el and package.el

7 days ago* lisp/x-dnd.el (x-dnd-do-direct-save): Remove redundant stmts.
Po Lu [Fri, 14 Feb 2025 09:56:22 +0000 (17:56 +0800)]
* lisp/x-dnd.el (x-dnd-do-direct-save): Remove redundant stmts.

(cherry picked from commit 4d6f40dfc9075d64275da97dc35a2becc9eca4a2)

7 days agoUse a heuristic to support method chaining in c-ts-common
Yuan Fu [Fri, 14 Feb 2025 05:49:55 +0000 (21:49 -0800)]
Use a heuristic to support method chaining in c-ts-common

Test for "." at the beginning of a line to detect chained method.

* lisp/progmodes/c-ts-common.el:
(c-ts-common--standalone-predicate): New function.
(c-ts-common--standalone-parent):
(c-ts-common--prev-standalone-sibling): Use the new heuristic.

(cherry picked from commit 7ac578c57ce14a6f5e4568712ec16ebcbc9cc9ba)

7 days agoAllow treesit-simple-indent-standalone-predicate to return anchor
Yuan Fu [Fri, 14 Feb 2025 04:47:23 +0000 (20:47 -0800)]
Allow treesit-simple-indent-standalone-predicate to return anchor

* lisp/treesit.el:
(treesit-simple-indent-standalone-predicate): Allow it to return
an anchor instead of t.
(treesit-simple-indent-presets): Supports number.
* lisp/progmodes/c-ts-common.el:
(c-ts-common--standalone-parent):
(c-ts-common--prev-standalone-sibling): Supports number.

(cherry picked from commit 34f90bf2cab7c1711136dc055b665e46f714c3e1)

7 days ago; Fix standalone-parent preset for tree-sitter
Yuan Fu [Fri, 14 Feb 2025 04:30:09 +0000 (20:30 -0800)]
; Fix standalone-parent preset for tree-sitter

* lisp/treesit.el (treesit-simple-indent-presets): Fix typo.

(cherry picked from commit adabee88730017e81bbb0ee761b6720fd579535d)

7 days agoAdd treesit-simple-indent-standalone-predicate (bug#74386)
Yuan Fu [Mon, 2 Dec 2024 02:26:40 +0000 (18:26 -0800)]
Add treesit-simple-indent-standalone-predicate (bug#74386)

* lisp/treesit.el:
(treesit-simple-indent-standalone-predicate): New variable.
(treesit-simple-indent-presets): Use the predicate.
(treesit-simple-indent-presets): Update docstring.
* lisp/progmodes/c-ts-common.el:
(c-ts-common--standalone-parent):
(c-ts-common--prev-standalone-sibling): Use the predicate if
non-nil.  Also, handle method chaining by default.
* doc/lispref/modes.texi (Parser-based Indentation): Add
documentation.

(cherry picked from commit 4b020b936c5adf472319d1ea253c85c5ee54135f)

7 days agoFix uncaught cl-nreconc on constant list
Basil L. Contovounesios [Sun, 2 Feb 2025 16:24:14 +0000 (17:24 +0100)]
Fix uncaught cl-nreconc on constant list

* test/lisp/emacs-lisp/cl-extra-tests.el (cl-extra-test-isqrt):
Expect most specific error type.
(cl-extra-test-nreconc): Pass fresh list as first argument to
cl-nreconc.  The usual mutates-arguments warning was not emitted,
possibly in relation to bug#74920 and cl-nreconc being proclaimed
inline.
(cl-extra-test-list-length): Simplify using nconc.

(cherry picked from commit b8c8ae92dba223960b54b5b6e18cce4a11bbf870)

7 days agoFix cl-seq-tests.el
Basil L. Contovounesios [Sat, 25 Jan 2025 15:48:19 +0000 (16:48 +0100)]
Fix cl-seq-tests.el

None of the tests using the macro cl-seq--with-side-effects were
being evaluated (since bug#24264), and other tests were not robust
against destructive operations or optimizations (since bug#24264 and
bug#75633).  For further discussion, see:
https://lists.gnu.org/r/emacs-devel/2025-02/msg00053.html

* test/lisp/emacs-lisp/cl-seq-tests.el: Fit first line within 80
columns.  Remove empty Commentary section.
(cl-union-test-00): Use bug#N reference in place of URL.
(cl-seq-test-bug24264): Ditto.  Use nconc in place of append.
(cl-seq--test-list, cl-seq--test-list2, cl-seq--with-side-effects):
Remove.
(cl-seq-tests--relet*): New convenience macro replacing the need for
cl-seq--with-side-effects.
(cl-seq-fill-test, cl-seq-replace-test, cl-seq-delete-test): Use
cl-seq-tests--relet* to actually evaluate tests.  Avoid mutating
quoted literals.
(cl-seq-nsubstitute-test): Ditto.  Actually call cl-nsubstitute, not
cl-substitute.  Avoid comparing mutated argument to itself; compare
to its original copy instead.  Avoid calling cl-position on list
that is being mutated in :if predicate; use original copy instead.
(cl-seq-remove-test, cl-remove-if-not-test, cl-delete-if-not-test)
(cl-delete-duplicates-test, cl-seq-remove-duplicates-test)
(cl-seq-substitute-test, cl-seq-substitute-if-test)
(cl-seq-position-test, cl-count-if-test, cl-count-if-not-test)
(cl-member-if-test, cl-member-if-not-test, cl-assoc-if-test)
(cl-assoc-if-not-test, cl-rassoc-if-test, cl-subsetp-test):
Simplify.
(cl-remove-if-test, cl-seq-substitute-if-not-test, cl-find-if-test)
(cl-find-if-not-test, cl-position-if-test, cl-member-test)
(cl-assoc-test, cl-rassoc-test): Quote function symbols, not
lambdas.
(cl-delete-if-test): Use cl-seq-tests--relet*.  Check result of
cl-delete-if to avoid relying on its side effects, and to pacify
byte-compiler warning.
(cl-seq-mismatch-test): Avoid 'easy to misread' hidden argument.
(cl-seq-search-test): Break long line.
(cl-sort-test, cl-stable-sort-test, cl-merge-test): Avoid mutating
quoted literals.
(cl-intersection-test): Avoid comparing eql-ity of string literals.
(cl-nintersection-test, cl-nset-difference-test)
(cl-nset-exclusive-or-test): Avoid mutating quoted literals.  Don't
compare initial and final values of arguments, since they may have
been mutated.
(cl-set-difference-test, cl-set-exclusive-or-test): Use fresh
arguments to check for absence of mutation.

(cherry picked from commit 52034675a2e774fb0f819603f3d3f293fdeb448b)

7 days ago; Fix last change to cl-extra.el.
Basil L. Contovounesios [Thu, 13 Feb 2025 17:40:07 +0000 (18:40 +0100)]
; Fix last change to cl-extra.el.

(cherry picked from commit 9746fbc26415b5bff883b2134f316b2678528295)

7 days agoInline side-effect-free declarations in cl-lib.el
Stefan Kangas [Thu, 13 Feb 2025 03:24:05 +0000 (04:24 +0100)]
Inline side-effect-free declarations in cl-lib.el

* lisp/emacs-lisp/cl-macs.el: Move side-effect-free declarations from
here...
* lisp/emacs-lisp/cl-extra.el (cl-gcd, cl-lcm, cl-isqrt, cl-floor)
(cl-ceiling, cl-truncate, cl-round, cl-mod, cl-rem, cl-signum)
(cl-subseq, cl-list-length, cl-get, cl-getf):
* lisp/emacs-lisp/cl-lib.el (cl-plusp, cl-minusp, cl-oddp, cl-evenp)
(cl-fifth, cl-sixth, cl-seventh, cl-eighth, cl-ninth, cl-tenth)
(cl-ldiff, cl-pairlis):
* lisp/emacs-lisp/cl-seq.el (cl-endp): ...to have them inline here.

* lisp/emacs-lisp/cl-macs.el: Move side-effect-and-error-free
declarations from here...
* lisp/emacs-lisp/cl-extra.el (cl-equalp, cl-random-state-p):
* lisp/emacs-lisp/cl-lib.el (cl-list*, cl-acons): ...to have them inline
here.  (Bug#76247)

(cherry picked from commit 7d9e67be13f72b7c7c8815f651c8fa5f74a79c54)

7 days agoSupport non-ascii SMTP user and password strings
Robert Pluim [Fri, 17 Jan 2025 15:44:08 +0000 (16:44 +0100)]
Support non-ascii SMTP user and password strings

The user and more importantly the password used when
authenticating SMTP connections MUST be encoded in utf-8, and
'base64-encode-string' requires unibyte strings, so call
'encode-coding-string' on them before base64 encoding them in
case they are multibyte strings.

This applies to the CRAM-MD5, LOGIN, and PLAIN auth methods.
XOAUTH2 access tokens are specified to contain only characters
in the range #x20-#x7E (SPC through ~), so utf-8 encoding is not
necessary.

See RFC 4616 and RFC 4954 (or their later updates).

* lisp/mail/smtpmail.el (smtpmail-try-auth-method): Encode user
and password using utf-8 before base64 encoding.

(Bug#75628)

(cherry picked from commit 745847ba8eca27e981a50ad91b628bbce35bb0f3)

7 days agoTeach gnus/message about international Re: variants
Robert Pluim [Thu, 22 Aug 2024 16:49:12 +0000 (18:49 +0200)]
Teach gnus/message about international Re: variants

* lisp/mail/mail-utils.el (mail-re-regexps): New defcustom,
contains the components used to construct 'rmail-re-abbrevs' and
'message-subject-re-regexp'.
* lisp/gnus/message.el (message-subject-re-regexp): Derive from
'mail-re-regexps'.
(message-strip-subject-re): Make the match case-insensitive.
* lisp/mail/rmail.el (rmail-re-abbrevs): Derive from
'mail-re-regexps'.  Update 'rmail-reply-regexp' when it changes.
(rmail-reply-regexp): Set to nil, 'rmail-re-abbrevs' will set
it.

* doc/emacs/rmail.texi (Rmail Reply): Describe
'mail-re-regexps'.
* doc/misc/message.texi (Message Headers): Describe
'mail-re-regexps'.

(Bug#72442)

(cherry picked from commit 315519fa7c8e5e142b6abca7b78a47ad3c0cbe37)

7 days agoUse 'const' instead of 'symbol' in 'c-ts-mode-indent-style
Robert Pluim [Wed, 12 Feb 2025 10:34:16 +0000 (11:34 +0100)]
Use 'const' instead of 'symbol' in 'c-ts-mode-indent-style

The 'symbol' widget is for when the user is expected to enter a
symbol; when using a definite symbol, 'const' is preferred.

* lisp/progmodes/c-ts-mode.el (c-ts-mode-indent-style): Use
'const' to define the options for a 'choice' widget.

(cherry picked from commit 2f8c2e64e03d85e2093b47e15aa35497054f922f)

8 days agoRevert "New command project-find-matching-file"
Eshel Yaron [Fri, 14 Feb 2025 07:36:32 +0000 (08:36 +0100)]
Revert "New command project-find-matching-file"

This reverts commit 5feb78ce7fda711dfd5e332bb04c951d312baadb.

8 days agoDrop package-x.el all together
Eshel Yaron [Thu, 13 Feb 2025 11:54:55 +0000 (12:54 +0100)]
Drop package-x.el all together

8 days ago* lisp/net/tramp-archive.el (tramp-archive-all-gvfs-methods): Use `cdadr'.
Michael Albinus [Thu, 13 Feb 2025 10:21:30 +0000 (11:21 +0100)]
* lisp/net/tramp-archive.el (tramp-archive-all-gvfs-methods): Use `cdadr'.

(cherry picked from commit 167157fc210ae078e683c80dc650e6a2bb5a6050)

8 days agoBind sieve-refresh-scriptlist to 'g' in sieve-mode
Björn Bidar [Fri, 31 Jan 2025 01:24:44 +0000 (03:24 +0200)]
Bind sieve-refresh-scriptlist to 'g' in sieve-mode

* lisp/net/sieve.el (sieve-manage-mode-map): Bind
`sieve-refersh-scriptlist' to 'g' to refresh buffer.
(sieve-refresh-scriptlist): Highlight in docstring that the function
updates the current sieve buffer.  (Bug#75956)

* doc/misc/sieve.texi (Managing Sieve): Document new keybinding and the
existing `sieve-refresh-scriptlist` function.

(cherry picked from commit 6967587daef027b0f4fd917b5181b43e45c7cb56)

8 days agoAdd missing documentation strings in sieve.el
Björn Bidar [Fri, 31 Jan 2025 00:53:34 +0000 (02:53 +0200)]
Add missing documentation strings in sieve.el

* lisp/net/sieve.el (sieve-activate, sieve-deactivate-all)
(sieve-remove, sieve-edit-script, sieve-refersh-scriptlist)
(sieve-upload, sieve-upload-and-burry, sieve-upload-and-kill):
Add documentation strings.  (Bug#75956)

(cherry picked from commit c5bfaf1ae3ebc258b9d1597ea93df57a55272dcc)

8 days agoMake sieve-manage prompt also for port number
Björn Bidar [Fri, 31 Jan 2025 00:34:19 +0000 (02:34 +0200)]
Make sieve-manage prompt also for port number

(sieve-manage): Optionally read port number when called interactively.
Add documentation string.  (Bug#75956)

(cherry picked from commit 07d1fdb1ea259e1832e0b0c03b2d2fc9a052037f)

8 days agoAvoid cl-caaar etc. compatibility aliases in Tramp
Stefan Kangas [Thu, 13 Feb 2025 06:48:07 +0000 (07:48 +0100)]
Avoid cl-caaar etc. compatibility aliases in Tramp

* lisp/net/tramp-gvfs.el (tramp-gvfs-handler-askquestion):
(tramp-gvfs-handler-mounted-unmounted):
(tramp-gvfs-connection-mounted-p):
* lisp/net/tramp-sh.el (tramp-sh-gio-monitor-process-filter):
(tramp-sh-inotifywait-process-filter): Don't use cl-caaar
etc. compatibility aliases.  (Bug#76249)

(cherry picked from commit d06606ff42b14d725c487ddc57005bc7a2eec1ba)

8 days agoFix defcustom :type of gnus-logo-colors
Stefan Kangas [Thu, 13 Feb 2025 08:25:12 +0000 (09:25 +0100)]
Fix defcustom :type of gnus-logo-colors

* lisp/gnus/gnus.el (gnus-logo-colors): Fix defcustom :type.

(cherry picked from commit 2dad63cac31cfb9dc1dbb003f93fd4768c15082b)

8 days agoImprove read-directory-name docstring
Stefan Kangas [Thu, 13 Feb 2025 07:34:24 +0000 (08:34 +0100)]
Improve read-directory-name docstring

* lisp/files.el (read-directory-name): Improve docstring to be more
similar to that of 'read-file-name', and refer back to it where
appropriate.

(cherry picked from commit 069c8ff6d5860486ca8b97060002e80c3c4bdbc0)

8 days agoAdd optional PREDICATE argument to read-directory-name
Joseph Turner [Fri, 29 Sep 2023 03:27:47 +0000 (20:27 -0700)]
Add optional PREDICATE argument to read-directory-name

* lisp/files.el (read-directory-name): Add optional PREDICATE argument.
* doc/lispref/minibuf.texi (Reading File Names): Document above change.
(Bug#66224)

(cherry picked from commit 3f1d84d593bf864b72043ff2a598b18b5e9b05be)

8 days agoIncrease recentf-max-saved-items to 25
Stefan Kangas [Thu, 13 Feb 2025 05:23:17 +0000 (06:23 +0100)]
Increase recentf-max-saved-items to 25

* lisp/recentf.el (recentf-max-saved-items): Increase default to 25.

(cherry picked from commit 2e9413255fb8cbd0c8481ca6f863b37df3e9008d)

8 days ago; Properly quote some functions in cl-lib as such
Stefan Kangas [Thu, 13 Feb 2025 02:59:30 +0000 (03:59 +0100)]
; Properly quote some functions in cl-lib as such

(cherry picked from commit ab43d956cad94da7bf3c325821666e408af4c73d)

8 days agoproject-(remember|forget)-projects-under: Improve docstrings
Ship Mints [Thu, 13 Feb 2025 00:14:57 +0000 (02:14 +0200)]
project-(remember|forget)-projects-under: Improve docstrings

* lisp/progmodes/project.el (project-forget-projects-under)
(project-remember-projects-under): Clarify docstrings (bug#76234).

(cherry picked from commit 6077bbfc3d4a4aa042b364d31dd681e9f7ab7f30)

8 days agoChange the project-switch-project prompt to include the dir name
shipmints [Wed, 12 Feb 2025 22:29:37 +0000 (00:29 +0200)]
Change the project-switch-project prompt to include the dir name

* lisp/progmodes/project.el:
(project--switch-project-command): Add new argument DIR.
Change the prompt to "Command in `xxx': ..." (bug#76235).
(project-switch-project): Pass DIR to the above function.

(cherry picked from commit 86e17fbcbddb57b0653b7046202e54624c477836)

8 days agoConsolidate side-effect-free decls in cl-lib
Stefan Kangas [Wed, 12 Feb 2025 18:55:34 +0000 (19:55 +0100)]
Consolidate side-effect-free decls in cl-lib

* lisp/emacs-lisp/cl-macs.el: Consolidate two identical loops with
side-effect-free declarations into one.

(cherry picked from commit b93cdeb04769fde8e553a03ed4c68b442f9c43b4)

8 days agoAvoid cl-caaar etc. compatibility macros in Org
Stefan Kangas [Wed, 12 Feb 2025 17:33:59 +0000 (18:33 +0100)]
Avoid cl-caaar etc. compatibility macros in Org

* lisp/org/ob-core.el (org-babel-process-params):
* lisp/org/org-agenda.el (org-agenda-span-to-ndays):
* lisp/org/org-capture.el (org-capture-set-target-location):
* lisp/org/org.el (org-set-effort): Don't use cl-caaar, cl-caadr,
etc. compatibility macros in Org.  We don't need to use them, since Org
requires Emacs 26.1.

(cherry picked from commit a669e6a37610f78115f473176f3914cea4c20fb2)

8 days ago; * etc/symbol-releases.eld: Add caaar, caadr, etc.
Stefan Kangas [Wed, 12 Feb 2025 17:26:43 +0000 (18:26 +0100)]
; * etc/symbol-releases.eld: Add caaar, caadr, etc.

(cherry picked from commit d5f788e016131421df8bdc1c5c7e0378d5143729)

8 days agoDelete comments about obsolete cl--compiler-macro-cXXr
Stefan Kangas [Wed, 12 Feb 2025 17:11:59 +0000 (18:11 +0100)]
Delete comments about obsolete cl--compiler-macro-cXXr

* lisp/emacs-lisp/cl-macs.el:
* lisp/subr.el: Delete obsolete comments about compatibility alias
cl--compiler-macro-cXXr.

(cherry picked from commit 816b9b4a0bf7c37883b9bceb8da196bba1855608)

8 days agoDeclare caar, cadr, etc. as side-effect-free
Stefan Kangas [Wed, 12 Feb 2025 17:05:11 +0000 (18:05 +0100)]
Declare caar, cadr, etc. as side-effect-free

* lisp/subr.el (caar, cadr, cdar, cddr, caaar, caadr, cadar, caddr)
(cdaar, cdadr, cddar, cdddr, caaaar, caaadr, caadar, caaddr, cadaar)
(cadadr, caddar, cadddr, cdaaar, cdaadr, cdadar, cdaddr, cddaar)
(cddadr, cdddar, cddddr): Declare side-effect-free.
* lisp/emacs-lisp/cl-macs.el: Remove redundant declarations of
compatibility aliases for the above functions as side-effect-free.

(cherry picked from commit f478d2d1b935f609b6c390c0ef961c00b295bbd7)

8 days ago; Skip commit 31381f982dd6f17132a77bc41735a2fcf7cf5d6b
Eshel Yaron [Thu, 13 Feb 2025 11:52:12 +0000 (12:52 +0100)]
; Skip commit 31381f982dd6f17132a77bc41735a2fcf7cf5d6b

8 days agoFix treesit-outline related settings
Juri Linkov [Wed, 12 Feb 2025 18:31:22 +0000 (20:31 +0200)]
Fix treesit-outline related settings

* lisp/treesit.el (treesit-outline-level): Use level 1 by default
since treesit-outline--at-point now always returns the current node.

* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
Use 'bos' instead of 'bol'.  Add "singleton_class" to
'treesit-outline-predicate'.  Use new condition 'named' in
'treesit-outline-predicate' (bug#74963).

(cherry picked from commit 44c11cd4241ffc8636135bc41ac718101666d34d)

8 days ago; * lisp/treesit.el: Remove TODO for integration with thing-at-point.
Juri Linkov [Wed, 12 Feb 2025 17:41:12 +0000 (19:41 +0200)]
; * lisp/treesit.el: Remove TODO for integration with thing-at-point.

At this point, thing-at-point with all standard things
is already supported by treesit, for example:
"(thing-at-point 'defun)" by treesit-beginning-of-defun,
"(thing-at-point 'sexp)" by treesit-forward-sexp,
"(thing-at-point 'list)" by treesit-up-list,
"(thing-at-point 'sentence)" by treesit-forward-sentence,
"(thing-at-point 'comment)" by treesit-forward-comment.
https://lists.gnu.org/archive/html/emacs-devel/2025-02/msg00384.html

(cherry picked from commit b514ec87b618e4ee9a95b248eb55c5e0cc69949c)

8 days agoNew command project-find-matching-file
Dmitry Gutov [Wed, 12 Feb 2025 17:17:29 +0000 (19:17 +0200)]
New command project-find-matching-file

* lisp/progmodes/project.el (project--read-project-list):
Ensure that the directory has a trailing '/' (bug#75983).

(cherry picked from commit 82da36286265bb34baf39425a880dc11285648f2)

8 days agoFix recently introduced test failure
Stefan Kangas [Wed, 12 Feb 2025 16:40:51 +0000 (17:40 +0100)]
Fix recently introduced test failure

* test/lisp/progmodes/go-ts-mode-tests.el
(go-mod-ts-mode-test-indentation): Fix test.

(cherry picked from commit b9552ad8442ad20ed47b2d312a666585e23958fa)

8 days agoMark package-x.el as obsolete
Stefan Kangas [Wed, 12 Feb 2025 16:33:52 +0000 (17:33 +0100)]
Mark package-x.el as obsolete

* lisp/obsolete/package-x.el: Add "Obsolete-since" header.  (Bug#76194)
* doc/lispref/package.texi (Package Archives): Don't document package-x.

(cherry picked from commit 5d4927192a23bceb1403bd0170d5b4849162262d)

8 days agoMove package-x.el to lisp/obsolete
Stefan Kangas [Wed, 12 Feb 2025 16:32:33 +0000 (17:32 +0100)]
Move package-x.el to lisp/obsolete

* lisp/emacs-lisp/package-x.el: Move from here...
* lisp/obsolete/package-x.el: ...to here.  (Bug#76194)

(cherry picked from commit f7867e685659ede4fafa8691381cfe08becc6ad6)

8 days ago; Fix indentation to appease git hooks
Stefan Kangas [Wed, 12 Feb 2025 16:32:03 +0000 (17:32 +0100)]
; Fix indentation to appease git hooks

* lisp/emacs-lisp/package-x.el (package-upload-buffer-internal):
Fix indentation.

(cherry picked from commit cdf9f3ae19d9b5f82a3677f4a9b7585e956cded6)

8 days agoMake reading project--list safer
Ship Mints [Wed, 12 Feb 2025 16:02:28 +0000 (18:02 +0200)]
Make reading project--list safer

* lisp/progmodes/project.el (project--read-project-list):
Ensure that each directory has a trailing '/' (bug#75983).

(cherry picked from commit 2bb38cc46dfedfb1547746d9123d6b433ccdaca4)

9 days agoHandle negative frame position values in xterm.c (Bug#76190)
Martin Rudalics [Wed, 12 Feb 2025 09:54:28 +0000 (10:54 +0100)]
Handle negative frame position values in xterm.c  (Bug#76190)

* src/xterm.c (x_calc_absolute_position): Always handle negative
positions when XNegative or YNegative were set (Bug#76190).

(cherry picked from commit 8eef8907392942a8ececc0f989fa0bb031f4af18)

9 days agoAllow URL-FORMAT as string and function in bug-reference-setup-from-vc-alist
Tassilo Horn [Wed, 12 Feb 2025 09:33:08 +0000 (10:33 +0100)]
Allow URL-FORMAT as string and function in bug-reference-setup-from-vc-alist

That's a slight simplification resulting from bug#72735.

* lisp/progmodes/bug-reference.el (bug-reference-setup-from-vc-alist):
Rename URL-FORMAT-FN to URL-FORMAT and mention it may be string or
function.
* (bug-reference-maybe-setup-from-vc): Handle the new case where
bug-url-fmt is just a string rather than a function.

(cherry picked from commit b5404a205c1a1aa858dc430ffaa32a35c744e244)

9 days ago; Fix up last commit
Stefan Kangas [Wed, 12 Feb 2025 08:17:37 +0000 (09:17 +0100)]
; Fix up last commit

* lisp/emulation/cua-base.el (cua--copy-or-cut-handler): Extract
function from...
(cua-cut-handler, cua-copy-handler): ...here.
(cua-cut-to-global-mark, cua-copy-to-global-mark): Declare.

(cherry picked from commit 2254f7159813c345021896605be177e43c7ccb6d)

9 days agoFix 'C-x C-c' with cua-prefix-override-inhibit-delay nil
Siyuan Chen [Mon, 27 May 2024 16:29:50 +0000 (00:29 +0800)]
Fix 'C-x C-c' with cua-prefix-override-inhibit-delay nil

* lisp/emulation/cua-base.el (cua-cut-handler, cua-copy-handler): New
functions to fix cut and paste when 'cua-prefix-override-inhibit-delay'
is nil.  (Bug#71230)

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

9 days agoX11 drag-and-drop corrections
Po Lu [Wed, 12 Feb 2025 07:49:12 +0000 (15:49 +0800)]
X11 drag-and-drop corrections

* lisp/x-dnd.el (x-dnd-handle-drag-n-drop-event): Take cdddr of
client-message, skipping the selection information.
(x-dnd-do-direct-save): Do not erase the local copy of a remote
file if it was not in fact copied on behalf of the recipient.
(x-dnd-handle-xds-drop): Return proper action.

* src/xterm.c (x_term_init): Remove unused variable on non-GTK
builds.

(cherry picked from commit fa4260594fd2aae1c7d3e829b3cb15e344bc25ff)

9 days agoAdd go-work-ts-mode for Go workspace files
Gabriel Santos [Thu, 21 Nov 2024 02:07:28 +0000 (23:07 -0300)]
Add go-work-ts-mode for Go workspace files

* lisp/progmodes/eglot.el (eglot-server-programs): Add go-work-ts-mode.
* lisp/progmodes/go-ts-mode.el
(Commentary): Add the repositories for the grammars.
(go-work-ts-mode--indent-rules, go-work-ts-mode--keywords)
(go-work-ts-mode--font-lock-settings): New variables.
(go-work-ts-mode--directive-matcher, go-work-ts-mode): New functions.
(go-mod-ts-mode--directive-matcher): Rename from
go-mod-ts-mode--in-directive-p.  Be more specific on the directive
location (modules).  Replace mention of nil with function.  Use member
instead of pcase to check node types.

* admin/notes/tree-sitter/build-module/batch.sh
* admin/notes/tree-sitter/build-module/build.sh: Add go-work support.

* test/lisp/progmodes/go-ts-mode-resources/font-lock-package.go:
* test/lisp/progmodes/go-ts-mode-resources/indent-mod.erts:
* test/lisp/progmodes/go-ts-mode-resources/indent-work.erts:
New files for testing indentation and font-locking for Go
module and workspace files.
* test/lisp/progmodes/go-ts-mode-tests.el: Add tests for Go module and
workspace files.  (Bug#74461)

* etc/NEWS: Announce go-work-ts-mode.

(cherry picked from commit aade1b707c6b4932ed023f387d49324c6a7123eb)

9 days agoimage-dired: Add extra keybinds for navigation
Gabriel Santos [Mon, 6 Jan 2025 19:56:31 +0000 (16:56 -0300)]
image-dired: Add extra keybinds for navigation

* lisp/image/image-dired.el (image-dired-thumbnail-mode-map):
Bind previously unused keys for alternative navigation.  (Bug#75410)

(cherry picked from commit 7aa42917288829406d12c6d5c537ef9a720326a2)

9 days agoPrint bare symbols for EMACS_GENERATE_DYNVARS
Basil L. Contovounesios [Wed, 18 Oct 2023 13:33:51 +0000 (15:33 +0200)]
Print bare symbols for EMACS_GENERATE_DYNVARS

* lisp/emacs-lisp/bytecomp.el (byte-compile--load-dynvars): Remove
redundant goto-char.
(byte-compile-file): Bind print-symbols-bare around .dynvars file
generation.  (Bug#66628)

(cherry picked from commit dcc4cec04ada100d4389393500bdc94018e180c8)

9 days agoSubstitute all emacsclient occurrences in emacsclient.desktop
Lin Jian [Mon, 29 Jan 2024 22:11:26 +0000 (06:11 +0800)]
Substitute all emacsclient occurrences in emacsclient.desktop

After commit "From .desktop files, reuse a frame or start a new
Emacs as required" on 2021-06-30, there are two emacsclient
occurrences for the Exec key of etc/emacsclient.desktop.
Before this change, only the first occurrence is substituted.

* Makefile.in (install-etc): Substitute all emacsclient
occurrences in emacsclient.desktop.  (Bug#68803)

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

9 days agoRemove an unneeded sed command for emacs.service
Lin Jian [Mon, 29 Jan 2024 22:12:43 +0000 (06:12 +0800)]
Remove an unneeded sed command for emacs.service

After commit e5348f125ff03ac70713e5b227f9e51f759a587b on
2020-12-14, there is no ExecStop in etc/emacs.service.
* Makefile.in (install-etc): Remove an unneeded sed command for
etc/emacs.service.

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

9 days agoHighlight multiple symbols in single quotes in CL strings
Thuna [Fri, 18 Nov 2022 14:56:38 +0000 (15:56 +0100)]
Highlight multiple symbols in single quotes in CL strings

* lisp/emacs-lisp/lisp-mode.el (lisp-cl-font-lock-keywords-2): When
multiple space-delimited symbols are single quoted together (e.g "`foo
bar'"), highlight them.  (Bug#59360)

(cherry picked from commit 32700f38fdd279cb79e3b78b35cb8666f5cd08a7)

9 days ago; Add a utility script for retrieving Android port dependencies
Po Lu [Wed, 12 Feb 2025 03:14:29 +0000 (11:14 +0800)]
; Add a utility script for retrieving Android port dependencies

* admin/download-android-deps.sh: New file.

(cherry picked from commit ea3a937176fbf038a6f6f5cc7b47fb8cecdd894a)

9 days agoFix 'rcirc-buffer-process' not working on channel buffers
Thuna [Mon, 19 Dec 2022 08:33:29 +0000 (09:33 +0100)]
Fix 'rcirc-buffer-process' not working on channel buffers

* lisp/net/rcirc.el (rcirc-buffer-process): Look at BUFFER's
'rcirc-server-buffer's 'rcirc-process' instead.  Signal an error if it
has none.  (Bug#60191)

(cherry picked from commit fb90e21af1b05d8cdeac9ae62b03b76ae9c74ae0)

9 days agoFix Gnus logo color customization
Trevor Arjeski [Wed, 27 Nov 2024 07:12:07 +0000 (10:12 +0300)]
Fix Gnus logo color customization

Fix a bug where customizing `gnus-logo-color-style' from use-package's
:custom keyword did not set `gnus-logo-colors' before Gnus is launched.

This patch does the following:
- Implements a :set keyword on `gnus-logo-color-style' which will
  correctly set `gnus-logo-colors'
- Exposes `gnus-logo-colors' using `defcustom' for more fine-grained
  customization
- Uses :set-after on `gnus-logo-colors' so that it is set after
  `gnus-logo-color-style'

* lisp/gnus/gnus.el (gnus-logo-colors): Convert to defcustom.
(gnus-logo-color-style): Add :set property.  (Bug#74554)

(cherry picked from commit 77d0078a6c50c95b63ac7c3739ee325264deff34)

9 days ago; Update :version tag of x-gtk-stock-map
Stefan Kangas [Wed, 12 Feb 2025 02:34:12 +0000 (03:34 +0100)]
; Update :version tag of x-gtk-stock-map

* lisp/term/pgtk-win.el (x-gtk-stock-map):
* lisp/term/x-win.el (x-gtk-stock-map): Update :version tags.

(cherry picked from commit 481336967cc5d262cec2b4822b83752348bbd494)

9 days agoAdd icons used by 'mpc.el' to 'x-gtk-stock-map'
john muhl [Wed, 19 Jun 2024 16:47:42 +0000 (11:47 -0500)]
Add icons used by 'mpc.el' to 'x-gtk-stock-map'

* lisp/term/x-win.el (x-gtk-stock-map):
* lisp/term/pgtk-win.el (x-gtk-stock-map): Include tool-bar icons
used by 'mpc.el'.

(cherry picked from commit 0184acdd3174e95b79756433b9c8c08143737c81)

9 days agoEglot: use Eldoc in eglot-hierarchy-mode
João Távora [Tue, 11 Feb 2025 16:50:23 +0000 (16:50 +0000)]
Eglot: use Eldoc in eglot-hierarchy-mode

Use it to show details of the thing at point, like the full
signature and the locus of the definition.

* lisp/progmodes/eglot.el: Add optional arg MODE.
(eglot--hierarchy-source-major-mode): New defvar.
(eglot--hierarchy-1): Adjust.
(eglot-hierarchy-mode): Set eldoc stuff.
(eglot-hierarchy-center-on-node): Cosmetic fix.
(eglot-hierarchy-detail-eldoc-function)
(eglot-hierarchy-locus-eldoc-function): New eldoc functions.

(cherry picked from commit 3fd0b802de20dc83b5d5236b6d458df73c9d4e77)

9 days agoRemove `smtpmail-address-buffer' temporary buffer
Manuel Giraud [Mon, 15 Jul 2024 15:33:21 +0000 (17:33 +0200)]
Remove `smtpmail-address-buffer' temporary buffer

* lisp/mail/smtpmail.el (smtpmail-address-buffer): Remove variable.
(smtpmail-send-it):
(smtpmail-deduce-address-list): Replace `smtpmail-address-buffer' with a
temporary buffer.  Set `smtpmail-recipient-address-list' only in
caller.  (Bug#72128)

(cherry picked from commit e2991272f286af94f13d9d78ac609f08ad77183e)

9 days agoDelete redundant lambdas around unary functions
Stefan Kangas [Tue, 11 Feb 2025 18:04:00 +0000 (19:04 +0100)]
Delete redundant lambdas around unary functions

This is not just stylistic, but also slightly faster.  These are all
regular defuns, of course, as this won't work with macros and defsubsts.

* lisp/calc/calc-nlfit.el (math-nlfit-fit-curve)
(calc-fit-hubbert-linear-curve):
* lisp/calendar/cal-tex.el (cal-tex-latexify-list):
* lisp/calendar/todo-mode.el (todo-sort):
* lisp/cedet/semantic/ctxt.el (semantic-ctxt-end-of-symbol-default)
(semantic-ctxt-current-symbol-default):
* lisp/cedet/semantic/symref.el (semantic-symref-result-get-files):
* lisp/cedet/semantic/texi.el (semantic-texi-command-completion-list):
* lisp/descr-text.el (describe-char):
* lisp/emacs-lisp/eieio-datadebug.el
(data-debug-add-specialized-thing):
* lisp/emacs-lisp/rmc.el (read-multiple-choice--short-answers):
* lisp/eshell/em-pred.el (eshell-modifier-alist):
* lisp/gnus/gnus-cache.el (gnus-cache-articles-in-group):
* lisp/gnus/gnus-dired.el (gnus-dired-attach):
* lisp/help-mode.el (help-package-def):
* lisp/ibuf-ext.el (ibuffer-mark-modified-buffers):
* lisp/image/image-dired.el:
* lisp/international/quail.el (quail-keyseq-translate)
(quail-get-translations):
* lisp/isearch.el (isearch-pre-command-hook)
(search-within-boundaries):
* lisp/mail/supercite.el (sc-ask):
* lisp/mh-e/mh-e.el (mh-variant-set):
* lisp/net/rcirc.el (rcirc-nick-channels, rcirc-channel-nicks):
(rcirc-browse-url):
* lisp/obsolete/thumbs.el (thumbs-cleanup-thumbsdir):
* lisp/org/org-agenda.el (org-agenda-filter-completion-function):
* lisp/org/org-table.el (org-table-eval-formula):
* lisp/org/org.el (org-set-regexps-and-options):
* lisp/org/ox.el (org-export--get-inbuffer-options):
* lisp/ses.el (ses-range):
* lisp/textmodes/emacs-news-mode.el (emacs-news--buttonize):
* lisp/textmodes/ispell.el (ispell-begin-tex-skip-regexp):
* lisp/vc/vc-cvs.el (vc-cvs-stay-local-p):
* lisp/window.el (window--state-get-1):
* test/lisp/emacs-lisp/shortdoc-tests.el (shortdoc-all-groups-work):
Delete redundant lambdas around unary functions.  (Bug#66816)

(cherry picked from commit 0e76716c5faa5e91ac3913b02ba4dc690cf5df83)

9 days ago; * lisp/treesit.el: Remove implemented TODO for integration with hideshow.
Juri Linkov [Tue, 11 Feb 2025 17:47:21 +0000 (19:47 +0200)]
; * lisp/treesit.el: Remove implemented TODO for integration with hideshow.

(cherry picked from commit 14e0f214e6d144030d696afc3ed2f2abdd3c9f06)

9 days agoImprove outline-predicate of ts-modes (bug#74448)
Juri Linkov [Tue, 11 Feb 2025 17:42:33 +0000 (19:42 +0200)]
Improve outline-predicate of ts-modes (bug#74448)

* lisp/progmodes/c-ts-mode.el (c-ts-mode--outline-predicate):
Simplify since 'treesit-outline-search' was fixed in 302274b1862.
Use 'treesit-parent-until' to handle the case with "pointer_declarator".

* lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode--outline-predicate):
Add "block_sequence_item".

(cherry picked from commit 58c09c3d36075c3a1a9f178fd8ee019309e6f403)

9 days agoEglot: fix thinko in previous commit
João Távora [Tue, 11 Feb 2025 16:14:43 +0000 (16:14 +0000)]
Eglot: fix thinko in previous commit

* lisp/progmodes/eglot.el (eglot--hierarchy-1): 'roots' is a
vector.

(cherry picked from commit 3e699b3047af70bc8d30e21b295b98dbd6797e9c)

9 days ago; Skip commit 13608ad64d13145df88b86a8efa893be42244792
Eshel Yaron [Wed, 12 Feb 2025 10:49:10 +0000 (11:49 +0100)]
; Skip commit 13608ad64d13145df88b86a8efa893be42244792

9 days ago; Don't document a complicated default
Stefan Kangas [Tue, 11 Feb 2025 08:12:07 +0000 (09:12 +0100)]
; Don't document a complicated default

* doc/misc/message.texi (Superseding): Don't document the default value
of 'message-ignored-supersedes-headers' here; the list was out-of-date,
and is likely to become out-of-date again in the future if updated.
It's also easy enough to look up for users outside of Info.

(cherry picked from commit 19791839cfbb9202aff8a8d476ec76741592c97d)

9 days ago; Skip commit 88bc748f52fe3ed161d5c7b3aca1de0fb0fa1209
Eshel Yaron [Wed, 12 Feb 2025 10:48:47 +0000 (11:48 +0100)]
; Skip commit 88bc748f52fe3ed161d5c7b3aca1de0fb0fa1209

9 days agoEglot: error if no hierarchies available at point
João Távora [Tue, 11 Feb 2025 15:28:59 +0000 (15:28 +0000)]
Eglot: error if no hierarchies available at point

* lisp/progmodes/eglot.el (eglot--hierarchy-1): Error if no
hierarchy at point.

(cherry picked from commit 9d2d8a4d39441ad9de3862164aa57dbdf5874baf)