]> git.eshelyaron.com Git - emacs.git/log
emacs.git
6 weeks ago'dabbrev-buffer-search-condition': Exclude 'image-mode'
Eshel Yaron [Wed, 16 Apr 2025 07:30:10 +0000 (09:30 +0200)]
'dabbrev-buffer-search-condition': Exclude 'image-mode'

6 weeks agosavehist: Only save readable values
Eshel Yaron [Mon, 14 Apr 2025 17:01:15 +0000 (19:01 +0200)]
savehist: Only save readable values

6 weeks agoMinor clean up
Eshel Yaron [Mon, 14 Apr 2025 17:00:49 +0000 (19:00 +0200)]
Minor clean up

6 weeks agostartup.el: Various cleanups, move abbrev to Lisp.
Eshel Yaron [Mon, 14 Apr 2025 15:45:52 +0000 (17:45 +0200)]
startup.el: Various cleanups, move abbrev to Lisp.

6 weeks agodabbrev: also filter visible buffers.
Eshel Yaron [Mon, 14 Apr 2025 15:43:04 +0000 (17:43 +0200)]
dabbrev: also filter visible buffers.

6 weeks ago(cl-generic-define-method): Try and fix bug#77464
Stefan Monnier [Sun, 13 Apr 2025 16:45:54 +0000 (12:45 -0400)]
(cl-generic-define-method): Try and fix bug#77464

* lisp/emacs-lisp/cl-generic.el (cl-generic-define-method): Don't set
the function to `dummy`, even temporarily.

(cherry picked from commit 19913b1567940b8af5bfcef5c6efe19a3656e66b)

6 weeks ago; Skip commit 1dee377bad00737c4730339f62467f45224b5089
Eshel Yaron [Sun, 13 Apr 2025 21:02:34 +0000 (23:02 +0200)]
; Skip commit 1dee377bad00737c4730339f62467f45224b5089

6 weeks ago(calc-save-modes): Add a `lexical-binding` cookie
Stefan Monnier [Sun, 13 Apr 2025 14:33:47 +0000 (10:33 -0400)]
(calc-save-modes): Add a `lexical-binding` cookie

* lisp/calc/calc-mode.el (calc-save-modes): Add a `lexical-binding`
cookie when it is safe.  Use `pcase-dolist` and `pp`.

(cherry picked from commit 9dfd4c6bd3140585392a428201088e9f019b0071)

6 weeks ago; Skip commit e0c7b6e31e8c03dd66a929742898f2d6e2628356
Eshel Yaron [Sun, 13 Apr 2025 21:01:33 +0000 (23:01 +0200)]
; Skip commit e0c7b6e31e8c03dd66a929742898f2d6e2628356

6 weeks ago; Fix recently broken test (bug#77777).
Eshel Yaron [Sun, 13 Apr 2025 11:53:29 +0000 (13:53 +0200)]
; Fix recently broken test (bug#77777).

* test/lisp/emacs-lisp/find-func-tests.el
(find-func-tests--locate-macro-generated-symbols): bind
'trusted-content' to names of files in which we want to
expand macros during this test.

(cherry picked from commit ebaf4241263e167e992981efb8d1bf571f311803)

6 weeks agoReplace AT_EXECFN in auxiliary vectors of programs executed on Android
Po Lu [Sun, 13 Apr 2025 10:50:59 +0000 (18:50 +0800)]
Replace AT_EXECFN in auxiliary vectors of programs executed on Android

* exec/exec.c (insert_args, exec_0): On non-MIPS systems, copy
NAME and its length to the loader area.  State that MIPS support
is not yet available (though it will be pending the availability
of a functioning emulator).

* exec/loader-aarch64.s (_start):

* exec/loader-armeabi.s (_start):

* exec/loader-x86.s (_start):

* exec/loader-x86_64.s (_start): Displace auxv, environ, and
argv to create sufficient space for the provided file name, and
copy the file name there.  Replace AT_EXECFN to refer to this
space.

(cherry picked from commit 7a01350624e1665e707f98e13d51f53e9f87ce95)

6 weeks ago; Fix last change
Eli Zaretskii [Sun, 13 Apr 2025 10:03:03 +0000 (13:03 +0300)]
; Fix last change

* lisp/progmodes/elisp-mode.el (elisp-eldoc-docstring-length-limit):
* etc/NEWS: Fix documentation of last change.  (Bug#77628)

(cherry picked from commit f5b59a8a7318d611a04ef32f4042e3ca9bd1b315)

6 weeks agoAdd variable for control docstring length in elisp eldoc functions
Elías Gabriel Pérez [Tue, 8 Apr 2025 05:00:20 +0000 (23:00 -0600)]
Add variable for control docstring length in elisp eldoc functions

* etc/NEWS: Announce new variable.
* lisp/progmodes/elisp-mode.el (elisp-eldoc-docstring-length-limit):
New user option.
(elisp-eldoc-funcall-with-docstring): Add "Undocumented" as
docstring if the function has no docstring.
(elisp-eldoc-var-docstring-with-value): Use
`elisp-eldoc-docstring-length-limit'.  (Bug#77628)

(cherry picked from commit 53bd9f54c61d5edac8b04cc6b72aadb48466110e)

6 weeks ago; Fix a typo in proced.el
Eli Zaretskii [Sun, 13 Apr 2025 09:38:04 +0000 (12:38 +0300)]
; Fix a typo in proced.el

* lisp/proced.el (proced-filter): Fix a typo.  Reported by Armin
Darvish <armindarvish@gmail.com>.  (Bug#77713)

(cherry picked from commit 3a13fb2069fc861e20fca893aa64dd70dcef0de3)

6 weeks ago; (url-generic-parse-url/ms-windows-file-uri-hanlding): Fix test.
Eli Zaretskii [Sun, 13 Apr 2025 09:14:27 +0000 (12:14 +0300)]
; (url-generic-parse-url/ms-windows-file-uri-hanlding): Fix test.

(cherry picked from commit c4012904fd87e158a76f9b8017684def3b206a3a)

6 weeks ago; Fix last change
Eli Zaretskii [Sun, 13 Apr 2025 09:12:13 +0000 (12:12 +0300)]
; Fix last change

* test/lisp/url/url-parse-tests.el
(url-generic-parse-url/ms-windows-file-uri-hanlding): Reformat and
fix the test on MS-Windows.

(cherry picked from commit c76892edd28a7bfd7c303c3161d7ddf41c646541)

6 weeks agoSpecial treatment for file:// URIs on Windows
Sebastián Monía [Tue, 8 Apr 2025 22:09:06 +0000 (18:09 -0400)]
Special treatment for file:// URIs on Windows

* lisp/url/url-parse.el (url-generic-parse-url): Remove prefix /
when a file URI's filename starts with a single letter followed
by a colon and a slash or backslash.
(url-recreate-url): Mirror the change applied when parsing, so
the URL is recreated properly on MS-Windows.
* test/lisp/url/url-parse-tests.el
(url-generic-parse-url/ms-windows-file-uri-hanlding): New test.
(Bug#76982)

(cherry picked from commit fec6e16f143c08d68ad336b9039f8ed1c3cbfc05)

6 weeks ago; Skip commit 6f494d74f645d6cffd98e168721a0347de271a54
Eshel Yaron [Sun, 13 Apr 2025 20:59:40 +0000 (22:59 +0200)]
; Skip commit 6f494d74f645d6cffd98e168721a0347de271a54

6 weeks agoUse a pristine copy of argv to restart Emacs
Jens Schmidt [Wed, 2 Apr 2025 20:48:31 +0000 (22:48 +0200)]
Use a pristine copy of argv to restart Emacs

argv as left after main has proccessed the command-line can differ
both in order and contents of the original command-line arguments,
which can lead to surprising results when restarting emacs on the
cooked argv through `kill-emacs'.

Starting from that observation, consistenly use variables
'initial_cmdline' on Windows, 'initial_argc', 'initial_argv' on
non-Windows, and 'initial_argv0' in all ports.

* src/lisp.h: Declare 'initial_argv0', limit declaration of
'initial_argv' and 'initial_argc' to non-Windows ports.
* src/emacs.c: Likewise, but for the definitions.
(init_cmdargs): Move initialization of 'initial_argv' and
'initial_argc' ...
(copy_args) [!WINDOWSNT]: ... to this new function ...
(main): ... and call that in 'main', also initializing
'initial_argv0' before the command-line processing.
* src/emacs.c (Fkill_emacs):
* src/pgtkterm.c (pgtk_term_init):
* src/sysdep.c (emacs_perror):
* src/xterm.c (x_term_init): Use 'initial_argv0' where only that
is required.  (Bug#77389)

(cherry picked from commit e82989757f42e95bf72a2a55de415a8162a55dc3)

6 weeks agoFix 'backward-delete-char-untabify'
Asher Copeland [Wed, 2 Apr 2025 17:55:06 +0000 (10:55 -0700)]
Fix 'backward-delete-char-untabify'

* lisp/simple.el (backward-delete-char-untabify): Fix
behavior when there's an active region.  (Bug#75042)

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

6 weeks ago; Fix a typo in last change.
Eli Zaretskii [Sun, 13 Apr 2025 08:13:36 +0000 (11:13 +0300)]
; Fix a typo in last change.

(cherry picked from commit d9ad0c953be1da33c2a7df0d5cae3358bf2b7b1a)

6 weeks agoAdd block-comment-start and block-comment-end to supported modes
Elías Gabriel Pérez [Mon, 31 Mar 2025 23:58:16 +0000 (17:58 -0600)]
Add block-comment-start and block-comment-end to supported modes

* lisp/emacs-lisp/lisp-mode.el (lisp-mode-variables):
Add block-comment-start and block-comment-end from here...
* lisp/newcomment.el (block-comment-start, block-comment-end):...
* lisp/nxml/nxml-mode.el (nxml-mode):...
* lisp/progmodes/c-ts-common.el (c-ts-common-comment-setup):...
* lisp/progmodes/go-ts-mode.el (go-work-ts-mode):...
* lisp/progmodes/js.el (js--mode-setup):...
* lisp/progmodes/json-ts-mode.el (json-ts-mode):...
* lisp/progmodes/lua-ts-mode.el (lua-ts-mode):...
* lisp/progmodes/opascal.el (opascal-mode):...
* lisp/progmodes/pascal.el (pascal-mode):...
* lisp/progmodes/typescript-ts-mode.el (tsx-ts-mode):...
* lisp/textmodes/css-mode.el (css-base-mode, scss-mode):...
* lisp/textmodes/sgml-mode.el (sgml-mode): ... to here.
(Bug#77424)

(cherry picked from commit 4c6b1712a4d67ae40ccc087c7946de4cb14e8cc7)

6 weeks agoFix term.el bug with very short multibyte character chunk
Stephane Zermatten [Mon, 31 Mar 2025 13:41:08 +0000 (16:41 +0300)]
Fix term.el bug with very short multibyte character chunk

Before this change, a chunk containing only a part
of a multibyte character would be discarded and
displayed undecoded on the terminal.
* lisp/term.el (term-emulate-terminal): Fix handling chunks
with part of a multibyte character.  (Bug#77410)

* test/lisp/term-tests.el (term-decode-partial)
(term-undecodable-input): Fix and enhance tests.

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

6 weeks agoDisable clearing echo-area when 'inhibit-message' is non-nil
Eli Zaretskii [Sun, 13 Apr 2025 07:44:55 +0000 (10:44 +0300)]
Disable clearing echo-area when 'inhibit-message' is non-nil

* src/xdisp.c (clear_message): Don't clear echo-area if
'inhibit-message' is non-nil.

* etc/NEWS:
* doc/lispref/display.texi (Displaying Messages): Document the
above change.  (Bug#77257)

(cherry picked from commit b0d6fe1449fbd32c01d69174f552d6884337a809)

6 weeks ago; * src/editfns.c (Freplace_region_contents): Doc fix (bug#76313).
Eli Zaretskii [Sun, 13 Apr 2025 07:34:46 +0000 (10:34 +0300)]
; * src/editfns.c (Freplace_region_contents): Doc fix (bug#76313).

(cherry picked from commit 7b36d7295e1567f5a1b3725ddbc3a7e85079660c)

6 weeks ago; Fix replacements of old vc-annotate-parent-file
Sean Whitton [Sun, 13 Apr 2025 06:38:27 +0000 (14:38 +0800)]
; Fix replacements of old vc-annotate-parent-file

* lisp/vc/vc-annotate.el (vc-annotate-working-revision)
(vc-annotate-extract-revision-at-line)
(vc-annotate-revision-at-line, vc-annotate-warp-revision)
(vc-annotate-goto-line): Fix extracting the file name from
vc-buffer-overriding-fileset.

(cherry picked from commit 9f6eb6cebb619396821d426de1d2b858b0738285)

6 weeks agolisp/subr.el (setq-local): Make local after evaluating the new value
Stefan Monnier [Sun, 13 Apr 2025 03:00:08 +0000 (23:00 -0400)]
lisp/subr.el (setq-local): Make local after evaluating the new value

In case the evaluation needs to look at the variable's value,
make sure we make it buffer-local afterwards.

(cherry picked from commit f3e0bdf1b98ceeb055065766db53c0c6218840c4)

6 weeks ago(replace-buffer-contents): Mark as obsolete, again.
Stefan Monnier [Sun, 13 Apr 2025 02:58:22 +0000 (22:58 -0400)]
(replace-buffer-contents): Mark as obsolete, again.

* lisp/subr.el (replace-buffer-contents): Mark as obsolete, again.
* src/editfns.c (Freplace_region_contents): Add interactive form.

(cherry picked from commit b99893af1ec373bf96c3326fa6f77740de55e621)

6 weeks ago; Skip commit 356178c8e726cc4c309254b2ba1eae9c41bd2f38
Eshel Yaron [Sun, 13 Apr 2025 20:53:45 +0000 (22:53 +0200)]
; Skip commit 356178c8e726cc4c309254b2ba1eae9c41bd2f38

6 weeks ago; Skip commit bfeb755e03b5cab8f1f234b1a54afbcfd71f9eb2
Eshel Yaron [Sun, 13 Apr 2025 20:53:39 +0000 (22:53 +0200)]
; Skip commit bfeb755e03b5cab8f1f234b1a54afbcfd71f9eb2

6 weeks ago; Fix typo in comment.
Paul Eggert [Sat, 12 Apr 2025 19:30:58 +0000 (12:30 -0700)]
; Fix typo in comment.

(cherry picked from commit 3169aeb421d1f6b2851d0fd8cedb3594071b2cef)

6 weeks agoLimit fontification of "customize" in setopt suggestion
Visuwesh [Mon, 7 Apr 2025 09:46:38 +0000 (15:16 +0530)]
Limit fontification of "customize" in setopt suggestion

* lisp/help-fns.el (help-fns--customize-variable): Limit the
fontification to newly inserted text to avoid spurious
fontification of other instances of the word "customize."

(cherry picked from commit bf7bcbaa3decf976e9409fe9d3fe183a6e8d6920)

6 weeks ago; Skip commit 50531a00b53be7f98a763090331812aae5d3a015
Eshel Yaron [Sun, 13 Apr 2025 20:51:31 +0000 (22:51 +0200)]
; Skip commit 50531a00b53be7f98a763090331812aae5d3a015

6 weeks agoflymake: fall back to margins on text terminals
Spencer Baugh [Tue, 8 Apr 2025 12:43:37 +0000 (08:43 -0400)]
flymake: fall back to margins on text terminals

Previously, flymake-indicator-type defaulted to either fringes
or margins.  But fringes should be used on graphical frames, and
margins on TTY frames.  So default to fringes instead, and
simply fall back to margins automatically on text frames.

* lisp/progmodes/flymake.el (flymake-indicator-type): Set to
fringes.  (bug#77313)
(flymake-mode): Fallback to margins if there's no fringes.
* doc/misc/flymake.texi (Customizable variables): Mention
fallback behavior.
* etc/NEWS: Announce fallback behavior.

(cherry picked from commit 861e7f8b60e4bf076bf5991d25a22b3a012746bd)

6 weeks ago; Skip commit d3c39fb522df50e460940bac10ff489564211d0a
Eshel Yaron [Sun, 13 Apr 2025 20:51:08 +0000 (22:51 +0200)]
; Skip commit d3c39fb522df50e460940bac10ff489564211d0a

6 weeks agoImprove documentation of 'user-emacs-directory'
Eli Zaretskii [Sat, 12 Apr 2025 06:52:04 +0000 (09:52 +0300)]
Improve documentation of 'user-emacs-directory'

* doc/emacs/custom.texi (Find Init): Document the effect of
'user-emacs-directory' on native compilation.  Advise against
changing the value of 'user-emacs-directory' in init files.
(Bug#77745)

(cherry picked from commit 6509cc20a9e000033fe969fb075d6cd37831d1d1)

6 weeks ago; Skip commit 3f06059730679ef6267668e9c1d28ba78534bd56
Eshel Yaron [Sun, 13 Apr 2025 20:51:01 +0000 (22:51 +0200)]
; Skip commit 3f06059730679ef6267668e9c1d28ba78534bd56

6 weeks ago; * doc/emacs/files.texi (Image Mode): Fix a typo (bug#77723).
Eli Zaretskii [Fri, 11 Apr 2025 08:33:26 +0000 (11:33 +0300)]
; * doc/emacs/files.texi (Image Mode): Fix a typo (bug#77723).

(cherry picked from commit e966ff9759ae9fe6aa2e12681bc01315dbe83f71)

6 weeks ago; Fix doc strings of a few Dired commands
Eli Zaretskii [Wed, 9 Apr 2025 11:25:29 +0000 (14:25 +0300)]
; Fix doc strings of a few Dired commands

* lisp/dired-aux.el (dired-do-chown, dired-do-touch)
(dired-do-chgrp, dired-do-chmod): Doc fix.  (Bug#77650)

(cherry picked from commit 378bea99b1a41a38c3915fa65e9adce4ec177197)

6 weeks ago; * CONTRIBUTE: Clarify single-line commit should end with a period.
Jeremy Bryant [Mon, 7 Apr 2025 20:47:39 +0000 (21:47 +0100)]
; * CONTRIBUTE: Clarify single-line commit should end with a period.

(cherry picked from commit 30fb2ac07a74d88908013ea80c62fe6317b3a590)

6 weeks ago; Skip commit 417d14a95eeb7294528d6c2dbba394c31254ff4a
Eshel Yaron [Sun, 13 Apr 2025 20:50:49 +0000 (22:50 +0200)]
; Skip commit 417d14a95eeb7294528d6c2dbba394c31254ff4a

6 weeks ago; Skip commit bb756b195a7bc6b4cf3286d891a38459dac23cde
Eshel Yaron [Sun, 13 Apr 2025 20:50:39 +0000 (22:50 +0200)]
; Skip commit bb756b195a7bc6b4cf3286d891a38459dac23cde

6 weeks ago; Skip commit 684adc07c28ce96b8da1fa2bea31dbf0c8833d92
Eshel Yaron [Sun, 13 Apr 2025 20:50:21 +0000 (22:50 +0200)]
; Skip commit 684adc07c28ce96b8da1fa2bea31dbf0c8833d92

7 weeks agoDrop 'help-form' and associated cruft.
Eshel Yaron [Sun, 13 Apr 2025 06:49:47 +0000 (08:49 +0200)]
Drop 'help-form' and associated cruft.

7 weeks agolisp/savehist.el: Save data, not code.
Eshel Yaron [Sat, 12 Apr 2025 09:15:10 +0000 (11:15 +0200)]
lisp/savehist.el: Save data, not code.

7 weeks agovc-do-async-command: Ellipse later lines in multiline arguments
Sean Whitton [Sat, 12 Apr 2025 02:05:57 +0000 (10:05 +0800)]
vc-do-async-command: Ellipse later lines in multiline arguments

* lisp/emacs-lisp/cl-print.el (cl-print-expand-ellipsis): Bind
inhibit-read-only to t.
* lisp/vc/vc-dispatcher.el (require): Require cl-print at
compile time.
(vc-do-async-command): When printing command arguments that
contain multiple lines, use cl-prin1 with cl-print-string-length
bound in order to ellipse lines other than the first.
Switch the outer quotation marks to single quotation marks.

(cherry picked from commit 3b841700a8bef1d5b16542679458ddfb588ea777)

7 weeks ago; Skip commit cc232bd7a19dcd8b5c77320615a5e93ea0f589b6
Eshel Yaron [Sat, 12 Apr 2025 06:35:12 +0000 (08:35 +0200)]
; Skip commit cc232bd7a19dcd8b5c77320615a5e93ea0f589b6

7 weeks agoRename treesit-toggle-sexp-type to treesit-cycle-sexp-type.
Juri Linkov [Fri, 11 Apr 2025 16:34:29 +0000 (19:34 +0300)]
Rename treesit-toggle-sexp-type to treesit-cycle-sexp-type.

* lisp/treesit.el (treesit-cycle-sexp-type):
Rename from 'treesit-toggle-sexp-type'.  Fix docstring.
https://lists.gnu.org/archive/html/emacs-devel/2025-04/msg00291.html

(cherry picked from commit 695edc5b55bec645fe2df8924513826b202022b6)

7 weeks agoscope.el: Handle 'add-face-text-property'.
Eshel Yaron [Fri, 11 Apr 2025 19:36:36 +0000 (21:36 +0200)]
scope.el: Handle 'add-face-text-property'.

7 weeks agoImprove elisp 'xref-backend-references'.
Eshel Yaron [Fri, 11 Apr 2025 19:36:14 +0000 (21:36 +0200)]
Improve elisp 'xref-backend-references'.

7 weeks ago; Skip commit 53058e15c3313a262d5bc1f0873452779dd2821f
Eshel Yaron [Fri, 11 Apr 2025 11:37:49 +0000 (13:37 +0200)]
; Skip commit 53058e15c3313a262d5bc1f0873452779dd2821f

7 weeks ago; Skip commit 1be9007c0ddec625810148fbee21643db38bad37
Eshel Yaron [Fri, 11 Apr 2025 11:37:45 +0000 (13:37 +0200)]
; Skip commit 1be9007c0ddec625810148fbee21643db38bad37

7 weeks ago; Delete FIXME in vc-print-log
Sean Whitton [Fri, 11 Apr 2025 03:47:32 +0000 (11:47 +0800)]
; Delete FIXME in vc-print-log

This isn't a state-changing operation, indeed, and passing t
here is relevant to dired-vc-deduce-fileset.

(cherry picked from commit 95675b4db0f4a72adfcde00fa24db6f3379f0f2e)

7 weeks agoNew buffer-local vc-buffer-overriding-fileset and vc-buffer-revision
Sean Whitton [Fri, 4 Apr 2025 02:49:57 +0000 (10:49 +0800)]
New buffer-local vc-buffer-overriding-fileset and vc-buffer-revision

* lisp/vc/vc.el (vc-buffer-overriding-fileset)
(vc-buffer-revision): New variables (bug#77529).
(vc-find-revision-save, vc-find-revision-no-save): Set them.
(vc-deduce-fileset): Respect vc-buffer-overriding-fileset.
(vc-print-log): Use vc-buffer-revision as a default working
revision.

* lisp/vc/vc-annotate.el (vc-annotate-parent-file)
(vc-annotate-parent-rev): Delete.
(vc-annotate): Respect vc-buffer-overriding-fileset and
vc-buffer-revision.  This makes 'C-x v g' work from buffers
generated by 'C-x v ~' (bug#5424).
Set the two variables in the newly prepared buffer.
(vc-annotate-working-revision)
(vc-annotate-extract-revision-at-line)
(vc-annotate-revision-at-line, vc-annotate-warp-revision)
(vc-annotate-goto-line):
* lisp/vc/vc-svn.el (vc-svn-annotate-current-time): Use
vc-buffer-overriding-fileset instead of vc-annotate-parent-file,
vc-buffer-revision instead of vc-annotate-parent-rev.
(vc-annotate-parent-rev): Delete declaration.

* etc/NEWS: Announce the new variables.

(cherry picked from commit 60530889c309746def95f32d3dfc117bc4f98444)

7 weeks ago; Skip commit 37164032f690f8a2382f4216c0eb947ce48e2f1f
Eshel Yaron [Fri, 11 Apr 2025 11:37:13 +0000 (13:37 +0200)]
; Skip commit 37164032f690f8a2382f4216c0eb947ce48e2f1f

7 weeks ago; Skip commit c0ea954d0f650227dc518f02a292daeb27cf0c37
Eshel Yaron [Fri, 11 Apr 2025 11:36:59 +0000 (13:36 +0200)]
; Skip commit c0ea954d0f650227dc518f02a292daeb27cf0c37

7 weeks agoFix treesit-forward-sexp/list navigation in the middle of a node.
Juri Linkov [Thu, 10 Apr 2025 16:20:35 +0000 (19:20 +0300)]
Fix treesit-forward-sexp/list navigation in the middle of a node.

* lisp/treesit.el (treesit--forward-list-with-default):
Check the thing 'sexp-default' (bug#76791).

* lisp/progmodes/elixir-ts-mode.el (elixir-ts-mode):
* lisp/progmodes/go-ts-mode.el (go-ts-mode):
* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
* lisp/progmodes/sh-script.el (bash-ts-mode):
Add the thing 'sexp-default' to 'treesit-thing-settings'.

(cherry picked from commit ec62674cb959278240a56246cb6a958217dd17c0)

7 weeks agoRename treesit-toggle-sexp-mode to treesit-toggle-sexp-type.
Juri Linkov [Thu, 10 Apr 2025 16:04:12 +0000 (19:04 +0300)]
Rename treesit-toggle-sexp-mode to treesit-toggle-sexp-type.

* lisp/treesit.el (treesit-toggle-sexp-type):
Rename from 'treesit-toggle-sexp-mode'.  Fix docstring.
https://lists.gnu.org/archive/html/emacs-devel/2025-04/msg00273.html

(cherry picked from commit addcab68918a2dbbff997642e1287bd309a741bc)

7 weeks ago; Skip commit cb9aded6d934a384e9281e43f943281bdca5d517
Eshel Yaron [Fri, 11 Apr 2025 11:36:26 +0000 (13:36 +0200)]
; Skip commit cb9aded6d934a384e9281e43f943281bdca5d517

7 weeks ago; Skip commit aa8a5090ec102a7e39d1cc7661c6dffd27dbea67
Eshel Yaron [Fri, 11 Apr 2025 11:36:21 +0000 (13:36 +0200)]
; Skip commit aa8a5090ec102a7e39d1cc7661c6dffd27dbea67

7 weeks ago; Skip commit bb0f84bc0bf77892b05e3720ea623dcd3431325b
Eshel Yaron [Fri, 11 Apr 2025 11:36:18 +0000 (13:36 +0200)]
; Skip commit bb0f84bc0bf77892b05e3720ea623dcd3431325b

7 weeks ago; Skip commit 50947fd51202dbdd86b1cc677722ab2031c5050b
Eshel Yaron [Fri, 11 Apr 2025 11:36:15 +0000 (13:36 +0200)]
; Skip commit 50947fd51202dbdd86b1cc677722ab2031c5050b

7 weeks ago; * test/infra/android/test-controller.el (ats-eval): Correct punctuation.
Po Lu [Thu, 10 Apr 2025 10:19:28 +0000 (18:19 +0800)]
; * test/infra/android/test-controller.el (ats-eval): Correct punctuation.

(cherry picked from commit 426a016d612a539178a913b68fd395d94919af64)

7 weeks ago; Skip commit ddcc87514c72f86d5eac1cb9015e9b08160451b9
Eshel Yaron [Fri, 11 Apr 2025 11:32:52 +0000 (13:32 +0200)]
; Skip commit ddcc87514c72f86d5eac1cb9015e9b08160451b9

7 weeks agoRespond to display configuration updates on Android
Po Lu [Thu, 10 Apr 2025 07:21:15 +0000 (15:21 +0800)]
Respond to display configuration updates on Android

* java/org/gnu/emacs/EmacsNative.java
(sendConfigurationChanged): Declare function.

* java/org/gnu/emacs/EmacsSdk7FontDriver.java (Sdk7FontEntity)
(Sdk7FontObject): Do not access `metrics' field deleted from
`EmacsService'.

* java/org/gnu/emacs/EmacsService.java (EmacsService)
<metrics, resources>: Delete fields.
<dpiX, dpiY, dpiScaled>: New fields.
(onCreate): Adjust accordingly.  Record current display metrics
for subsequent comparison.
(onConfigurationChanged): New function.

* lisp/dynamic-setting.el (font-setting-change-default-font):
Enable on systems where font-get-system-font is not defined if
invoked with SET-FONT nil.

* src/android.c (sendConfigurationChanged): New function.

* src/androidgui.h (ANDROID_CONFIGURATION_CHANGED): New enumerator.
(struct android_configuration_changed): New structure.
(union android_event): Add `config' member.

* src/androidterm.c (handle_one_android_event): Handle
ANDROID_CONFIGURATION_CHANGED events.
(syms_of_androidterm): Define Qfont_render, and
Qdynamic_setting.  Provide the latter.

(cherry picked from commit 884ede7c959b1331e1ede0b1b80f01a06c048bf5)

7 weeks ago; Skip commit cb339ad8f4e386505f1eae9e45c4162feea61f53
Eshel Yaron [Fri, 11 Apr 2025 11:32:45 +0000 (13:32 +0200)]
; Skip commit cb339ad8f4e386505f1eae9e45c4162feea61f53

7 weeks ago; Fix recently-added documentation
Eli Zaretskii [Thu, 10 Apr 2025 06:26:32 +0000 (09:26 +0300)]
; Fix recently-added documentation

* etc/NEWS:
* lisp/treesit.el (treesit-toggle-sexp-mode): Fix wording of
recently-added documentation.

(cherry picked from commit b205d7b59d8bc97507fb6ffa766eedfcf13f8877)

7 weeks agoNew command 'treesit-toggle-sexp-mode' (bug#76676).
Juri Linkov [Wed, 9 Apr 2025 18:21:53 +0000 (21:21 +0300)]
New command 'treesit-toggle-sexp-mode' (bug#76676).

* lisp/treesit.el (treesit-forward-sexp): Don't use
'treesit-sexp-type-regexp' reserved for list commands
to override their default 'list' thing.
(treesit-down-list, treesit-up-list): Use
'treesit-sexp-type-regexp' instead of 'list'
when it's non-nil.
(treesit-toggle-sexp-mode): New command.

* lisp/progmodes/c-ts-mode.el (c-ts-mode--thing-settings):
Improve 'sexp' thing settings to exclude the top-level
"translation_unit" that just moves to EOF and also "comment".

* lisp/progmodes/elixir-ts-mode.el (elixir-ts--sexp-regexp): Remove.
(elixir-ts--forward-sexp): Remove to use the default 'sexp' navigation.
(elixir-ts--with-parens-0-p, elixir-ts--with-parens-1-p):
New internal functions.
(elixir-ts-mode): Add 'treesit-thing-settings'
instead of 'forward-sexp-function' (bug#76788).

* lisp/progmodes/heex-ts-mode.el (heex-ts--sexp-regexp): Remove.
(heex-ts--forward-sexp): Remove to use the default 'sexp' navigation.
(heex-ts--thing-settings): New variable.
(heex-ts-mode): Use 'heex-ts--thing-settings'
instead of 'forward-sexp-function'.

* lisp/progmodes/java-ts-mode.el (java-ts-mode):
Improve 'sexp' thing to use settings like in c-ts-mode.

* lisp/progmodes/php-ts-mode.el (php-ts-mode):
Improve 'sexp' thing settings to exclude the top-level
"program" that just moves to EOF and also "comment".

* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
Improve 'sexp' thing to use settings like in c-ts-mode.

* lisp/textmodes/css-mode.el (css--treesit-thing-settings):
Add 'sexp' thing.  Add "string_value" to 'text' thing.

* lisp/textmodes/html-ts-mode.el (html-ts-mode--treesit-things-settings):
Improve 'sexp' thing to use settings like in c-ts-mode.
Add "doctype" to the 'list' thing.

(cherry picked from commit 99a2cb05a41c66565d417e11e60f4324aaa5c5b5)

7 weeks agoImprove 'treesit-outline-search'.
Juri Linkov [Wed, 9 Apr 2025 17:40:09 +0000 (20:40 +0300)]
Improve 'treesit-outline-search'.

* lisp/treesit.el (treesit-outline-search): Remove
temporary arg 'recursive'.  Use iteration to visit
more ranges until the next outline heading is found.

* lisp/progmodes/php-ts-mode.el (php-ts-mode):
Set 'treesit-outline-predicate' explicitly.

(cherry picked from commit fa247a24a5ec9cf10865f0ac3711eddfd0ad3546)

7 weeks ago* lisp/subr.el (defvar-local): Change 'indent' to 'defun' (bug#77256).
Juri Linkov [Wed, 9 Apr 2025 17:24:42 +0000 (20:24 +0300)]
* lisp/subr.el (defvar-local): Change 'indent' to 'defun' (bug#77256).

(cherry picked from commit 4b9d571a558fe75df67045ce5dd6d964d4956295)

7 weeks ago; Skip commit 09887a2d41f61dff749860fe41a5e8382bb03bd9
Eshel Yaron [Fri, 11 Apr 2025 11:31:56 +0000 (13:31 +0200)]
; Skip commit 09887a2d41f61dff749860fe41a5e8382bb03bd9

7 weeks agoVC-Dir: Offer to register files before checking in
Sean Whitton [Wed, 9 Apr 2025 04:37:32 +0000 (12:37 +0800)]
VC-Dir: Offer to register files before checking in

* lisp/vc/vc.el (vc-only-files-state-and-model): Rewrite
checking that all files are in compatible VC states.  In
particular, consistently return 'edited' when all files are
either added, removed or edited, instead of allowing the return
value to depend on the order of the files in VC-Dir, and offer
to registered unregistered files if doing so would allow the
operation to proceed.
(vc-compatible-state): Delete.
(vc-next-action): Replace call to vc-compatible-state.
Document, in this command's docstring, the new feature
implemented in vc-only-files-state-and-model.
* etc/NEWS: Announce the new feature.

(cherry picked from commit 253364e2c71bfaaa3ca623ed23f1cae6548a16c7)

7 weeks ago; vc-setup-buffer: Don't pass a string to buffer-live-p.
Sean Whitton [Wed, 9 Apr 2025 03:04:26 +0000 (11:04 +0800)]
; vc-setup-buffer: Don't pass a string to buffer-live-p.

(cherry picked from commit 2310c12658c4b563f9860cb1196bab0d56c6f94d)

7 weeks ago; Skip commit 686032ddaf31cacae9a6cd963d9fcbc85ba3905a
Eshel Yaron [Fri, 11 Apr 2025 11:31:20 +0000 (13:31 +0200)]
; Skip commit 686032ddaf31cacae9a6cd963d9fcbc85ba3905a

7 weeks agoEglot: announce support for diagnostic version checks (bug#77588)
João Távora [Tue, 8 Apr 2025 21:15:26 +0000 (22:15 +0100)]
Eglot: announce support for diagnostic version checks (bug#77588)

* lisp/progmodes/eglot.el (eglot-client-capabilities): Mention versionSupport.

(cherry picked from commit 3e22c73fb612edb1879c83d24396dd8e7db40ffb)

7 weeks agoUpdate lisp/ldefs-boot.el
Eshel Yaron [Fri, 11 Apr 2025 10:38:56 +0000 (12:38 +0200)]
Update lisp/ldefs-boot.el

7 weeks agokkc.el: Fix a couple of bugs.
Eshel Yaron [Fri, 11 Apr 2025 10:38:15 +0000 (12:38 +0200)]
kkc.el: Fix a couple of bugs.

7 weeks agoMake scope.el symbol types a first class citizen.
Eshel Yaron [Fri, 11 Apr 2025 10:37:45 +0000 (12:37 +0200)]
Make scope.el symbol types a first class citizen.

7 weeks ago; * lisp/files.el (hack-local-variables): Fix thinko.
Eshel Yaron [Fri, 11 Apr 2025 10:36:40 +0000 (12:36 +0200)]
; * lisp/files.el (hack-local-variables): Fix thinko.

7 weeks agoPromote 'constantly' from 'cl-constantly'
Eshel Yaron [Fri, 11 Apr 2025 06:45:50 +0000 (08:45 +0200)]
Promote 'constantly' from 'cl-constantly'

7 weeks agorecentf.el: Clean up.
Eshel Yaron [Wed, 9 Apr 2025 14:09:40 +0000 (16:09 +0200)]
recentf.el: Clean up.

7 weeks ago; Update lisp/ldefs-boot.el
Eshel Yaron [Tue, 8 Apr 2025 20:02:21 +0000 (22:02 +0200)]
; Update lisp/ldefs-boot.el

7 weeks agoFix ElDoc in minibuffer
Eshel Yaron [Tue, 8 Apr 2025 19:58:54 +0000 (21:58 +0200)]
Fix ElDoc in minibuffer

7 weeks agoscope.el: Handle derived-mode-p.
Eshel Yaron [Tue, 8 Apr 2025 19:58:26 +0000 (21:58 +0200)]
scope.el: Handle derived-mode-p.

7 weeks ago; Skip commit 40b0c83988267c891e7d0ecf241cc2c0135d5ce1
Eshel Yaron [Tue, 8 Apr 2025 19:43:24 +0000 (21:43 +0200)]
; Skip commit 40b0c83988267c891e7d0ecf241cc2c0135d5ce1

7 weeks agoPreserve an explicit * in pcm-try-completion
Spencer Baugh [Mon, 18 Nov 2024 17:26:55 +0000 (12:26 -0500)]
Preserve an explicit * in pcm-try-completion

An explicitly typed * has different semantics from automatically
inserted PCM wildcards, so it should be preserved on try-completion.  We
already do this in some cases, but now we do it more.

This is especially significant for filename completion: removing an
explicit * can take us from

~/src/emacs/trunk/*/minibuf

to

~/src/emacs/trunk//minibuf

The explicit double slash is interpreted by the file name completion
table to mean "start completing from the root directory", so deleting
the * here substantially changes semantics.

* lisp/minibuffer.el (completion-pcm--merge-completions): Don't drop
important wildcards. (bug#74420)
* test/lisp/minibuffer-tests.el (completion-pcm-test-7): Add tests.

(cherry picked from commit 0fbba16387513e7692b46885833e4a9c218251f0)

7 weeks ago* lisp/treesit.el (treesit--after-change): New function.
Juri Linkov [Tue, 8 Apr 2025 17:43:41 +0000 (20:43 +0300)]
* lisp/treesit.el (treesit--after-change): New function.

(treesit-major-mode-setup): Set 'outline-minor-mode-hook'
to add 'treesit--after-change' with 'treesit-update-ranges'
to 'after-change-functions' (bug#77256).

(cherry picked from commit bec2de20469db0767d2bd7f60f0d4dfb20269614)

7 weeks agoNew function treesit-parsers-at for treesit-language-at (bug#77256).
Juri Linkov [Tue, 8 Apr 2025 17:40:10 +0000 (20:40 +0300)]
New function treesit-parsers-at for treesit-language-at (bug#77256).

* doc/lispref/parsing.texi (Multiple Languages): The variable
'treesit-language-at-point-function' is now optional for
multi-language major modes.  Add description of 'treesit-parsers-at'.

* lisp/treesit.el (treesit-language-at-point-function):
Change the the docstring to remove the dissuasion against
deriving the language from parser ranges.
(treesit-language-at): Use the first parser from
'treesit-parsers-at' as the default return value when
'treesit-language-at-point-function' is nil.  Adapt the docstring.
(treesit-node-at): Use 'treesit-parsers-at'.
(treesit-parsers-at): New function.
(treesit-local-parsers-at): Use 'treesit-parsers-at'
with the most part of the body moved to it.
(treesit-local-parsers-on): Replace the overlay property
'treesit-parser' with 'treesit-parser-local-p' in the docstring.
(treesit-up-list, treesit-simple-imenu, treesit-outline-level):
Use 'treesit-parsers-at'.

* lisp/progmodes/c-ts-mode.el (c-ts-mode): Don't set
'treesit-language-at-point-function'.

* lisp/progmodes/elixir-ts-mode.el (elixir-ts--treesit-language-at-point):
Remove.
(elixir-ts-mode): Don't set 'treesit-language-at-point-function'.

* lisp/progmodes/js.el (js--treesit-language-at-point): Remove.
(js-ts-mode): Don't set 'treesit-language-at-point-function'.

* lisp/progmodes/php-ts-mode.el (php-ts-mode--html-language-at-point)
(php-ts-mode--language-at-point): Remove.
(php-ts-mode): Don't set 'treesit-language-at-point-function'.

* lisp/textmodes/mhtml-ts-mode.el (mhtml-ts-mode--language-at-point):
Remove.
(mhtml-ts-mode): Don't set 'treesit-language-at-point-function'.
Use 'treesit-language-at' for mode-line lighter.

(cherry picked from commit 5e0daa1ef77d2a5fe5b65b8f0fa6c4eab83a2498)

7 weeks ago(internal--get-default-lexical-binding): Be more failsafe
Stefan Monnier [Tue, 8 Apr 2025 17:10:30 +0000 (13:10 -0400)]
(internal--get-default-lexical-binding): Be more failsafe

* lisp/files.el (internal--get-default-lexical-binding): Try and
avoid signaling an error.  Make it easier to suppress the
warning for a specific file.

(cherry picked from commit 7ff674d7125452b0ce6a8d39cb667eacb90f3df2)

7 weeks agoFix prettify-symbols-mode with composition rules
Eli Zaretskii [Tue, 8 Apr 2025 16:04:41 +0000 (19:04 +0300)]
Fix prettify-symbols-mode with composition rules

* lisp/progmodes/prog-mode.el
(prettify-symbols--composition-displayable-p): Fix a thinko.
Patch by Visuwesh <visuweshm@gmail.com>.  (Bug#77627)

(cherry picked from commit 646ccd5e67db701ed9f632492d1bfbe3f6110cb4)

7 weeks agoFix window selection after log-edit-show-diff, again
Sean Whitton [Tue, 8 Apr 2025 12:36:42 +0000 (20:36 +0800)]
Fix window selection after log-edit-show-diff, again

In October I installed a change to vc-diff-patch-string and
labelled it as "Fix window selection after log-edit-show-diff"
but that change only fixed the problem within
log-view-modify-change-comment.  This change should fix window
selection after C-c C-d in ordinary checkins.

* lisp/vc/log-edit.el (log-edit-diff-fileset): Use
save-selected-window in order to respect the documented
requirement that values of log-edit-diff-function leave the Log
Edit buffer's window selected when they return.

(cherry picked from commit d283db577339ee247826bfa1e8c1808dad823858)

7 weeks agoEglot: check textDocument/publishDiagnostics version (bug#77588)
João Távora [Tue, 8 Apr 2025 07:43:14 +0000 (08:43 +0100)]
Eglot: check textDocument/publishDiagnostics version (bug#77588)

* lisp/progmodes/eglot.el (eglot--versioned-identifier): Move up.
(eglot-handle-notification textDocument/publishDiagnostics): Check
eglot--versioned-identifier

(cherry picked from commit 13f439ce98c4cdd57bddfa671f071e31fa2badc6)

7 weeks ago; Fix last change: ensure-list does not ensure a proper list
Sean Whitton [Tue, 8 Apr 2025 07:12:17 +0000 (15:12 +0800)]
; Fix last change: ensure-list does not ensure a proper list

(cherry picked from commit 577ddbb9b79c067d296d50f3e8a04c193c1632b3)

7 weeks agoFactor out vc-only-files-state-and-model
Sean Whitton [Tue, 8 Apr 2025 06:09:07 +0000 (14:09 +0800)]
Factor out vc-only-files-state-and-model

* lisp/dired-aux.el (vc-compatible-state): Delete declaration.
(vc-only-files-state-and-model): Declare.
(dired-vc-deduce-fileset): Factor out vc-only-files-state-and-model.
* lisp/vc/vc-dir.el (require): Require cl-lib at load time, too.
(vc-only-files-state-and-model): Declare.
(vc-dir-deduce-fileset): Factor out vc-only-files-state-and-model.
* lisp/vc/vc.el (vc-only-files-state-and-model): New function,
factored out of dired-vc-deduce-fileset and vc-dir-deduce-fileset.

(cherry picked from commit b784f194f8320d326c755dd49b31210977aae0e7)

7 weeks agoDrop ido.el and icomplete.el
Eshel Yaron [Tue, 8 Apr 2025 19:35:33 +0000 (21:35 +0200)]
Drop ido.el and icomplete.el

7 weeks agoDrop refer.el and refbib.el
Eshel Yaron [Tue, 8 Apr 2025 16:31:22 +0000 (18:31 +0200)]
Drop refer.el and refbib.el

7 weeks ago; Drop Mtn from comment now vc-mtn is obsolete
Sean Whitton [Tue, 8 Apr 2025 05:24:15 +0000 (13:24 +0800)]
; Drop Mtn from comment now vc-mtn is obsolete

(cherry picked from commit 5f89eadb3f5a3794a6ee6acc7c5a3e6b26ab590d)

7 weeks agoUpdate descriptions of VC's capabilities for Git and Mercurial
Sean Whitton [Tue, 8 Apr 2025 05:17:17 +0000 (13:17 +0800)]
Update descriptions of VC's capabilities for Git and Mercurial

* doc/emacs/maintaining.texi (Version Control Systems): Update
descriptions of VC's capabilities for Git and Mercurial.

(cherry picked from commit ef8c4779dd4fd2a00d9ca4e572e42608628bce50)

7 weeks agolisp/files.el (internal--get-default-lexical-binding): Buttonize the M-x
Stefan Monnier [Tue, 8 Apr 2025 03:24:21 +0000 (23:24 -0400)]
lisp/files.el (internal--get-default-lexical-binding): Buttonize the M-x

(cherry picked from commit 19257efbf712dc026572a88b46d456d0c4b8c365)

7 weeks agolisp/files.el (internal--get-default-lexical-binding): Handle nested loads
Stefan Monnier [Tue, 8 Apr 2025 02:48:01 +0000 (22:48 -0400)]
lisp/files.el (internal--get-default-lexical-binding): Handle nested loads

(cherry picked from commit 9dc6177206a10efcc3a25894aa7aabaa54044adc)