]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 weeks ago; * lisp/term.el (term-control-seq-regexp): remove duplicate chars
Mattias Engdegård [Fri, 7 Feb 2025 17:52:38 +0000 (18:52 +0100)]
; * lisp/term.el (term-control-seq-regexp): remove duplicate chars

(cherry picked from commit bb86bd2bf674aafa49e505d5a78ce8207c5b4f4b)

3 weeks agoMake the rx `eval` form use lexical binding when active
Mattias Engdegård [Fri, 7 Feb 2025 17:52:26 +0000 (18:52 +0100)]
Make the rx `eval` form use lexical binding when active

Previously, it always used dynamic binding.

* lisp/emacs-lisp/rx.el (rx--expand-eval): Heed `lexical-binding`.
* test/lisp/emacs-lisp/rx-tests.el (rx-tests--x, rx-tests--get-x)
(rx-eval): Add test case.
* etc/NEWS: Announce.

(cherry picked from commit 89f88f06a4667a01612704e57f8af43ca19b82c0)

3 weeks ago; Move Markdown quotation detection to commit-msg hook
Po Lu [Mon, 17 Feb 2025 14:08:16 +0000 (22:08 +0800)]
; Move Markdown quotation detection to commit-msg hook

* build-aux/git-hooks/prepare-commit-msg: Don't detect markdown
quotes here...

* build-aux/git-hooks/commit-msg: but here, to intercept
interactively composed log messages.

(cherry picked from commit ba6779ab2afcd3177c9c118a0383aa21ad1ab45f)

3 weeks agoFix child coordinate calculation (bug#76321)
Gerd Möllmann [Mon, 17 Feb 2025 09:42:02 +0000 (10:42 +0100)]
Fix child coordinate calculation (bug#76321)

* src/dispnew.c (rect_intersect): Simplify.
(copy_child_glyphs): Compute child coordinates using child_xy.

(cherry picked from commit d80ac0fbaa09826342a9818014ae950acc7c0c03)

3 weeks ago; Skip commit ae4685c5e220ff4c7f37171e2a1087f2c9b178fa
Eshel Yaron [Tue, 18 Feb 2025 08:52:42 +0000 (09:52 +0100)]
; Skip commit ae4685c5e220ff4c7f37171e2a1087f2c9b178fa

3 weeks agoAdapt query-replace and lazy highlighting to text conversion
Po Lu [Mon, 17 Feb 2025 08:46:48 +0000 (16:46 +0800)]
Adapt query-replace and lazy highlighting to text conversion

* lisp/isearch.el (isearch-lazy-highlight-new-loop): Rather call
redisplay to guarantee a valid window-start than sit-for, to
account for cases where this function is called from an
after-change-function bound to a special input event quickly
followed by another event that does not modify the buffer.

* lisp/progmodes/prog-mode.el (treesit-node-at): Declare
function before references.

* lisp/replace.el (perform-replace): When querying, suppress
text conversion around the input loop.

(cherry picked from commit b236a2529dd90c9f506243b594e2a0d33afb0946)

3 weeks agoWhen ignoring parameters let 'split-window' split root window (Bug#76317)
Martin Rudalics [Mon, 17 Feb 2025 08:29:37 +0000 (09:29 +0100)]
When ignoring parameters let 'split-window' split root window (Bug#76317)

This fixes a behavior introduced by the fix of Bug#73527 that splits the
main window when the caller asks for splitting the root window.

* lisp/window.el (window--make-major-side-window): Bind
'ignore-window-parameters' to t so 'split-window' won't mess
with the WINDOW argument when it specifies the root window.
(split-window): If 'ignore-window-parameters' is non-nil, don't
try to split the main window instead of the root window.

(cherry picked from commit 310f62a9489b9c00d5e60d2ab16e7dc54afcadb9)

3 weeks agovc-revert-file: Support reverting directories
Sean Whitton [Mon, 17 Feb 2025 07:40:38 +0000 (15:40 +0800)]
vc-revert-file: Support reverting directories

* lisp/vc/vc.el (vc-revert-file): Support reverting directories
by calling vc-responsible-backend instead of vc-backend when
FILE is a directory (bug#37310, bug#43464).  Based on an
approach by Dmitry Gutov <dmitry@gutov.dev>.
(vc-rename-file): Add a FIXME to support reverting directories.
* etc/NEWS: Document the new functionality.

(cherry picked from commit 2d59974da71ec7ae20175d74269d4ca3d9be1cc7)

3 weeks agoAdd mhtml-ts-mode.
Vincenzo Pupillo [Fri, 14 Feb 2025 17:38:51 +0000 (18:38 +0100)]
Add mhtml-ts-mode.

New major-mode alternative to mhtml-mode, based on treesitter, for
editing files containing html, javascript and css.

* etc/NEWS: Mention the new mode and new functions.
* lisp/textmodes/mhtml-ts-mode.el: New file.
* lisp/progmodes/js.el
(js--treesit-thing-settings): New variable.
(js--treesit-font-lock-feature-list); New variable.
(js--treesit-simple-imenu-settings): New variable.
(js--treesit-defun-type-regexp): New variable.
(js--treesit-jsdoc-comment-regexp): New variable.
(js-ts-mode): Use of new variables instead of direct assignment of
values.
* lisp/textmodes/css-mode.el
(css-mode--menu): New variable.
(css-mode-map): Use new variable.
(css--treesit-font-lock-feature-list): New variable.
(css--treesit-simple-imenu-settings): New variable.
(css--treesit-defun-type-regexp): New variable.
(cs-ts-mode): Use of new variables instead of direct assignment of
values.
* lisp/textmodes/html-ts-mode.el
(html-ts-mode--treesit-things-settings): New variable.
(html-ts-mode--treesit-font-lock-feature-list): New variable.
(html-ts-mode--treesit-simple-imenu-settings): New variable.
(html-ts-mode--treesit-defun-type-regexp): New variable.
(html-ts-mode): Use of new variables instead of direct assignment of
values.
* lisp/treesit.el
(treesit-merge-font-lock-feature-list): New fuction.
(treesit-replace-font-lock-feature-settings): New fuction.
(treesit-modify-indent-rules): New function.

(cherry picked from commit 05a96fd39809f11a3820e2164b23ebf9df192b13)

3 weeks ago; More strongly discountenance Markdown-style quotes
Po Lu [Mon, 17 Feb 2025 07:17:00 +0000 (15:17 +0800)]
; More strongly discountenance Markdown-style quotes

* CONTRIBUTE (Commit messages): Discourage quoting with
Markdown-style pairs of backticks.

* build-aux/git-hooks/prepare-commit-msg: Detect and reject
commit messages with Markdown-style quotes.

(cherry picked from commit 0e4d08f3dc7c76008da9cd912933a931c6e3e8d9)

3 weeks agoPrefer '(evenp A)' to '(= 0 (% A 2))'
Stefan Kangas [Mon, 17 Feb 2025 04:10:33 +0000 (05:10 +0100)]
Prefer '(evenp A)' to '(= 0 (% A 2))'

* lisp/calc/calc-comb.el (math-prime-test):
* lisp/calc/calc-keypd.el (calc-keypad-press):
* lisp/calc/calc-math.el (math-sqrt):
(math-sqrt-raw):
* lisp/calc/calc-misc.el (math-iipow):
(math-iipow-show):
* lisp/calc/calc-stat.el (calcFunc-vmedian):
* lisp/calendar/cal-tex.el (cal-tex-cursor-filofax-2week):
(cal-tex-cursor-filofax-daily):
* lisp/elec-pair.el (electric-pair-post-self-insert-function):
* lisp/emacs-lisp/checkdoc.el (checkdoc-in-example-string-p):
* lisp/emacs-lisp/eieio.el (defclass):
* lisp/emacs-lisp/ert-x.el (ert-propertized-string):
* lisp/emacs-lisp/ert.el (ert--significant-plist-keys):
(ert--plist-difference-explanation):
* lisp/emacs-lisp/helper.el (Helper-help-scroller):
* lisp/emacs-lisp/pcase.el (pcase-setq):
* lisp/files-x.el (setq-connection-local):
* lisp/gnus/gnus-uu.el (gnus-uu-post-encoded):
* lisp/gnus/message.el (message-make-in-reply-to):
* lisp/gnus/nndiary.el (nndiary-last-occurrence):
(nndiary-next-occurrence):
* lisp/mail/rfc2047.el (rfc2047-decode-region):
* lisp/play/5x5.el (5x5-draw-grid):
* lisp/play/gametree.el (gametree-compute-reduced-score):
(gametree-insert-new-leaf):
(gametree-break-line-here):
* lisp/play/zone.el (zone-fret):
* lisp/vc/ediff-ptch.el (ediff-get-patch-buffer):
* lisp/yank-media.el (yank-media--utf-16-p): Prefer '(evenp A)' to
'(= 0 (% A 2))' and variations thereof.

(cherry picked from commit 89bdb57f24e0bdc1a3d33d7124d93c9a1b45fa1d)

3 weeks agoPrefer '(oddp A)' to '(= 1 (% A 2))'
Stefan Kangas [Mon, 17 Feb 2025 04:06:20 +0000 (05:06 +0100)]
Prefer '(oddp A)' to '(= 1 (% A 2))'

* lisp/align.el (align-match-tex-pattern):
* lisp/calc/calc-funcs.el (math-bernoulli-number):
* lisp/cedet/semantic/bovine/el.el (semantic-ctxt-current-assignment):
* lisp/comint.el (comint-within-quotes):
* lisp/emacs-lisp/chart.el (chart-axis-draw):
* lisp/emacs-lisp/cl-extra.el (cl-round):
* lisp/emacs-lisp/eieio.el (defclass):
* lisp/emacs-lisp/elint.el (elint-check-setq-form):
* lisp/emulation/cua-rect.el (cua--rectangle-right-side):
* lisp/progmodes/gud.el (gud-gdb-completions-1):
* lisp/ps-print.el (ps-end-job):
* lisp/ses.el (ses-center):
* lisp/vc/ediff-ptch.el (ediff-get-patch-buffer): Prefer '(oddp A)' to
'(= 1 (% A 2))' and variations thereof.

(cherry picked from commit e373a6e0d30c28045a0f33e662933c2c2660a220)

3 weeks agoPrefer oddp/evenp to free-coding them in tests
Stefan Kangas [Mon, 17 Feb 2025 03:52:49 +0000 (04:52 +0100)]
Prefer oddp/evenp to free-coding them in tests

* test/lisp/emacs-lisp/bindat-tests.el (bindat-test--sint):
* test/lisp/emacs-lisp/seq-tests.el (test-seq-drop-while)
(test-seq-take-while, test-seq-filter, test-seq-remove)
(test-seq-count, test-seq-some, test-seq-find, test-seq-every-p)
(test-seq-group-by):
* test/lisp/eshell/em-pred-tests.el (eshell-with-file-attributes-from-name):
* test/lisp/filenotify-tests.el (file-notify-test07-many-events)
(file-notify-test09-watched-file-in-watched-dir):
* test/src/floatfns-tests.el (bignum-expt, bignum-round):
* test/src/undo-tests.el (undo-test4): Prefer oddp/evenp to free-coding
them.

(cherry picked from commit 5ce746c3b0fa3a0b73796182960ff06cf3f31473)

3 weeks agoPrefer oddp/evenp to cl-oddp/cl-evenp
Stefan Kangas [Mon, 17 Feb 2025 02:33:54 +0000 (03:33 +0100)]
Prefer oddp/evenp to cl-oddp/cl-evenp

* lisp/calc/calc-ext.el (math-oddp):
* lisp/calc/calc-misc.el (math-evenp):
* lisp/calendar/todo-mode.el
(todo-adjusted-category-label-length, todo-insert-category-line)
(todo-update-categories-display):
* lisp/emacs-lisp/cl-macs.el (cl-defstruct):
* lisp/net/gnutls.el (open-gnutls-stream):
* lisp/tab-line.el (tab-line-tab-face-inactive-alternating):
* test/lisp/auth-source-tests.el
(auth-source-test-macos-keychain-search):
* test/lisp/emacs-lisp/cl-extra-tests.el (cl-extra-test-notany)
(cl-extra-test-notevery):
* test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-adjoin-test):
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-loop-collect)
(cl-macs-loop-append/nconc, cl-macs-loop-when)
(cl-macs-loop-if):
* test/lisp/emacs-lisp/cl-seq-tests.el (cl-seq-remove-test)
(cl-remove-if-test, cl-remove-if-not-test, cl-seq-delete-test)
(cl-delete-if-test, cl-delete-if-not-test)
(cl-seq-substitute-if-test, cl-seq-substitute-if-not-test)
(cl-find-if-test, cl-find-if-not-test, cl-position-if-test)
(cl-seq-count-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-rassoc-if-not-test):
* test/src/treesit-tests.el (treesit-search-forward-predicate):
Prefer oddp/evenp to cl-oddp/cl-evenp where possible.

* lisp/calc/calc-ext.el (cl-lib):
* lisp/calc/calc-misc.el (cl-lib): Don't require.

(cherry picked from commit 657f4658a7141708adb7f3ca594145f2df569d4c)

3 weeks agoNew functions oddp and evenp
Stefan Kangas [Sun, 16 Feb 2025 23:52:45 +0000 (00:52 +0100)]
New functions oddp and evenp

* lisp/emacs-lisp/cl-lib.el (cl-oddp, cl-evenp): Move from here...
* lisp/subr.el (oddp, evenp): ...to here.  Make old names into
aliases, documented as deprecated.  Add type declarations.
* lisp/obsolete/cl.el: Don't alias oddp and evenp.

* test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-test-oddp)
(cl-lib-test-evenp): Move tests from here...
* test/lisp/subr-tests.el (subr-test-oddp, subr-test-evenp): ...to here.
* lisp/emacs-lisp/shortdoc.el (number): Add oddp and evenp.
(map): Prefer oddp and evenp to cl-oddp and cl-evenp.

* doc/lispref/numbers.texi (Predicates on Numbers): Document above new
functions oddp and evenp.
* doc/misc/cl.texi (Predicates on Numbers): Delete cl-oddp and cl-evenp.
(Other Clauses): Prefer oddp to cl-oddp.

(cherry picked from commit 667d011410d1ab53fb90a497eb07f0b65c933821)

3 weeks agoImplement `(- N)' frame position specifications on Haiku
Po Lu [Mon, 17 Feb 2025 04:06:15 +0000 (12:06 +0800)]
Implement `(- N)' frame position specifications on Haiku

* src/haikuterm.c (haiku_calc_absolute_position): New function.
(haiku_set_offset): Apply offsets configured by the said
function.

(cherry picked from commit a951dbcf162aaf06a134c597ca0ac59c479afc4b)

3 weeks ago; * src/androidterm.c (android_set_offset): Apply correct frame offsets.
Po Lu [Mon, 17 Feb 2025 04:02:05 +0000 (12:02 +0800)]
; * src/androidterm.c (android_set_offset): Apply correct frame offsets.

(cherry picked from commit 6c1e6ba83c471e6a3c233c611dfe9e88349d5a10)

3 weeks ago; Correct merge errors.
Po Lu [Mon, 17 Feb 2025 03:36:41 +0000 (11:36 +0800)]
; Correct merge errors.

(cherry picked from commit 718a227f0fb926864c5224b5664b4b76c631039f)

3 weeks agoSynchronize frame placement logic with X
Po Lu [Mon, 17 Feb 2025 03:32:43 +0000 (11:32 +0800)]
Synchronize frame placement logic with X

* src/androidterm.c (android_calc_absolute_position): New
function.
(android_set_offset): Call android_calc_absolute_position.

* src/pgtkterm.c (pgtk_calc_absolute_position): Synchronize with
X.

(cherry picked from commit 0a6997b58d417043406dadf3d40e6f9de9ded6a8)

3 weeks agoFix crash in frame deletion on Android
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)

3 weeks ago* src/pgtkterm.c (pgtk_enumerate_devices): Circumvent bug#76239.
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)

3 weeks agoAdd test for zerop
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)

3 weeks ago; * etc/symbol-releases.eld: Add plistp.
Stefan Kangas [Mon, 17 Feb 2025 01:14:17 +0000 (02:14 +0100)]
; * etc/symbol-releases.eld: Add plistp.

(cherry picked from commit e779d60ea1d490f22cb5d0d729abedff8dc909d3)

3 weeks agoRemove some details on which files are loaded from cl.texi
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)

3 weeks agoAddress FIXME in org-element-create
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)

3 weeks agoPrefer cl-evenp/cl-oddp in some places
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)

3 weeks agoAdd gtk-redo icon to x-gtk-stock-map to x-win.el
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)

3 weeks agoAdd gtk-redo icon to x-gtk-stock-map
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)

3 weeks agoEglot: Improve fix to bug#66144
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)

3 weeks ago(set-auto-mode--find-matching-alist-entry): Fix bug#75961
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)

3 weeks ago* lisp/man.el (Man-shell-file-name): Ensure a Bourne shell. (Bug#75308)
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)

3 weeks ago; Skip commit 7016c13e5e6b136736f477fda67a7b9c26fbea6f
Eshel Yaron [Tue, 18 Feb 2025 08:43:55 +0000 (09:43 +0100)]
; Skip commit 7016c13e5e6b136736f477fda67a7b9c26fbea6f

3 weeks ago; * admin/authors.el (authors-aliases): Add "Elías Gabriel Pérez" (bug#76319).
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)

3 weeks agoChange criteria for non-exit cualse: car s to or a bind*.
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)

3 weeks ago; Skip commit e9c4f642b9dca399cbcab2ff59636d12b89cc8fc
Eshel Yaron [Tue, 18 Feb 2025 08:41:38 +0000 (09:41 +0100)]
; Skip commit e9c4f642b9dca399cbcab2ff59636d12b89cc8fc

3 weeks ago; Skip commit 8c4294f370f432b0df402dd5b9f074de3eca26f2
Eshel Yaron [Tue, 18 Feb 2025 08:41:35 +0000 (09:41 +0100)]
; Skip commit 8c4294f370f432b0df402dd5b9f074de3eca26f2

3 weeks agoscope.el: Special handling for cl-letf
Eshel Yaron [Tue, 18 Feb 2025 08:40:22 +0000 (09:40 +0100)]
scope.el: Special handling for cl-letf

3 weeks agoSimplify project-switch-project/commands
Eshel Yaron [Tue, 18 Feb 2025 08:39:59 +0000 (09:39 +0100)]
Simplify project-switch-project/commands

3 weeks agoDrop project-file-history-behavior
Eshel Yaron [Tue, 18 Feb 2025 08:38:23 +0000 (09:38 +0100)]
Drop project-file-history-behavior

3 weeks agoproject.el: Simplify -other-foo commands
Eshel Yaron [Tue, 18 Feb 2025 08:36:30 +0000 (09:36 +0100)]
project.el: Simplify -other-foo commands

3 weeks ago(project--file-completion-table): Provide completion annotations
Eshel Yaron [Tue, 18 Feb 2025 08:35:27 +0000 (09:35 +0100)]
(project--file-completion-table): Provide completion annotations

3 weeks ago(project-forget-projects-under): Improve minibuffer action feedback
Eshel Yaron [Mon, 17 Feb 2025 08:24:56 +0000 (09:24 +0100)]
(project-forget-projects-under): Improve minibuffer action feedback

3 weeks ago(minibuffer-current-input): Special case for directory names
Eshel Yaron [Mon, 17 Feb 2025 08:18:43 +0000 (09:18 +0100)]
(minibuffer-current-input): Special case for directory names

3 weeks agoJump-to-definition support for error types
Eshel Yaron [Mon, 17 Feb 2025 08:17:53 +0000 (09:17 +0100)]
Jump-to-definition support for error types

3 weeks ago; Skip commit 4cf53c436159ea54dbfe1a1e24515e2e6fbf9a6f
Eshel Yaron [Sat, 15 Feb 2025 19:34:27 +0000 (20:34 +0100)]
; Skip commit 4cf53c436159ea54dbfe1a1e24515e2e6fbf9a6f

3 weeks agoTramp: Don't require PuTTY 0.82 anymore
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)

3 weeks ago(diff-mode-test-font-lock): Fix spurious test failure
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)

3 weeks ago; Declare treesit.c functions
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)

3 weeks agoFix DOM printing
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)

3 weeks ago; Skip commit a8a4c3a091bc6ebab40db3b33f4d15bb1040dbcb
Eshel Yaron [Sat, 15 Feb 2025 19:33:57 +0000 (20:33 +0100)]
; Skip commit a8a4c3a091bc6ebab40db3b33f4d15bb1040dbcb

3 weeks agoFix string end search in python-nav-end-of-statement
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)

3 weeks 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)

3 weeks 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)

3 weeks 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)

3 weeks 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)

3 weeks 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)

3 weeks 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)

3 weeks 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)

3 weeks 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)

3 weeks 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)

3 weeks 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)

3 weeks 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)

3 weeks 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)

3 weeks 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)

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

3 weeks 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)

3 weeks 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)

3 weeks 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)

3 weeks 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)

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

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

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

3 weeks 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)

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

3 weeks 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)

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

3 weeks 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)

3 weeks 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)

3 weeks 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)

3 weeks 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)

3 weeks 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

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

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

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

3 weeks 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

3 weeks 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)

3 weeks 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)

3 weeks 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)

3 weeks 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)

3 weeks 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)

3 weeks 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)

3 weeks 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)

3 weeks 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)

3 weeks 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)

3 weeks 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)

3 weeks 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)

3 weeks 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)

3 weeks 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.

4 weeks 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

4 weeks 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)