]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 months ago; * lisp/files.el (revert-buffer-restore-functions): Doc fix (bug#78124).
Eli Zaretskii [Tue, 29 Apr 2025 18:28:01 +0000 (21:28 +0300)]
; * lisp/files.el (revert-buffer-restore-functions): Doc fix (bug#78124).

(cherry picked from commit 1224e5fd961ba53a5d6aba46e3c92a2fd047a165)

2 months agoIgnore parens in strings for outline headings in emacs-lisp-mode.
Juri Linkov [Tue, 29 Apr 2025 16:55:48 +0000 (19:55 +0300)]
Ignore parens in strings for outline headings in emacs-lisp-mode.

* lisp/outline.el (outline-font-lock-keywords): For non-nil
outline-search-function return a lambda that calls the function,
then sets the match data to the end of the line that is equivalent
to adding ".*" in the regexp.  Then search functions don't need to
match ".*" themselves.

* lisp/progmodes/elisp-mode.el (elisp-outline-search):
New function to skip leading parens in strings when searching
for outline headings.
(emacs-lisp-mode): Set buffer-local 'outline-search-function' to
'elisp-outline-search'.
https://lists.gnu.org/archive/html/emacs-devel/2025-04/msg00934.html

(cherry picked from commit 746a3cb3143194436c4a1a63d26aac890c1a705f)

2 months agoFix invalid search bound in 'search-within-boundaries'.
Juri Linkov [Tue, 29 Apr 2025 16:41:44 +0000 (19:41 +0300)]
Fix invalid search bound in 'search-within-boundaries'.

* lisp/isearch.el (search-within-boundaries): Don't go over BOUND.

* test/lisp/isearch-tests.el (isearch--test-search-within-boundaries):
Test with the BOUND arg as well (bug#78116).

(cherry picked from commit 9d0595d8795fbd604c6429317daff4d6445f8904)

2 months agoRespect point when changing direction after isearch scrolling.
Juri Linkov [Tue, 29 Apr 2025 16:35:30 +0000 (19:35 +0300)]
Respect point when changing direction after isearch scrolling.

* lisp/isearch.el (isearch-repeat): Don't go to isearch-other-end
on changing direction after scrolling (bug#78074).

(cherry picked from commit 622825995204b7aae70b836c8e5e5d44385c401b)

2 months agoFlymake: promptly delete eol overlay if source overlay changed
João Távora [Tue, 29 Apr 2025 11:34:10 +0000 (12:34 +0100)]
Flymake: promptly delete eol overlay if source overlay changed

In the vast majority of cases, changing the source overlay
invalidates the content of the end-of-line overlay, so best to
delete it asap.

* lisp/progmodes/flymake.el (flymake--delete-overlay): Use
'flymake--eol-ov'
(flymake--highlight-line): Use some overlay modification hooks.

(cherry picked from commit 825ea052ad5638c056037c4cac92c9e666dc3820)

2 months agoEglot: improve diagnostic-reporting performance
João Távora [Tue, 29 Apr 2025 11:20:51 +0000 (12:20 +0100)]
Eglot: improve diagnostic-reporting performance

After a change in the buffer has occured, it is often the case
that Flymake is quicker to ask for diagnostics than the server
is to supply them to us.  If we're still stuck with old outdated
diagnostics, don't forward them to Flymake, even if it eagerly
asks us for them.

* etc/EGLOT-NEWS (Changes in upcoming Eglot): Announce changes.

* lisp/progmodes/eglot.el
(eglot--diagnostics): Rework.
(eglot--report-to-flymake): Also take version.
(eglot-handle-notification textDocument/publishDiagnostics)
(eglot--managed-mode)
(eglot-flymake-backend): Tweak call to eglot--report-to-flymake.

(cherry picked from commit 7ae275f04c46e1724fafd8c8aa2f3eed5771df1c)

2 months ago; Improve documentation of 'format-time-string'
Eli Zaretskii [Tue, 29 Apr 2025 08:19:19 +0000 (11:19 +0300)]
; Improve documentation of 'format-time-string'

* doc/lispref/os.texi (Time Parsing): Fix documentation of week
numbers for %U, %V and %W.  (Bug#78096)

(cherry picked from commit 79e7eeb32964ba79f0d0ef06c9c0d7c16c542f37)

2 months ago; * lisp/textmodes/text-mode.el (text-mode-variant): Fix last change.
Eli Zaretskii [Tue, 29 Apr 2025 07:47:35 +0000 (10:47 +0300)]
; * lisp/textmodes/text-mode.el (text-mode-variant): Fix last change.

(cherry picked from commit 2838b64fc8b71d2a534fcf01e02a20066d99e2b3)

2 months ago; Improve obsolescence of 'text-mode-variant'
Eli Zaretskii [Tue, 29 Apr 2025 07:09:54 +0000 (10:09 +0300)]
; Improve obsolescence of 'text-mode-variant'

* lisp/textmodes/text-mode.el (text-mode-variant): Improve
obsolescence announcement text.

* doc/lispref/modes.texi (Example Major Modes): Update example.
(Bug#78125).

(cherry picked from commit 9adb05422eaaa290a6a0542ba8862b806b34fe7c)

2 months ago; * lisp/files.el (revert-buffer-restore-functions): Doc fix.
Eli Zaretskii [Tue, 29 Apr 2025 06:39:34 +0000 (09:39 +0300)]
; * lisp/files.el (revert-buffer-restore-functions): Doc fix.

(cherry picked from commit 4858d81848839c9167a523e4b566dbb253e566c6)

2 months ago; Mention early-init file in Emacs FAQ for Windows
Eli Zaretskii [Tue, 29 Apr 2025 06:05:28 +0000 (09:05 +0300)]
; Mention early-init file in Emacs FAQ for Windows

* doc/misc/efaq-w32.texi (Location of init file, Init file):
Mention the early-init file.  Suggested by David Hedlund
<davidh@gnu.org>.

(cherry picked from commit 2a8e223b8d7c8e18a10ced98f5b794c4de9737e6)

2 months ago; Isearch: Fix key bindings in docstrings
Jake Forster [Mon, 28 Apr 2025 12:52:18 +0000 (22:22 +0930)]
; Isearch: Fix key bindings in docstrings

* lisp/isearch.el (isearch-allow-motion)
(isearch-motion-changes-direction): Use isearch-mode-map for
commands in docstrings (bug#78118).

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

2 months ago; (completion--file-name-table): Minor cleanup.
Eshel Yaron [Tue, 29 Apr 2025 21:11:58 +0000 (23:11 +0200)]
; (completion--file-name-table): Minor cleanup.

2 months agoUpdate tree-sitter subroutine in Fsubst_char_in_region
Yuan Fu [Sat, 15 Mar 2025 05:56:18 +0000 (22:56 -0700)]
Update tree-sitter subroutine in Fsubst_char_in_region

Some explanation: Fsubst_char_in_region used to have a branch,
one branch path calls replace_range, one branch path modifies
the buffer directly.  replace_range already calls
treesit_record_change within it, so we needed to make sure we
only call treesit_record_change in the other branch path.

After I added the call to treesit_record_change, some changes
are made to Fsubst_char_in_region, and the branch was removed.
So no wonder Stefan had the confusion and wrote the FIXME note.

Now that the branch is gone, we can indeed call
treesit_record_change in the end like signal_after_change.

* src/editfns.c (Fsubst_char_in_region): Move to end.

(cherry picked from commit 3c47139b8f602286a8c5c5ca72431b933b4f2a23)

2 months ago; * lisp/cus-edit.el: Fix a typo in a comment.
Eli Zaretskii [Tue, 29 Apr 2025 05:07:33 +0000 (08:07 +0300)]
; * lisp/cus-edit.el: Fix a typo in a comment.

(cherry picked from commit d2c7d8ff6727d160e9e3a17d3775230281f8fb2d)

2 months ago* lisp/progmodes/grep.el (grep-hello-file): Fix another typo.
Po Lu [Tue, 29 Apr 2025 04:54:50 +0000 (12:54 +0800)]
* lisp/progmodes/grep.el (grep-hello-file): Fix another typo.

(cherry picked from commit 8970c9589bfb9b89d2e302cf70374a8cb7bb6c81)

2 months ago* lisp/progmodes/grep.el (grep-hello-file): Fix typos.
Po Lu [Tue, 29 Apr 2025 04:53:51 +0000 (12:53 +0800)]
* lisp/progmodes/grep.el (grep-hello-file): Fix typos.

(cherry picked from commit ac40a65f75a132e47e0d4c68e7ca8b2247153b3c)

2 months agoNew log-edit-maybe-show-diff option for log-edit-hook
Sean Whitton [Mon, 28 Apr 2025 13:32:12 +0000 (21:32 +0800)]
New log-edit-maybe-show-diff option for log-edit-hook

* lisp/vc/log-edit.el (log-edit-maybe-show-diff): New function.
(log-edit-hook): Add it as an option.
(log-edit-diff-function):
* etc/NEWS: Document it.

(cherry picked from commit b9886bb2069b3803fbd5ddd51fa3375b0becc0f1)

2 months agolog-edit-diff-function leaves the diff-mode buffer's window selected
Sean Whitton [Mon, 28 Apr 2025 12:45:44 +0000 (20:45 +0800)]
log-edit-diff-function leaves the diff-mode buffer's window selected

This reverts the following two changesets:

    Author:     Sean Whitton <spwhitton@spwhitton.name>
    AuthorDate: Tue Oct 29 09:40:02 2024 +0800

      Fix window selection after log-edit-show-diff

    Author:     Sean Whitton <spwhitton@spwhitton.name>
    AuthorDate: Tue Apr 8 20:36:42 2025 +0800

      Fix window selection after log-edit-show-diff, again

This also replaces the following changeset:

    Author:     Sean Whitton <spwhitton@spwhitton.name>
    AuthorDate: Tue Oct 29 12:52:20 2024 +0800

      * lisp/vc/log-edit.el (log-edit-diff-function): Document.

* lisp/vc/log-edit.el (log-edit-diff-function): Document that
the function *should* leave the window selected when it returns.
(log-edit-diff-fileset):
* lisp/vc/vc.el (vc-modify-change-comment):
Don't use save-selected-window (bug#77946).
(vc-diff-patch-string):
Call pop-to-buffer, not display-buffer (bug#77946).

(cherry picked from commit d44c87ceb6dc7e85ccfecf47f52f8495e34c1d0b)

2 months agoPort Grep argument autodetection to Android
Po Lu [Tue, 29 Apr 2025 00:28:16 +0000 (08:28 +0800)]
Port Grep argument autodetection to Android

* lisp/progmodes/grep.el (grep-hello-file): On Android, copy
sample text to a real directory.

(cherry picked from commit 3279194bf2c859e76c95045c80a033fc54094f07)

2 months agoImprove env var handling in read-file-name
Spencer Baugh [Mon, 14 Apr 2025 20:01:38 +0000 (16:01 -0400)]
Improve env var handling in read-file-name

Fix various bugs, including bug#77718, by rewriting the way file
name completion handles environment variable expansion.  Instead
of using completion-table-with-quoting to manipulate the string
being completed on, simply make the completion table itself
understand substitute-in-file-name.

Tests are updated: partial-completion now preserves unexpanded
environment variables.  However, partial-completion no longer
works across environment variables containing delimiters; that's
an acceptable sacrifice.

* lisp/minibuffer.el (completion--sifn-boundaries): Add.
(completion--file-name-table): Rewrite to use
substitute-in-file-name explicitly. (bug#77718)
* test/lisp/minibuffer-tests.el (completion-table-test-quoting):
Update.

(cherry picked from commit 509cbe1c35b3dd005a53ac041f9c87ee53b8e115)

2 months agoDon't escape "." in `prin1' when followed by a letter
Spencer Baugh [Tue, 4 Jun 2024 14:35:10 +0000 (10:35 -0400)]
Don't escape "." in `prin1' when followed by a letter

Among other users, let-alist widely uses symbols which start with a ".".
Make those symbols print more nicely by tweaking the escaping rules in
print_object to not escape a leading "." followed by a letter.  This is
a conservative change to avoid constraining future lexer changes.

This is a followup to 637dde4aba921435f78d0de769ad74c4f3230aa6, which
removed some unnecessary escaping of "." and "?" when printing symbols
in prin1.  (Actually, if we always escaped "?" (which was the case
before 637dde4aba92) then "." only ever needs to be escaped when
string_to_number returns non-nil.  So 637dde4aba92 could have just
dropped the escaping of "." with no other changes, if it didn't also
remove escaping of "?")

* src/print.c (print_object): Don't escape "." as the first
character in a symbol if followed by a letter. (bug#77656).
* test/src/print-tests.el (test-dots): Update for new behavior.

(cherry picked from commit 21e340494a5a832453999d3853839db5d8a4d865)

2 months ago(Custom-dirlocals-mode): Let `define-derived-mode` do its job
Stefan Monnier [Mon, 28 Apr 2025 17:35:09 +0000 (13:35 -0400)]
(Custom-dirlocals-mode): Let `define-derived-mode` do its job

* lisp/cus-edit.el (Custom-dirlocals-mode-map): Rename from
`custom-dirlocals-map`.
(Custom-dirlocals-menu): Adjust accordingly.
(Custom-dirlocals-mode): Let `define-derived-mode` do its job.
Use `run-mode-hooks`.

(cherry picked from commit a0f26f3eaf1ccde728806003932dc9e44ef07e9d)

2 months ago; Fix previous change
Michael Albinus [Mon, 28 Apr 2025 06:22:09 +0000 (08:22 +0200)]
; Fix previous change

* test/lisp/url/url-parse-tests.el
(url-generic-parse-url/ms-windows-file-uri-handling): Rename.

(cherry picked from commit c801856820c17247416846ac565b81268b4aca16)

2 months agourl-parse.el: correct code for Windows paths (bug#76982)
Sebastián Monía [Mon, 28 Apr 2025 06:19:06 +0000 (08:19 +0200)]
url-parse.el: correct code for Windows paths (bug#76982)

* lisp/url/url-parse.el (url-recreate-url): Handle empty filenames
without errors.

* test/lisp/url/url-parse-tests.el
(url-generic-parse-url/ms-windows-file-uri-hanlding): Add one
more test for the scenario above.

(cherry picked from commit bc5afe421b47ec31ce94ad8dc02912acd93c3319)

2 months ago; project-vc-include-unregistered: Add FIXME about renaming.
Sean Whitton [Mon, 28 Apr 2025 02:46:48 +0000 (10:46 +0800)]
; project-vc-include-unregistered: Add FIXME about renaming.

(cherry picked from commit c0491a8b807b6b2dae27fd4749c101915bd04e53)

2 months ago; * doc/emacs/maintaining.texi (VC-Aware Project Backend): Copyedit.
Sean Whitton [Mon, 28 Apr 2025 02:46:10 +0000 (10:46 +0800)]
; * doc/emacs/maintaining.texi (VC-Aware Project Backend): Copyedit.

(cherry picked from commit 56baa23e1afedd4c1f2ead47b28d39b646f4275a)

2 months agoFix ruby lint output regexps
Tim Landscheidt [Mon, 28 Apr 2025 00:05:22 +0000 (03:05 +0300)]
Fix ruby lint output regexps

* doc/misc/flymake.texi (An annotated example backend):
Fix regexp.

* lisp/progmodes/ruby-mode.el (ruby-flymake-simple)
(ruby-flymake-rubocop): Fix regexp
(https://lists.gnu.org/archive/html/emacs-devel/2025-04/msg00851.html).

(cherry picked from commit 4765a3b3f2b83e6a2ba4e63f78bec16dc8ca737f)

2 months ago* doc/emacs/maintaining.texi (VC-Aware Project Backend):
Dmitry Gutov [Sun, 27 Apr 2025 22:41:40 +0000 (01:41 +0300)]
* doc/emacs/maintaining.texi (VC-Aware Project Backend):

* doc/emacs/maintaining.texi (VC-Aware Project Backend):
New node (bug#77974).
(Projects): Use "backend" instead of "back-end".

(cherry picked from commit 568a4894a8d7cc61c7a4cf416939e01fb78f0ead)

2 months agoFix the Android build
Po Lu [Sun, 27 Apr 2025 13:08:48 +0000 (21:08 +0800)]
Fix the Android build

* java/README.res: Move from java/res/README, as the AAPT does
not permit non-resource files in resource directories.

(cherry picked from commit aa1b55d5210f4c8ad83a0e8c2367e8691d785fa7)

2 months ago; Skip commit d394cd73d1b21bd1f6d1679c2fcbb10433477092
Eshel Yaron [Tue, 29 Apr 2025 07:32:15 +0000 (09:32 +0200)]
; Skip commit d394cd73d1b21bd1f6d1679c2fcbb10433477092

2 months ago; * doc/misc/ert.texi (Introduction): Be more Lisp-specific.
Sean Whitton [Sun, 27 Apr 2025 03:59:17 +0000 (11:59 +0800)]
; * doc/misc/ert.texi (Introduction): Be more Lisp-specific.

(cherry picked from commit b5967dda32dd9091389e30d8aaa46bdf8319d3e8)

2 months agoInclude additional version metadata during Windows install
Sean Bright [Wed, 2 Apr 2025 17:52:06 +0000 (13:52 -0400)]
Include additional version metadata during Windows install

* admin/nt/dist-build/emacs.nsi: Add DisplayIcon, DisplayVersion, and
  Publisher values to the Uninstall registry key.

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

2 months agoSimplify (if COND nil BODY) to (unless COND BODY)
Eshel Yaron [Tue, 29 Apr 2025 07:27:46 +0000 (09:27 +0200)]
Simplify (if COND nil BODY) to (unless COND BODY)

2 months agoscope.el: Recognize 'add/remove/get-variable-watcher(s)'.
Eshel Yaron [Tue, 29 Apr 2025 07:26:05 +0000 (09:26 +0200)]
scope.el: Recognize 'add/remove/get-variable-watcher(s)'.

2 months ago(mm-display-inline-fontify): Set trust after major mode.
Eshel Yaron [Sun, 27 Apr 2025 19:26:11 +0000 (21:26 +0200)]
(mm-display-inline-fontify): Set trust after major mode.

2 months agoDrop Viper
Eshel Yaron [Sun, 27 Apr 2025 19:25:22 +0000 (21:25 +0200)]
Drop Viper

2 months agoFlymake: Experimental 'fancy' flymake-show-diagnostics-at-end-of-line
João Távora [Sun, 27 Apr 2025 12:00:28 +0000 (13:00 +0100)]
Flymake: Experimental 'fancy' flymake-show-diagnostics-at-end-of-line

* doc/misc/flymake.texi (Customizable variables): Describe new
flymake-show-diagnostics-at-end-of-line.

* etc/NEWS: Mention 'flymake-show-diagnostics-at-end-of-line'.

* lisp/progmodes/flymake.el
(flymake-show-diagnostics-at-end-of-line): Update docstring.

* lisp/progmodes/flymake.el (flymake--eol-overlay-summary):
Rework.  Move to separate section.
(flymake--update-eol-overlays): Rework.  Use 'display'.  Move to
separate section.
(flymake--eol-draw-fancy-1, flymake--eol-draw-fancy): New helpers.
(flymake-end-of-line-diagnostics-face): Remove box.

(cherry picked from commit 0262e3e158e35770f864d3131baf8f1793a20e58)

2 months agoFix use-package :custom-face to set face-defface-spec (bug#77928)
Michael Shields [Sat, 19 Apr 2025 19:58:26 +0000 (12:58 -0700)]
Fix use-package :custom-face to set face-defface-spec (bug#77928)

By default, `face-set-spec' sets the override face spec, so face
attributes are combined with defaults rather than replacing them.
This was a behavior change that was an apparently unintended
consequence of commit 6b344a9.

Also set the `face-modified' property, which causes Customize to
flag the face as changed outside Customize.

* doc/misc/use-package.texi (Faces): Document the behavior.
* lisp/use-package/use-package-core.el (use-package-handler/:custom-face):
(use-package): Improve docstring to reflect implementation.
* test/lisp/use-package/use-package-tests.el
(use-package-test/:custom-face-1): (use-package-test/:custom-face-2):
(use-package-test/:custom-face-3): (use-package-test/:custom-face-4):
Add tests.

(cherry picked from commit ebcde0f90f67852d485a36941b0661cfd1b892eb)

2 months agoImprove documentation of 'insert-kbd-macro'
Adam Sjøgren [Sun, 20 Apr 2025 16:44:16 +0000 (18:44 +0200)]
Improve documentation of 'insert-kbd-macro'

* lisp/macros.el (insert-kbd-macro): Update documentation
of what happens when no macro name is supplied.

* doc/emacs/kmacro.texi (Save Keyboard Macro): Document
saving 'last-kbd-macro'.  (Bug#77317)

(cherry picked from commit 0c55cd0e176cc73178e8f18d959d5a6f9bf632de)

2 months ago; Skip commit 925ac2ef7043a1cf5356f8fa1f15ae43529319bc
Eshel Yaron [Sun, 27 Apr 2025 13:29:52 +0000 (15:29 +0200)]
; Skip commit 925ac2ef7043a1cf5356f8fa1f15ae43529319bc

2 months agoImprove syncing VC buffers before generating diffs
Sean Whitton [Sun, 27 Apr 2025 03:45:54 +0000 (11:45 +0800)]
Improve syncing VC buffers before generating diffs

* lisp/vc/vc.el (vc-maybe-buffer-sync): Delete.  Correct
handling of indirect buffers is now implicitly achieved by
vc-buffer-sync-fileset.
(vc-buffer-sync-fileset): Make NOT-ESSENTIAL argument optional,
new MISSING-IN-DIRS optional argument.  Rewrite to handle
directories named in the fileset, not only files.
(vc-ediff): Replace call to vc-maybe-buffer-sync with a call to
vc-buffer-sync-fileset.
(vc-root-diff): Similarly replace call to vc-maybe-buffer-sync.
This means the user is prompted to save additional buffers, that
they likely want to save before generating the diffs.
* test/lisp/vc/vc-misc-tests.el: New file.

(cherry picked from commit 07c2b169edc2c5aaad1c8f494663a8198b2d4ca2)

2 months agovc-diff: Delete redundant call to vc-maybe-buffer-sync
Sean Whitton [Sat, 26 Apr 2025 05:15:55 +0000 (13:15 +0800)]
vc-diff: Delete redundant call to vc-maybe-buffer-sync

This call is redundant with the subsequent call to
vc-buffer-sync-fileset.  I believe this call to
vc-maybe-buffer-sync was reintroduced by accident -- the
changeset adding the call to vc-buffer-sync-fileset deleted a
call to vc-sync-fileset in the same place.

* lisp/vc/vc.el (vc-diff): Delete redundant call to
vc-maybe-buffer-sync.
* lisp/files.el (find-buffer-visiting): Note in docstring that
this function only ever returns base buffers.

(cherry picked from commit d047a89e769f3c8429c43a40d5f251a895590d3a)

2 months agoRename vc-buffer-sync's argument to NOT-ESSENTIAL
Sean Whitton [Sat, 26 Apr 2025 04:55:56 +0000 (12:55 +0800)]
Rename vc-buffer-sync's argument to NOT-ESSENTIAL

* lisp/vc/vc-dispatcher.el (vc-buffer-sync):
* lisp/vc/vc.el (vc-maybe-buffer-sync, vc-diff)
(vc-buffer-sync-fileset, vc-ediff, vc-root-diff):
Rename argument from NOT-URGENT to NOT-ESSENTIAL.

(cherry picked from commit 6b204c2d164a53ff85e132d4a77bd7afbb0fc42e)

2 months ago; Fix compilation warning in string-edit.el
Eli Zaretskii [Sat, 26 Apr 2025 15:01:42 +0000 (18:01 +0300)]
; Fix compilation warning in string-edit.el

* lisp/textmodes/string-edit.el (string-edit): Avoid shadowing the
global 'major-mode'.

(cherry picked from commit 191b4cd9a76aa31ff9711370842394f37955c06a)

2 months agoFix 'kill-ring-deindent-mode'
Eli Zaretskii [Sat, 26 Apr 2025 14:30:20 +0000 (17:30 +0300)]
Fix 'kill-ring-deindent-mode'

* lisp/indent-aux.el
(kill-ring-deindent-buffer-substring-function): Fix deindenting
for modes which set 'indent-tab-mode' to nil.  (Bug#77981)

(cherry picked from commit 1c7fe501fedb41aaf5b22d82dab5a365f86e4c85)

2 months agoAvoid signaling errors in 'cursor-face-highlight-mode'
Eli Zaretskii [Sat, 26 Apr 2025 14:20:01 +0000 (17:20 +0300)]
Avoid signaling errors in 'cursor-face-highlight-mode'

* lisp/simple.el (redisplay--update-cursor-face-highlight): Don't
go beyond the accessible portion of the buffer.  (Bug#77747)

(cherry picked from commit f7aad714d2854e3f05d87298776628df1d5bfbb2)

2 months ago; Fix previous arc-mode-test commit
Jens Schmidt [Thu, 24 Apr 2025 21:32:45 +0000 (23:32 +0200)]
; Fix previous arc-mode-test commit

* test/lisp/arc-mode-tests.el (define-arc-mode-test-on-type): Doc fix.
("7z"): Use archiver executable "7z" on all ports.

(cherry picked from commit ec8075219da2e3cb676d89db58164f54b079b85d)

2 months agoReuse calendar temporary faces
Manuel Giraud [Thu, 24 Apr 2025 14:27:33 +0000 (16:27 +0200)]
Reuse calendar temporary faces

* lisp/calendar/calendar.el (calendar-make-temp-face): Reuse
temporary face produced by calendar.  (Bug#78036)

(cherry picked from commit af22c9292df85df9421ef11cadccb656a4bf3d7f)

2 months ago* doc/emacs/files.texi (Time Stamp Customization): Typo.
Stephen Gildea [Sat, 26 Apr 2025 01:37:39 +0000 (18:37 -0700)]
* doc/emacs/files.texi (Time Stamp Customization): Typo.

(cherry picked from commit 1f520db97bdb8cfc9a66c46964331db84c41d7e8)

2 months ago; * doc/emacs/search.texi (Isearch Yank): Improve flow.
Sean Whitton [Thu, 24 Apr 2025 12:38:51 +0000 (20:38 +0800)]
; * doc/emacs/search.texi (Isearch Yank): Improve flow.

(cherry picked from commit d824b66c2425544c0f26160af591c61860087272)

2 months ago; * etc/DEBUG: Say that debugging code compiled w/ -Og can be hard.
Sean Whitton [Thu, 24 Apr 2025 12:14:36 +0000 (20:14 +0800)]
; * etc/DEBUG: Say that debugging code compiled w/ -Og can be hard.

(cherry picked from commit 62b284f91530952b248884f0de2f0dbd7b97b26c)

2 months ago; Improve documentation of 'modifier-bar-mode'
Eli Zaretskii [Thu, 24 Apr 2025 09:32:02 +0000 (12:32 +0300)]
; Improve documentation of 'modifier-bar-mode'

* doc/emacs/custom.texi (Modifier Keys):
* doc/emacs/frames.texi (Tool Bars):
* lisp/tool-bar.el (modifier-bar-mode): Improve documentation of
'modifier-bar-mode'.

(cherry picked from commit 49ea1f64c77415a893f59e0c4f4ebef6c499541b)

2 months ago; Skip commit a975232c0fd7bbcce39f904518bd068a879ea4f0
Eshel Yaron [Sun, 27 Apr 2025 13:28:16 +0000 (15:28 +0200)]
; Skip commit a975232c0fd7bbcce39f904518bd068a879ea4f0

2 months ago; * doc/misc/efaq-w32.texi (MinGW-w64): Fix punctuation (bug#78005).
Eli Zaretskii [Wed, 23 Apr 2025 13:18:26 +0000 (16:18 +0300)]
; * doc/misc/efaq-w32.texi (MinGW-w64): Fix punctuation (bug#78005).

(cherry picked from commit 29142dab3169b650c87a08b1313757a899f321cc)

2 months ago; * java/res/README: Note origin of emacs_wrench.png.
Sean Whitton [Sun, 20 Apr 2025 01:22:06 +0000 (09:22 +0800)]
; * java/res/README: Note origin of emacs_wrench.png.

(cherry picked from commit 4cd4a801d865f64aa23c64bd544d68aa68f3fb1c)

2 months ago; Skip commit cc52c1e1d0be936f7091534fa89845cfd2770c20
Eshel Yaron [Sun, 27 Apr 2025 13:26:57 +0000 (15:26 +0200)]
; Skip commit cc52c1e1d0be936f7091534fa89845cfd2770c20

2 months agoMinor improvements
Eshel Yaron [Sun, 27 Apr 2025 12:31:46 +0000 (14:31 +0200)]
Minor improvements

2 months ago; Update lisp/ldefs-boot.el
Eshel Yaron [Sun, 27 Apr 2025 09:52:06 +0000 (11:52 +0200)]
; Update lisp/ldefs-boot.el

2 months agotrust.el: New file with improved trust API.
Eshel Yaron [Sun, 27 Apr 2025 09:48:02 +0000 (11:48 +0200)]
trust.el: New file with improved trust API.

2 months agoFix thai-pattachote input method
Eli Zaretskii [Sat, 26 Apr 2025 13:46:34 +0000 (16:46 +0300)]
Fix thai-pattachote input method

* lisp/leim/quail/thai.el (thai-pattachote): Add missing
characters instead of duplicate ones.  Suggested by Robert
Nikander <robert.nikander@icloud.com>.  (Bug#77998)

(cherry picked from commit 98776ebd391e8cd617b78bfd849222ad07c9642a)

2 months agocsharp-mode.el: Improve fontification of string-interpolation exprs
Jostein Kjønigsen [Wed, 23 Apr 2025 08:32:30 +0000 (10:32 +0200)]
csharp-mode.el: Improve fontification of string-interpolation exprs

* lisp/progmodes/csharp-mode.el
(csharp-ts-mode--font-lock-settings): Remove too wide selector,
causing non-string content to be fonitified as strings.  Add
additional eselectors to highlight variables inside
interpolation-expressions too.  (Bug#78008)

(cherry picked from commit 67e8351bdb78eadaf07a5b308806ec3c00c9e979)

2 months agoAdd "forward history" support for some debuggers
Paul Nelson [Mon, 21 Apr 2025 20:14:53 +0000 (22:14 +0200)]
Add "forward history" support for some debuggers

* lisp/progmodes/gud.el (gud-query-cmdline): Add an optional
default-list parameter to allow passing a list of "forward
history" suggestions to the minibuffer.
(perldb, pdb, guiler): Use buffer file name to suggest a default
debugging command via "forward history".

* doc/emacs/building.texi (Starting GUD): Document the new
feature.

(Bug#77989)

(cherry picked from commit f808f637f57eb0fe87fdc2ea7c2a1fd9e2f9d912)

2 months agoDon't consider "Grep finished" lines as matches for file names
Paul Nelson [Mon, 21 Apr 2025 14:25:06 +0000 (16:25 +0200)]
Don't consider "Grep finished" lines as matches for file names

* lisp/progmodes/grep.el
(grep-compilation-transform-finished-rules): New variable
containing rules to prevent "Grep finished" lines from being
misinterpreted as matches for file names.
(grep-mode): Add these rules to
'compilation-transform-file-match-alist' (bug#77732).

(cherry picked from commit dd3429526aacef0aa98171a598a535a72b9cde39)

2 months agolog-edit-insert-message-template: Reorder headers
Sean Whitton [Sat, 26 Apr 2025 12:28:23 +0000 (20:28 +0800)]
log-edit-insert-message-template: Reorder headers

* lisp/vc/log-edit.el (log-edit-insert-message-template): Put
Author before Summary when both are to be inserted.

(cherry picked from commit 19b6c94566c6003cb7a056fce565ced2896acd4b)

2 months ago; comment-indent: Leave point where we used to.
Sean Whitton [Sat, 26 Apr 2025 12:04:43 +0000 (20:04 +0800)]
; comment-indent: Leave point where we used to.

(cherry picked from commit 30b7318a8f6c593fc6553a45445e84e4e50cd119)

2 months agoFix filename completion in Python shell (bug#77853)
Liu Hui [Mon, 21 Apr 2025 04:46:55 +0000 (12:46 +0800)]
Fix filename completion in Python shell (bug#77853)

'comint-filename-completion' may complete the filename at
wrong locations.  Users who want proper filename completion
should use specialized completion backends (e.g. Jedi).
* lisp/progmodes/python.el (inferior-python-mode): Remove
'comint-filename-completion' in 'comint-dynamic-complete-functions'.

(cherry picked from commit 46776cae052b9bb106ce322d700abbc7cccc4c77)

2 months agoImprove help-fns-edit-variable for Lisp editing
Spencer Baugh [Tue, 15 Apr 2025 21:17:27 +0000 (17:17 -0400)]
Improve help-fns-edit-variable for Lisp editing

Before d50c82f3e98e ("Simplify
'help-enable-variable-value-editing' using 'string-edit'"),
'help-fns-edit-variable' would open a buffer in 'emacs-lisp-mode'
and would not allow exiting that buffer with an invalid Lisp
expression.  Restore that functionality by enhancing 'string-edit'
to allow choosing a major mode and allow passing a function to
validate the buffer contents before returning.
* lisp/help-fns.el (help-fns-edit-variable): Call 'string-edit',
passing 'emacs-lisp-mode' and 'read'.
* lisp/textmodes/string-edit.el (string-edit--read): Add.
(string-edit): Add :major-mode and :read arguments and avoid
passive voice.
(read-string-from-buffer): Avoid passive voice in docs.
(string-edit-mode-map, string-edit-minor-mode-map)
(string-edit-mode, string-edit-minor-mode): Move 'string-edit'
keybindings to a minor mode.
(string-edit-done): Call 'string-edit--read' before exiting.
(Bug#77834)

(cherry picked from commit 8f58f55551341001119034f2e9f5fdc87d3abd54)

2 months ago; Skip commit 5b635d8bd6b7b3353e103b2a20c502d700597082
Eshel Yaron [Sat, 26 Apr 2025 17:31:59 +0000 (19:31 +0200)]
; Skip commit 5b635d8bd6b7b3353e103b2a20c502d700597082

2 months ago; Skip commit 643ebbcac929ee8b2a30843250cddf112cab471f
Eshel Yaron [Sat, 26 Apr 2025 17:31:55 +0000 (19:31 +0200)]
; Skip commit 643ebbcac929ee8b2a30843250cddf112cab471f

2 months agonnfeed: Pass through list request failure reports
Daniel Semyonov [Sun, 13 Apr 2025 13:06:39 +0000 (16:06 +0300)]
nnfeed: Pass through list request failure reports

* lisp/gnus/nnfeed.el (nnfeed-request-list): Report the same
message reported by the inheriting backend on failure.
(Bug#74857)

(cherry picked from commit 0e2fd0e441b2cc7686450d8784707ebc6fbe4917)

2 months agoFix 'yaml-ts-mode' filling of comments (Bug#77095)
Randy Taylor [Sat, 5 Apr 2025 19:52:45 +0000 (15:52 -0400)]
Fix 'yaml-ts-mode' filling of comments (Bug#77095)

* lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode--fill-paragraph):
Handle comment filling differently than block_scalars.
(yaml-ts-mode): Set 'comment-start-skip'.

(cherry picked from commit 417ee3a7f7c66f6c23c9bab7228bfb64014573dd)

2 months agoAdd cache to Python block navigation functions
kobarity [Mon, 21 Apr 2025 14:17:37 +0000 (23:17 +0900)]
Add cache to Python block navigation functions

* lisp/progmodes/python.el (python-nav-cache)
(python-nav-cache-tick): New variables.
(python-nav-cache-get, python-nav-cache-set)
(python-nav-with-cache): New functions.
(python-nav-beginning-of-block, python-nav-end-of-block): New
wrapper functions.
(python-nav--beginning-of-block): Renamed from
'python-nav-beginning-of-block'.
(python-nav--end-of-block): Renamed from
'python-nav-end-of-block'.  (Bug#77620)

(cherry picked from commit 9ae82726d8ea4530f26f2baa16b705ba3cd71834)

2 months agoPerformance optimization of 'python-info-statement-ends-block-p'
kobarity [Sun, 20 Apr 2025 12:14:46 +0000 (21:14 +0900)]
Performance optimization of 'python-info-statement-ends-block-p'

* lisp/progmodes/python.el (python-info-statement-ends-block-p):
Add a comparison of the indentation of the next statement with
the indentation of the current statement.  (Bug#77620)

(cherry picked from commit d753c884948499c0c557d01fefe5914f7d57573c)

2 months agoFix Python block end predicates (bug#77941)
kobarity [Sun, 20 Apr 2025 12:14:46 +0000 (21:14 +0900)]
Fix Python block end predicates (bug#77941)

* lisp/progmodes/python.el (python-info-statement-ends-block-p)
(python-info-end-of-block-p): Add consideration of comments.
* test/lisp/progmodes/python-tests.el
(python-info-statement-ends-block-p-3)
(python-info-end-of-block-p-3): New tests.

(cherry picked from commit 55cf15e163b407878921b4428e5436f01cf1fd90)

2 months ago; Skip commit 7bb648eb804c6420cd0f76cd8075a0faa30a4bfd
Eshel Yaron [Sat, 26 Apr 2025 17:31:02 +0000 (19:31 +0200)]
; Skip commit 7bb648eb804c6420cd0f76cd8075a0faa30a4bfd

2 months ago; Skip commit a4bff5755120aebe6c240271b93e0f0cd8972c2a
Eshel Yaron [Sat, 26 Apr 2025 17:30:30 +0000 (19:30 +0200)]
; Skip commit a4bff5755120aebe6c240271b93e0f0cd8972c2a

2 months ago; Skip commit 52b68f60544a0430265ae4cbbf7fdd16b457bf46
Eshel Yaron [Sat, 26 Apr 2025 17:30:25 +0000 (19:30 +0200)]
; Skip commit 52b68f60544a0430265ae4cbbf7fdd16b457bf46

2 months ago; typescript-ts-mode-multivar-indent-style: Add missing group.
Sean Whitton [Sat, 26 Apr 2025 03:47:23 +0000 (11:47 +0800)]
; typescript-ts-mode-multivar-indent-style: Add missing group.

(cherry picked from commit bacde21fde4794744eaaaf2f7f136ef0fdfbe0c8)

2 months ago; typescript-ts-mode-multivar-indent-style: Use different example.
Sean Whitton [Sat, 26 Apr 2025 03:45:25 +0000 (11:45 +0800)]
; typescript-ts-mode-multivar-indent-style: Use different example.

This prevents it becoming a hyperlink in *Help* buffers.

(cherry picked from commit 94d8f5b94fb6fa281f5ea3bb8a8d945628f3a188)

2 months ago; typescript-ts-mode-multivar-indent-style: Fix use of apostrophes.
Sean Whitton [Sat, 26 Apr 2025 03:43:49 +0000 (11:43 +0800)]
; typescript-ts-mode-multivar-indent-style: Fix use of apostrophes.

(cherry picked from commit 5a043bf3dfa42a6d9b8376687a2dc9e5fb71fe4a)

2 months agoAdd multivar indent style in typescript-ts-mode (bug#77803)
Yuan Fu [Sat, 26 Apr 2025 00:38:58 +0000 (17:38 -0700)]
Add multivar indent style in typescript-ts-mode (bug#77803)

* lisp/progmodes/typescript-ts-mode.el:
(typescript-ts-mode-multivar-indent-style): New option.
(typescript-ts-mode--indent-rules): Support both styles.

(cherry picked from commit 3393644b715a4b5a1b438b556478cc9e45f3e0ad)

2 months ago* Fix missing lexical-binding cookie warning on async compilation (bug#77918)
Roi Martin [Sat, 19 Apr 2025 11:50:52 +0000 (13:50 +0200)]
* Fix missing lexical-binding cookie warning on async compilation (bug#77918)

* lisp/emacs-lisp/comp-run.el (comp--run-async-workers): Fix missing
lexical-binding cookie warning on async compilation.

(cherry picked from commit 3098d34bfd13c4f06d90ee002fe00ca0de1b46cc)

2 months agolisp/auth-source.el (authinfo--keywords): Avoid obsolete font-lock face vars
Stefan Monnier [Fri, 25 Apr 2025 20:35:04 +0000 (16:35 -0400)]
lisp/auth-source.el (authinfo--keywords): Avoid obsolete font-lock face vars

(cherry picked from commit 48940a5d485649bfd6840ddaaf91c17fbe90dbc0)

2 months ago; Change let* to just let in last change.
Sean Whitton [Fri, 25 Apr 2025 01:27:00 +0000 (09:27 +0800)]
; Change let* to just let in last change.

(cherry picked from commit 648453c04d9b91d96452b930c0c948b0b39b5dc0)

2 months agocomment-indent: Handle BOL already within a multiline comment
Sean Whitton [Thu, 24 Apr 2025 07:38:34 +0000 (15:38 +0800)]
comment-indent: Handle BOL already within a multiline comment

* lisp/newcomment.el (comment-indent): Newly handle the case
that BOL is already within a multiline comment (bug#78003).
Thanks to Stefan Monnier for review and reworking the control
flow.

(cherry picked from commit a6829a0c35326361b2b04bd4a010a30fe99802b1)

2 months ago; * test/lisp/arc-mode-tests.el ("7z"): Fix 7z entry.
Eli Zaretskii [Thu, 24 Apr 2025 13:22:13 +0000 (16:22 +0300)]
; * test/lisp/arc-mode-tests.el ("7z"): Fix 7z entry.

(cherry picked from commit e38401e71bddaa16b6de4783fb90e75955faba38)

2 months agoDetect more types of split zip archives
Jens Schmidt [Fri, 18 Apr 2025 12:16:17 +0000 (14:16 +0200)]
Detect more types of split zip archives

* lisp/arc-mode.el (archive-find-type): Detect more types of
split zip archives.
* test/lisp/arc-mode-tests.el (arc-mode-test-make-file)
(arc-mode-test-make-archive): Factor out functions from ...
(arc-mode-test-zip-ensure-ext): ... this test.
(define-arc-mode-test-on-type): Add macro to test function
`archive-find-type' and use the macro to test detection of
various archive types.  (Bug 77898)

(cherry picked from commit d74cbf0519edff34f334b62b4f163e98d51336e0)

2 months agoAllow to disable 'lexical-binding'
Eli Zaretskii [Thu, 24 Apr 2025 12:56:23 +0000 (15:56 +0300)]
Allow to disable 'lexical-binding'

* lisp/progmodes/elisp-mode.el (elisp-enable-lexical-binding):
Optionally, allow to disable 'lexical-binding'.

(cherry picked from commit eb6531ba942042a426390835ebddc83b7936d60f)

2 months ago; Skip commit 3a95e1ede8269f9ba0c223383bc2e8b28e6f7413
Eshel Yaron [Sat, 26 Apr 2025 13:58:38 +0000 (15:58 +0200)]
; Skip commit 3a95e1ede8269f9ba0c223383bc2e8b28e6f7413

2 months ago; Improve documentation of last change
Eli Zaretskii [Thu, 24 Apr 2025 12:07:34 +0000 (15:07 +0300)]
; Improve documentation of last change

* etc/NEWS: Add entry about 'Custom-dirlocals-mode'.

* lisp/cus-edit.el (Custom-dirlocals-mode): Doc fix.  (Bug#77228)

(cherry picked from commit ccfb40a13d3d1d43990b9b659502a6ba2046059a)

2 months agoCreate major mode for `customize-dirlocals` (bug#77228)
Elías Gabriel Pérez [Mon, 24 Mar 2025 03:26:26 +0000 (21:26 -0600)]
Create major mode for `customize-dirlocals` (bug#77228)

* lisp/cus-edit.el (Custom-dirlocals-mode): New major mode.
(custom-dirlocals-with-buffer): Move settings to
`Custom-dirlocals-mode'.

(cherry picked from commit 6414ed0d1166b0f24515ce92bb6db2c3d718a96a)

2 months agoNew variable 'startup-echo-area-message-function'
Eshel Yaron [Sat, 26 Apr 2025 09:22:24 +0000 (11:22 +0200)]
New variable 'startup-echo-area-message-function'

2 months ago; Simplify 'inhibit-startup-echo-area-message'.
Eshel Yaron [Sat, 26 Apr 2025 07:24:09 +0000 (09:24 +0200)]
; Simplify 'inhibit-startup-echo-area-message'.

2 months ago; * src/w32dwrite.c: Minor coding style adjustments.
Po Lu [Thu, 24 Apr 2025 01:04:33 +0000 (09:04 +0800)]
; * src/w32dwrite.c: Minor coding style adjustments.

(cherry picked from commit 4b7816fc804813287e75544f8d016be6eca08873)

2 months agoAdd the keyword ':copy-queries' to 'treesit-language-source-alist'.
Juri Linkov [Wed, 23 Apr 2025 17:17:46 +0000 (20:17 +0300)]
Add the keyword ':copy-queries' to 'treesit-language-source-alist'.

* lisp/treesit-x.el (define-treesit-generic-mode): Add keyword
':copy-queries t' to the end of 'source'.

* lisp/treesit.el (treesit-language-source-alist):
Document the keyword ':copy-queries'.
(treesit--install-language-grammar-1): Add &rest args.
Process the keyword args.  Call 'treesit--copy-queries'
when :copy-queries is non-nil.
(treesit--copy-queries): Add arg 'source-dir'.  Copy queries
from source-dir as well.  Copy only the file "highlights.scm".

(cherry picked from commit 261a965ff1a423c9dc0ee7c89974e4fc3c16b863)

2 months ago; * src/w32dwrite.c (text_extents_internal): Fix typos in comments.
Eli Zaretskii [Wed, 23 Apr 2025 14:29:20 +0000 (17:29 +0300)]
; * src/w32dwrite.c (text_extents_internal): Fix typos in comments.

(cherry picked from commit d3f1f4923f73db617a69ac5d26d08809f814a811)

2 months agow32: change the way text is measured when using DirectWrite
Cecilio Pardo [Sat, 19 Apr 2025 20:46:38 +0000 (22:46 +0200)]
w32: change the way text is measured when using DirectWrite

Now the glyph outline is inspected directly to get its real size,
as the direct measuring functions give generic values for some
fonts.
* src/w32dwrite.c (data structures): Added data structures from
header files that are not present in the 32bit MinGW build
environment.
(text_extents_internal): Call GetGlyphRunOutline to get exact
glyph vertical bounds.  Add new parameter to make this optional
if case that information is not required.
(w32_dwrite_text_extents, w32_initialize_direct_write)
(w32_dwrite_draw): New parameter for 'text_extents_internal'.
(Bug#77171)

(cherry picked from commit 05480592898a2a33e7e683280456ada0d663bfd4)

2 months ago; Skip commit 01f97fabfe1bde122cc64590523cf5499b1b6d8d
Eshel Yaron [Wed, 23 Apr 2025 07:49:43 +0000 (09:49 +0200)]
; Skip commit 01f97fabfe1bde122cc64590523cf5499b1b6d8d

2 months ago; Skip commit 79cef45a1204a2a9e4999ed6dd0db68db6ab7c41
Eshel Yaron [Wed, 23 Apr 2025 07:49:40 +0000 (09:49 +0200)]
; Skip commit 79cef45a1204a2a9e4999ed6dd0db68db6ab7c41