]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 weeks agoFix 'called-interactively-p'
Eshel Yaron [Thu, 20 Feb 2025 13:01:10 +0000 (14:01 +0100)]
Fix 'called-interactively-p'

3 weeks agoNew macro 'compf'
Eshel Yaron [Wed, 19 Feb 2025 15:47:16 +0000 (16:47 +0100)]
New macro 'compf'

3 weeks ago; Fix copyright year in last commit
Stefan Kangas [Tue, 18 Feb 2025 20:52:33 +0000 (21:52 +0100)]
; Fix copyright year in last commit

(cherry picked from commit ef34303eaf98e0a8a041c741715c741f0a01fd77)

3 weeks agoAdd markdown-ts-mode
Rahul Martim Juliato [Sat, 20 Apr 2024 02:21:20 +0000 (23:21 -0300)]
Add markdown-ts-mode

* lisp/textmodes/markdown-ts-mode.el: New file.
Ref: https://lists.gnu.org/r/emacs-devel/2024-06/msg01061.html

(cherry picked from commit a102dcebb7d10275cc3818f47cd042ddd27868ff)

3 weeks ago(lexical-binding): Allow changing the default value (bug#74145)
Stefan Monnier [Tue, 18 Feb 2025 20:37:50 +0000 (15:37 -0500)]
(lexical-binding): Allow changing the default value (bug#74145)

* lisp/loadup.el: Preserve (default-toplevel-value 'lexical-binding).

* src/lread.c (Fload, Feval_buffer): Obey (default-toplevel-value
'lexical-binding).

* doc/lispintro/emacs-lisp-intro.texi (Lexical vs Dynamic Binding
Example): Use the lexical dialect also for the dynamic
scoping example.
* doc/lispref/edebug.texi (Edebug Eval): Remove long-obsolete mention
of Edebug support for `lexical-let`.

(cherry picked from commit d685d21e8ae0cee566420d4dd68586f018b2ce0b)

3 weeks ago; * .mailmap: Change my entries.
Gerd Möllmann [Tue, 18 Feb 2025 20:27:03 +0000 (21:27 +0100)]
; * .mailmap: Change my entries.

(cherry picked from commit 790c2f7c1c8c947b286c09525fc5a0425004a1f6)

3 weeks agoDisable PyREPL in Python shell
Liu Hui [Tue, 18 Feb 2025 09:52:36 +0000 (17:52 +0800)]
Disable PyREPL in Python shell

The new default REPL (PyREPL) in Python 3.13 is incompatible
with Python shell and displays a warning message when reverting
to the old basic REPL.

* lisp/progmodes/python.el
(python-shell--calculate-process-environment): Use the basic
REPL.  (Bug#76205)

(cherry picked from commit db8af88222bbf06948622d2b4fc4d27b73350b83)

3 weeks agoImprove completion in IPython/Python 3.13
kobarity [Sun, 16 Feb 2025 10:07:04 +0000 (19:07 +0900)]
Improve completion in IPython/Python 3.13

IPython/Python 3.13 indirectly imports rlcompleter, and the
completer is set up to reference rlcompleter.__main__.
However, this rlcompleter.__main__ is different from the
__main__ in the REPL execution.  Therefore, this completer
cannot correctly complete the REPL globals.  To address this
issue, we override rlcompleter.__main__ with __main__ only in
the case of IPython.

* lisp/progmodes/python.el (python-shell-completion-native-setup):
Modify __PYTHON_EL_native_completion_setup().  (Bug#76205)

(cherry picked from commit a75f4449fa2aceab54f28c5ef46f82225376c2a4)

3 weeks agoPrefer defvar-keymap in tcl.el
Stefan Kangas [Tue, 18 Feb 2025 05:11:24 +0000 (06:11 +0100)]
Prefer defvar-keymap in tcl.el

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

(cherry picked from commit c180966b313c87fd8a3a48218340b48ac0b933f2)

3 weeks agoPrefer defvar-keymap in pascal.el
Stefan Kangas [Tue, 18 Feb 2025 05:06:37 +0000 (06:06 +0100)]
Prefer defvar-keymap in pascal.el

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

(cherry picked from commit 697e7c321144f1d91bcd8f6ed26c78968a156186)

3 weeks agoPrefer defvar-keymap in meta-mode.el
Stefan Kangas [Tue, 18 Feb 2025 05:03:04 +0000 (06:03 +0100)]
Prefer defvar-keymap in meta-mode.el

* lisp/progmodes/meta-mode.el (meta-common-mode-map): Prefer
defvar-keymap.

(cherry picked from commit 941ba65d1e0b9a42deeff25d793db21cc56c94e0)

3 weeks agoPrefer plusp to open-coding it in image-dired
Stefan Kangas [Tue, 18 Feb 2025 04:56:02 +0000 (05:56 +0100)]
Prefer plusp to open-coding it in image-dired

* lisp/image/image-dired.el (image-dired-display-thumbs)
(image-dired-forward-image, image-dired-slideshow-start)
(image-dired-line-up-interactive): Prefer plusp to open-coding it.

(cherry picked from commit 93206cd138ff01d9c2a56e52dd0e5edd8e386ec0)

3 weeks ago; * src/menu.c (x_popup_menu_1): Fix typo.
Gerd Möllmann [Tue, 18 Feb 2025 15:05:38 +0000 (16:05 +0100)]
; * src/menu.c (x_popup_menu_1): Fix typo.

(cherry picked from commit 4d3a6189418d9fe6b743ce3924a5eead6638dccb)

3 weeks ago(replace_range): Delete last arg, always the negation of the first bool
Stefan Monnier [Tue, 18 Feb 2025 15:05:34 +0000 (10:05 -0500)]
(replace_range): Delete last arg, always the negation of the first bool

* src/insdel.c (replace_range): Merge last arg, with `prepare`.
Rename `prepare` to `run-mode-hooks`.
* src/lisp.h (replace_range): Adjust accordingly.
* src/editfns.c (Ftranslate_region_internal):
* src/cmds.c (internal_self_insert):
* src/search.c (Freplace_match): Adjust callers.

(cherry picked from commit 41624d94cec98c1239c4fc9bb624e55ce0606068)

3 weeks agosrc/search.c (Freplace_match): Let `replace_range` call the a-c-f
Stefan Monnier [Tue, 18 Feb 2025 14:54:48 +0000 (09:54 -0500)]
src/search.c (Freplace_match): Let `replace_range` call the a-c-f

(cherry picked from commit 19f5ccbf39383f9744b9513166a2d2e7ccb85e1c)

3 weeks ago* src/editfns.c (Fsubst_char_in_region): Delete left-over code
Stefan Monnier [Tue, 18 Feb 2025 14:52:35 +0000 (09:52 -0500)]
* src/editfns.c (Fsubst_char_in_region): Delete left-over code

This code was missed back in 2000 (commit 1b16afa45bb6).

(cherry picked from commit 9854103b52a666db258bd10e4cd7f1291fb3bd6e)

3 weeks ago* src/menu.c (x_popup_menu_1): Use calln.
Gerd Möllmann [Tue, 18 Feb 2025 14:41:07 +0000 (15:41 +0100)]
* src/menu.c (x_popup_menu_1): Use calln.

(cherry picked from commit bf067daf0df9441ef94ffe6ba2b2d1add3a4ee39)

3 weeks ago; Skip commit c54d6680d3622802709e79d2daac28218f65fb97
Eshel Yaron [Tue, 18 Feb 2025 21:33:19 +0000 (22:33 +0100)]
; Skip commit c54d6680d3622802709e79d2daac28218f65fb97

3 weeks ago* src/menu.c (x_popup_menu_1): Fix coding style.
Po Lu [Tue, 18 Feb 2025 13:00:08 +0000 (21:00 +0800)]
* src/menu.c (x_popup_menu_1): Fix coding style.

(cherry picked from commit 37fad0483025b0eeaa33c5418b07bf6a14937ebf)

3 weeks agoDon't access overriding-text-conversion-style when unbound
Po Lu [Tue, 18 Feb 2025 12:58:32 +0000 (20:58 +0800)]
Don't access overriding-text-conversion-style when unbound

* lisp/replace.el (perform-replace): Don't access
overriding-text-conversion-style when unbound, and also avoid
needlessly polluting this symbol with a binding.  (bug#76371)

(cherry picked from commit 0cf3823463e9a52a6fbdc5e02555381cd6e0f5b5)

3 weeks agoAdd x-popup-menu-function
Gerd Möllmann [Mon, 10 Feb 2025 06:55:43 +0000 (07:55 +0100)]
Add x-popup-menu-function

* src/menu.c (x_popup_menu_1): If non-nil call x-popup-menu-function.
(syms_of_menu): DEFSYM x-popup-menu-function, DEFVAR_LISP it.

(cherry picked from commit 17bf6b9efe5c40dfa92fa5ec64a99162304395cd)

3 weeks agoHide cursor based on tty frame's `cursor-type'
Gerd Möllmann [Sun, 16 Feb 2025 16:27:58 +0000 (17:27 +0100)]
Hide cursor based on tty frame's `cursor-type'

* src/dispnew.c (terminal_cursor_magic): if selected-frame has
`(cursor-type . nil)' parameter.

(cherry picked from commit a51cfbbd15889ce2af59b0b1bffac8735f70f6b9)

3 weeks agoAdd MPD stats viewer to 'mpc' (Bug#76350)
john muhl [Tue, 5 Nov 2024 16:24:28 +0000 (10:24 -0600)]
Add MPD stats viewer to 'mpc' (Bug#76350)

* lisp/mpc.el (mpc-server-stats): New command.
(mpc-mode-menu): Add menu item.
(mpc--server-stats-date, mpc--server-stats-duration):
New variable.
(mpc--server-stats-date, mpc--server-stats-duration):
(mpc--server-stats-format): New function.
(mpc-song-viewer-value, mpc-song-viewer-tag):
(mpc-song-viewer-empty): Remove face.
(mpc-table-value, mpc-table-key, mpc-table-empty): New face.
(mpc-describe-song): Use new table face names.

(cherry picked from commit df93e53a1c648654d8b128a5955bb4ff0229b041)

3 weeks agoImprove autoconf-mode macro detection
Basil L. Contovounesios [Wed, 29 Jan 2025 13:05:39 +0000 (14:05 +0100)]
Improve autoconf-mode macro detection

* doc/lispref/modes.texi (Search-based Fontification): Fix
indentation of (MATCHER . FACESPEC) example.
* doc/misc/cc-mode.texi (Performance Issues): Index
defun-prompt-regexp under variables, not functions.

* lisp/progmodes/autoconf.el (autoconf--symbol, autoconf--macro):
New rx definitions.
(autoconf-definition-regexp): Use an optional second capture group
to indicate a function rather than variable definition.  Detect
AC_DEFINE defining a function-like CPP macro.  Skip more shell
syntax such as variable ${} expansion and command `` substitution in
AC_DEFINE_UNQUOTED variable.  Match AH_VERBATIM, AM_CONDITIONAL, and
AM_MISSING_PROG as defining variables, and AC_DEFUN, AC_DEFUN_ONCE,
AU_ALIAS, and AU_DEFUN as defining functions.  Document first
capture group in docstring.
(autoconf-font-lock-keywords): Use autoconf--macro to match more
Autoconf macros, such as those defined in the Autoconf Archive and
Gnulib.  Reserve font-lock-function-name-face for function
definitions as determined by autoconf-definition-regexp, and use
font-lock-variable-name-face for the rest instead.  Use Font Lock
face symbols directly in place of their corresponding variable.
Fontify M4 changequote primitive only as a standalone symbol.
(autoconf-imenu-generic-expression): Add commentary mentioning new
submenu possibility.
(autoconf-current-defun-function): Update docstring accuracy.
Replace line-end-position with pos-eol since there are no fields.
(autoconf-mode): Define defun-prompt-regexp in terms of
autoconf--macro to support more toplevel macros, such as those
defined in Autoheader, M4sh, etc.  Set
open-paren-in-column-0-is-defun-start to nil to avoid false
positives when an Autoconf quote character is in column zero.

* test/lisp/progmodes/autoconf-resources/configure.ac: New file.
* test/lisp/progmodes/autoconf-tests.el
(autoconf-tests-current-defun-function-define)
(autoconf-tests-current-defun-function-subst): Replace character
motion with search.
(autoconf-tests-autoconf-mode-comment-syntax): Ditto.  Test both dnl
and # comments.  Use syntax-ppss-context.
(autoconf-tests-font-lock): New test.

(cherry picked from commit 2e3cf73e055be69d42a6f84436d400caf0997abb)

3 weeks agoAdd file completion for git apply, am to pcomplete
Antero Mejr [Tue, 28 Jan 2025 18:39:10 +0000 (13:39 -0500)]
Add file completion for git apply, am to pcomplete

* lisp/pcmpl-git.el (pcomplete/git): Add an "apply" and "am" clause to
complete all files.  (Bug#76356)

(cherry picked from commit 9cedb434ee390a30a690e9f979428c5735cb88e5)

3 weeks agoPrefer oddp/evenp to open-coding in a few more cases
Stefan Kangas [Mon, 17 Feb 2025 22:00:54 +0000 (23:00 +0100)]
Prefer oddp/evenp to open-coding in a few more cases

* lisp/arc-mode.el (archive-zip-summarize):
* lisp/cus-edit.el (setopt):
* lisp/isearch.el (isearch-backslash):
* lisp/simple.el (blink-paren-post-self-insert-function):
* lisp/subr.el (setq-local, buffer-local-set-state):
* lisp/term.el (term-within-quotes):
* test/src/data-tests.el (test-bool-vector-bv-from-hex-string): Use
oddp/evenp instead of open-coding them.
Reported by Pip Cet <pipcet@protonmail.com>.

(cherry picked from commit 515542b653c438014eda844eacc96cf23cfaaa2d)

3 weeks agoPrefer plusp/minusp to open-coding them in subr.el
Stefan Kangas [Mon, 17 Feb 2025 21:48:47 +0000 (22:48 +0100)]
Prefer plusp/minusp to open-coding them in subr.el

* lisp/subr.el (lsh, nbutlast, number-sequence, add-to-history)
(read-char-from-minibuffer, split-string, subst-char-in-string)
(forward-whitespace, forward-symbol, forward-same-syntax)
(progress-reporter-do-update, version-list-<): Prefer plusp/minusp to
open-coding them.

(cherry picked from commit 8a7c1a31ac0a61384661878e9f7f7e77ada34ade)

3 weeks agoPrefer plusp/minusp to cl-plusp/cl-minusp
Stefan Kangas [Mon, 17 Feb 2025 21:04:41 +0000 (22:04 +0100)]
Prefer plusp/minusp to cl-plusp/cl-minusp

* lisp/dired.el (dired--move-to-next-line):
* lisp/emacs-lisp/ert.el (ert-run-tests-batch, ert-face-for-stats):
* lisp/emacs-lisp/pp.el (pp--format-definition):
* lisp/gnus/gnus-icalendar.el (gnus-icalendar-event--org-timestamp):
* lisp/ibuffer.el (ibuffer-compile-format, ibuffer--format-title)
(ibuffer--format-summary):
* lisp/image-mode.el (image-transform-set-percent):
* lisp/international/emoji.el (emoji--list-generate, emoji--read-emoji):
* lisp/progmodes/ebrowse.el (ebrowse-set-tree-indentation)
(ebrowse-set-member-buffer-column-width)
(ebrowse-cyclic-display-next/previous-member-list)
(ebrowse-draw-member-short-fn)
(ebrowse-switch-member-buffer-to-sibling-class, ebrowse-push-position):
* lisp/textmodes/dns-mode.el (dns-mode-reverse-and-expand-ipv6):
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--not-writable-directory)
(bytecomp-tests--dest-mountpoint)
(bytecomp-tests--target-file-no-directory):
* test/lisp/emacs-lisp/cl-seq-tests.el (cl-member-if-test)
(cl-member-if-not-test, cl-assoc-if-not-test, cl-rassoc-if-test)
(cl-rassoc-if-not-test):
* test/src/emacs-module-tests.el (mod-test-add-nanosecond/valid):
Prefer plusp and minusp to cl-plusp and cl-minusp.

(cherry picked from commit 83bc811f7fad00b9b4ed3e4ffd67a96226991ca3)

3 weeks agoNew functions plusp and minusp
Stefan Kangas [Mon, 17 Feb 2025 20:58:53 +0000 (21:58 +0100)]
New functions plusp and minusp

* lisp/emacs-lisp/cl-lib.el (cl-plusp, cl-minusp): Move from here...
* lisp/subr.el (plusp, minusp): ...to here.  Make old names into
aliases, documented as deprecated.  Add type declarations.  Change from
defsubst to regular functions with compiler macros.
* lisp/obsolete/cl.el: Don't alias plusp and minusp.

* test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-test-plusp)
(cl-lib-test-minusp): Move tests from here...
* test/lisp/subr-tests.el (subr-test-plusp, subr-test-minusp):
...to here.

* doc/lispref/numbers.texi (Predicates on Numbers): Document plusp
and minusp.
* doc/misc/cl.texi (Predicates on Numbers): Delete cl-plusp and
cl-minusp.
* lisp/emacs-lisp/shortdoc.el (number): Document plusp and minusp
instead of cl-plusp and cl-minusp.

(cherry picked from commit afbf932106fdd1043b0debe9fc9134e031e4c9a6)

3 weeks ago; Update comments for mhtml-ts-mode--treesit-indent-rules
Yuan Fu [Mon, 17 Feb 2025 21:41:30 +0000 (13:41 -0800)]
; Update comments for mhtml-ts-mode--treesit-indent-rules

* lisp/textmodes/mhtml-ts-mode.el:
(mhtml-ts-mode--treesit-indent-rules): Update comments.

(cherry picked from commit 1d27028df803e4dc1c063db5593222311838e051)

3 weeks agoRename treesit-add-simple-indent-rules
Yuan Fu [Mon, 17 Feb 2025 21:29:46 +0000 (13:29 -0800)]
Rename treesit-add-simple-indent-rules

* lisp/treesit.el (treesit-add-simple-indent-rules): Rename to
treesit-simple-indent-add-rules.
* etc/NEWS: Update.
* test/src/treesit-tests.el:
(treesit-test-simple-indent-add-rules): Update accordingly.

(cherry picked from commit 237afc82b2ed147fe6b1773df303c448ded9679b)

3 weeks agoRename treesit-simple-indent-modify-rules and fix docstring
Yuan Fu [Mon, 17 Feb 2025 21:27:52 +0000 (13:27 -0800)]
Rename treesit-simple-indent-modify-rules and fix docstring

* lisp/treesit.el (treesit-simple-indent-modify-rules): Rename
and fix docstring.  It should be matcher, not anchor.  Also
reword a little bit.
* etc/NEWS: Update.
* lisp/textmodes/mhtml-ts-mode.el:
(mhtml-ts-mode--treesit-indent-rules): Update accordingly.

(cherry picked from commit 928bad93609773ca5e9c94cf6e8f24e895e263d3)

3 weeks agoMake mhtml-ts-mode--treesit-indent-rules a function
Yuan Fu [Mon, 17 Feb 2025 21:18:15 +0000 (13:18 -0800)]
Make mhtml-ts-mode--treesit-indent-rules a function

* lisp/textmodes/mhtml-ts-mode.el:
(mhtml-ts-mode--treesit-indent-rules): Turn into a function.
(mhtml-ts-mode): Update accordingly.

(cherry picked from commit 77c7ba7facf6e7ee65e74aba71ce67723ba14ff7)

3 weeks agoTest vc-git-dir-extra-headers directly (bug#76187)
Kévin Le Gouguec [Thu, 13 Feb 2025 22:52:06 +0000 (23:52 +0100)]
Test vc-git-dir-extra-headers directly (bug#76187)

* test/lisp/vc/vc-git-tests.el (vc-git-test--run): Make sure to
log output from failing Git commands.
(vc-git-test--dir-headers): Stop bothering with vc-dir
internals and just invoke the branch-munging and
header-formatting code we mean to test.
(vc-git-test-dir-branch-headers): Stop invoking vc-dir; just set
default-directory to be able to pass it to the backend function.

(cherry picked from commit 15d2fc6498db433131bd4364aae1d508a12bd925)

3 weeks agoFix compilation errors due to insufficient compiler safety (bug#63288)
Pip Cet [Mon, 17 Feb 2025 15:21:16 +0000 (15:21 +0000)]
Fix compilation errors due to insufficient compiler safety (bug#63288)

The default safety level is 1.  Restoring the default safety level to
1 after it was temporarily 0 should reset byte-compile-delete-errors
to nil, its default level.  Failing to do that resulted in
miscompilation of code in highly-parallel builds.

* lisp/emacs-lisp/cl-macs.el (cl--do-proclaim): Change
'byte-compile-delete-errors' to become t only at 'safety' level 0, not
levels 1 or 2.

(cherry picked from commit 53a5dada413662389a17c551a00d215e51f5049f)

3 weeks agoPrefer '(oddp A)' to '(= 1 (logand A 1))'
Stefan Kangas [Mon, 17 Feb 2025 18:33:56 +0000 (19:33 +0100)]
Prefer '(oddp A)' to '(= 1 (logand A 1))'

* lisp/calendar/todo-mode.el (todo-padded-string):
* lisp/emacs-lisp/gv.el (setf):
* lisp/emacs-lisp/macroexp.el (macroexp--expand-all):
* lisp/hexl.el (hexl-insert-hex-string):
* lisp/play/gamegrid.el (gamegrid-xbm):
* lisp/play/hanoi.el (hanoi-internal):
* lisp/progmodes/ebnf2ps.el (ebnf-end-of-string):
* lisp/progmodes/elisp-mode.el (elisp--highlight-function-argument):
* lisp/progmodes/ruby-mode.el (ruby-backward-sexp):
* lisp/ps-print.el (ps-print-page-p):
(ps-print-sheet-p): Prefer '(oddp A)' to '(= 1 (logand A 1))' and
variations thereof.

(cherry picked from commit fd5dbea21b8982cff8d3ae774b0e68c077a4ec89)

3 weeks agoPrefer '(evenp A)' to '(= 0 (logand A 1))'
Stefan Kangas [Mon, 17 Feb 2025 18:30:44 +0000 (19:30 +0100)]
Prefer '(evenp A)' to '(= 0 (logand A 1))'

* lisp/calc/calc-arith.el (calcFunc-dint):
* lisp/calculator.el (calculator-expt):
* lisp/emacs-lisp/bytecomp.el (byte-compile-unfold-bcf):
* lisp/emacs-lisp/elint.el (elint-check-defcustom-form):
* lisp/ps-print.el (ps-print-page-p):
(ps-print-sheet-p): Prefer '(evenp A)' to '(= 0 (logand A 1))' and
variations thereof.

(cherry picked from commit 7c7cf3e8c88de6af91b110584f3aa8aff8011409)

3 weeks ago; Small fixes for the recently added 'mhtml-ts-mode'
Juri Linkov [Mon, 17 Feb 2025 17:40:20 +0000 (19:40 +0200)]
; Small fixes for the recently added 'mhtml-ts-mode'

* lisp/textmodes/mhtml-ts-mode.el (mhtml-ts-mode): Add autoload cookie.

* lisp/treesit.el (treesit-modify-indent-rules): Use 'rules'
instead of 'js--treesit-indent-rules'.

(cherry picked from commit 1a8493f0a5fcd45c7e992dbf42cfbb0346edcaff)

3 weeks ago; * CONTRIBUTE: Fix style.
Eli Zaretskii [Mon, 17 Feb 2025 16:06:18 +0000 (18:06 +0200)]
; * CONTRIBUTE: Fix style.

(cherry picked from commit c380a72679a0626cda23072e082955967c1e99f5)

3 weeks ago; * src/xdisp.c (maybe_produce_line_number): Fix last change (bug#76362).
Eli Zaretskii [Mon, 17 Feb 2025 16:00:30 +0000 (18:00 +0200)]
; * src/xdisp.c (maybe_produce_line_number): Fix last change (bug#76362).

(cherry picked from commit 1136963b4e81e2b3efd42f3bd609bf968d05831f)

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)