Po Lu [Mon, 17 Feb 2025 03:33:50 +0000 (11:33 +0800)]
Fix crash in frame deletion on Android
* java/org/gnu/emacs/EmacsWindow.java (destroyHandle):
Invalidate the input focus in the UI thread, as is proper.
(cherry picked from commit
e3dc0ea2544dc09908546c6e6baba47371cbc176)
Po Lu [Mon, 17 Feb 2025 02:56:37 +0000 (10:56 +0800)]
* src/pgtkterm.c (pgtk_enumerate_devices): Circumvent bug#76239.
(cherry picked from commit
e34ea5db5f1c09582e3779828ba248eec5769eb2)
Stefan Kangas [Mon, 17 Feb 2025 01:21:26 +0000 (02:21 +0100)]
Add test for zerop
* test/lisp/subr-tests.el (subr-test-zerop): New test.
(cherry picked from commit
f2fb19d008f57d83053e7981eecded6ace9ab6c7)
Stefan Kangas [Mon, 17 Feb 2025 01:14:17 +0000 (02:14 +0100)]
; * etc/symbol-releases.eld: Add plistp.
(cherry picked from commit
e779d60ea1d490f22cb5d0d729abedff8dc909d3)
Stefan Kangas [Mon, 17 Feb 2025 00:53:55 +0000 (01:53 +0100)]
Remove some details on which files are loaded from cl.texi
* doc/misc/cl.texi (Naming Conventions): Remove section listing
functions that do not cause other files than cl-lib.el to be loaded.
It lacks practical relevance to the user, and is a hostage to changing
implementation details.
(cherry picked from commit
0d40deec20fb8e246b2bbc66afdcec37e3eecd4a)
Stefan Kangas [Mon, 17 Feb 2025 01:04:31 +0000 (02:04 +0100)]
Address FIXME in org-element-create
* lisp/org/org-element-ast.el (org-element-create): Address FIXME.
(cherry picked from commit
b417c0abebfa68d37dd07160b81ce5f7da6dd431)
Stefan Kangas [Mon, 17 Feb 2025 00:57:22 +0000 (01:57 +0100)]
Prefer cl-evenp/cl-oddp in some places
* lisp/erc/erc.el (erc-format-message):
* lisp/obsolete/thumbs.el (thumbs-emboss-image):
* lisp/org/org-capture.el (org-capture-escaped-%):
* lisp/org/org-element-ast.el (org-element-create):
* lisp/org/org-macro.el (org-macro-extract-arguments):
* lisp/org/org-persist.el (org-persist--get-collection):
* lisp/org/ox-odt.el (org-odt-get-table-cell-styles):
* lisp/org/ox.el (org-export--dispatch-ui):
* lisp/progmodes/cperl-mode.el (cperl-forward-re)
(cperl-find-pods-heres): Prefer 'cl-evenp/'cl-oddp' to free-coding them
in some files that already depend on cl-lib in run-time.
(cherry picked from commit
9efd11e5fd4324fb1686b802c15ae36046b0939a)
Elías Gabriel Pérez [Sun, 16 Feb 2025 19:21:52 +0000 (13:21 -0600)]
Add gtk-redo icon to x-gtk-stock-map to x-win.el
* lisp/term/x-win.el (x-gtk-stock-map): Add gtk-redo.
(cherry picked from commit
35d4316101752fc45bfd2301d891fb7b64060500)
Elías Gabriel Pérez [Sun, 16 Feb 2025 19:21:52 +0000 (13:21 -0600)]
Add gtk-redo icon to x-gtk-stock-map
* lisp/term/pgtk-win.el (x-gtk-stock-map): Add gtk-redo. (Bug#76349)
(cherry picked from commit
fc189cb83cf7284344a737e75b3ee56487b1c386)
João Távora [Sun, 16 Feb 2025 13:52:28 +0000 (13:52 +0000)]
Eglot: Improve fix to bug#66144
The :exit notification should also take an empty JSON object instead of
JSON null as its parameters.
* lisp/progmodes/eglot.el (eglot-shutdown): Use eglot--{} in
:exit notifcation, too.
(cherry picked from commit
e8470b79f1d56c4c887c0b5d2c326ad6449cbbea)
Stefan Monnier [Sun, 16 Feb 2025 16:49:16 +0000 (11:49 -0500)]
(set-auto-mode--find-matching-alist-entry): Fix bug#75961
* lisp/files.el (set-auto-mode--find-matching-alist-entry): Run the
MODE found in (REGEXP MODE t) before we replace it with something else.
* test/lisp/files-tests.el (files-tests--bug75961): New test.
(cherry picked from commit
504bdce73168257af14cd3b0200638fe9dd5c367)
Michael Albinus [Sun, 16 Feb 2025 10:00:46 +0000 (11:00 +0100)]
* lisp/man.el (Man-shell-file-name): Ensure a Bourne shell. (Bug#75308)
(cherry picked from commit
48f9d6aafea0a9790d1f78d4a4037cbcff4f799a)
Eshel Yaron [Tue, 18 Feb 2025 08:43:55 +0000 (09:43 +0100)]
Eli Zaretskii [Sun, 16 Feb 2025 06:49:12 +0000 (08:49 +0200)]
; * admin/authors.el (authors-aliases): Add "Elías Gabriel Pérez" (bug#76319).
(cherry picked from commit
0bc7b5a389b4a164448ab3ba981ca70a90dbb0b0)
Richard Stallman [Sat, 15 Feb 2025 11:40:35 +0000 (06:40 -0500)]
Change criteria for non-exit cualse: car s to or a bind*.
* lisp/emacs-lisp/cond-star.el (cond*-non-exit-clause-p):
Don't check for keywords; a clause is non-exit if it
starts with t or with a bind*.
(cherry picked from commit
f3ef16f86ffbb0ab5b76fa11e85eda5b1eff4b4b)
Eshel Yaron [Tue, 18 Feb 2025 08:41:38 +0000 (09:41 +0100)]
Eshel Yaron [Tue, 18 Feb 2025 08:41:35 +0000 (09:41 +0100)]
Eshel Yaron [Tue, 18 Feb 2025 08:40:22 +0000 (09:40 +0100)]
scope.el: Special handling for cl-letf
Eshel Yaron [Tue, 18 Feb 2025 08:39:59 +0000 (09:39 +0100)]
Simplify project-switch-project/commands
Eshel Yaron [Tue, 18 Feb 2025 08:38:23 +0000 (09:38 +0100)]
Drop project-file-history-behavior
Eshel Yaron [Tue, 18 Feb 2025 08:36:30 +0000 (09:36 +0100)]
project.el: Simplify -other-foo commands
Eshel Yaron [Tue, 18 Feb 2025 08:35:27 +0000 (09:35 +0100)]
(project--file-completion-table): Provide completion annotations
Eshel Yaron [Mon, 17 Feb 2025 08:24:56 +0000 (09:24 +0100)]
(project-forget-projects-under): Improve minibuffer action feedback
Eshel Yaron [Mon, 17 Feb 2025 08:18:43 +0000 (09:18 +0100)]
(minibuffer-current-input): Special case for directory names
Eshel Yaron [Mon, 17 Feb 2025 08:17:53 +0000 (09:17 +0100)]
Jump-to-definition support for error types
Eshel Yaron [Sat, 15 Feb 2025 19:34:27 +0000 (20:34 +0100)]
Michael Albinus [Sat, 15 Feb 2025 16:12:52 +0000 (17:12 +0100)]
Tramp: Don't require PuTTY 0.82 anymore
* doc/misc/tramp.texi: Revert last change.
* lisp/net/tramp-cache.el (with-tramp-saved-connection-properties):
Adapt `tramp-verbose' when completing host names.
* lisp/net/tramp-sh.el (tramp-methods) <plink, plinkx, pscp, psftp>:
Adapt `tramp-login-args' and `tramp-copy-args' arguments.
(tramp-plink-option-exists-p): New defun.
(tramp-ssh-or-plink-options): Rename from
`tramp-ssh-controlmaster-options'. Adapt further plink options.
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-maybe-open-connection): Adapt calls.
* lisp/net/tramp.el (tramp-file-name-handler): Don't touch
`tramp-verbose'.
* test/lisp/net/tramp-tests.el (top): Set `vc-handled-backends' to nil.
(tramp--test-enabled): Rearrange code.
(cherry picked from commit
5fcf07ac096a588a561fae07d8177acd8e45498b)
Stefan Monnier [Sat, 15 Feb 2025 16:12:36 +0000 (11:12 -0500)]
(diff-mode-test-font-lock): Fix spurious test failure
* test/lisp/vc/diff-mode-tests.el (diff-mode-test-font-lock):
Don't nitpick about non-face-affecting overlays.
(cherry picked from commit
7f2508e6e1176f16e9e6ac5b1aae43f07bb2cd8a)
Eli Zaretskii [Sat, 15 Feb 2025 12:53:59 +0000 (14:53 +0200)]
; Declare treesit.c functions
* lisp/textmodes/html-ts-mode.el (treesit-search-subtree):
* lisp/textmodes/yaml-ts-mode.el
(treesit-node-child-by-field-name): Declare.
(cherry picked from commit
b8b7c6fbfdd62dd830a3a946db1746821e1aec3f)
David Ponce [Sat, 8 Feb 2025 12:55:16 +0000 (13:55 +0100)]
Fix DOM printing
Fix DOM printing when an attribute value is not a string, which is
often the case in SVG DOM. Don't print attributes without a
value. Refresh the list of HTML boolean attributes.
* lisp/dom.el (dom--html-boolean-attribute-p): New function.
(dom-print): Use it. Convert attribute value to string before to
call `url-insert-entities-in-string'. Don't print attribute
without a value. Compute indentation column outside of loop and
call `indent-line-to' to indent line. (Bug#5928)
* test/lisp/dom-tests.el (dom-tests-print-svg)
(dom-tests-print-html-boolean): New tests.
(cherry picked from commit
7ad139d72108df78763b570b376fbe4aad952f72)
Eshel Yaron [Sat, 15 Feb 2025 19:33:57 +0000 (20:33 +0100)]
kobarity [Mon, 13 Jan 2025 13:38:42 +0000 (22:38 +0900)]
Fix string end search in python-nav-end-of-statement
* lisp/progmodes/python.el (python-nav-end-of-statement):
Change to look for string delimiter characters and check
syntax, instead of looking for string-delimiter syntax.
* test/lisp/progmodes/python-tests.el
(python-nav-end-of-statement-5): New test. (Bug#75387)
(cherry picked from commit
6491fee366f58a831689c57aa31493dd70bc2245)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
Eshel Yaron [Sat, 15 Feb 2025 19:30:40 +0000 (20:30 +0100)]
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)
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)
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)
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)
Eshel Yaron [Sat, 15 Feb 2025 19:30:22 +0000 (20:30 +0100)]
Eshel Yaron [Sat, 15 Feb 2025 19:30:19 +0000 (20:30 +0100)]
Eshel Yaron [Sat, 15 Feb 2025 19:30:15 +0000 (20:30 +0100)]
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)
Eshel Yaron [Sat, 15 Feb 2025 19:30:08 +0000 (20:30 +0100)]
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)
Eshel Yaron [Sat, 15 Feb 2025 19:29:56 +0000 (20:29 +0100)]
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)
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)
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)
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)
Eshel Yaron [Sat, 15 Feb 2025 19:26:25 +0000 (20:26 +0100)]
; (project-forget-projects-under): Improve interactive behavior
Eshel Yaron [Sat, 15 Feb 2025 16:47:04 +0000 (17:47 +0100)]
Remove some stale Texinfo references
Eshel Yaron [Sat, 15 Feb 2025 16:41:20 +0000 (17:41 +0100)]
; Update lisp/ldefs-boot.el
Eshel Yaron [Sat, 15 Feb 2025 16:37:42 +0000 (17:37 +0100)]
Fix bug#76305
Eshel Yaron [Sat, 15 Feb 2025 16:37:20 +0000 (17:37 +0100)]
Drop finder.el and package.el
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
Eshel Yaron [Fri, 14 Feb 2025 07:36:32 +0000 (08:36 +0100)]
Revert "New command project-find-matching-file"
This reverts commit
5feb78ce7fda711dfd5e332bb04c951d312baadb.
Eshel Yaron [Thu, 13 Feb 2025 11:54:55 +0000 (12:54 +0100)]
Drop package-x.el all together
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
Eshel Yaron [Thu, 13 Feb 2025 11:52:12 +0000 (12:52 +0100)]
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)
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)