1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-30 02:33:03 -07:00
Commit graph

181555 commits

Author SHA1 Message Date
Sean Whitton
c18469b20c vc-dir-show-outgoing-count: Mark a safe local variable
* lisp/vc/vc-dir.el (vc-dir-show-outgoing-count): Mark a safe
local variable.
2026-02-18 18:44:05 +00:00
Eshel Yaron
551231bb53
elisp-scope.el: Add variable value specifications
We add a symbol property 'elisp-scope-variable-spec', which
holds a specification for the values of a variable with that
property.  For example, (put 'foo '(symbol . face)) says
that the value of variable 'foo' is a face name.
This allows elisp-scope.el to analyze forms such as
(setq foo 'bar) and (let ((foo 'bar)) ...) more accurately.
This is also used for analyzing macros that let-bind (one of)
their arguments to a specific special variable, such as
'with-connection-local-application-variables'.

We initially add this new property to some common variables.

* lisp/emacs-lisp/elisp-scope.el: Add
'elisp-scope-variable-spec' property to
'coding-system-for-read/write' and 'major-mode'.
(elisp-scope--variable-spec): New defsubst.
(elisp-scope--let-1, elisp-scope-let*, elisp-scope-setq):
Use it.
* test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el:
Add test form.
2026-02-18 19:42:47 +01:00
Juri Linkov
66d2dfe739 Adapt mode-line faces to dark background mode (bug#80135)
* lisp/faces.el (mode-line, mode-line-highlight): Adapt to dark background.
Suggested by Philip Kaludercic <philipk@posteo.net>.
2026-02-18 20:17:36 +02:00
Juri Linkov
754b29abac * lisp/net/goto-addr.el (goto-address-fontify): Fix unbalanced parens.
Use 'bounds-of-thing-at-point' that relies on
'thing-at-point--bounds-of-well-formed-url' to get
well-formed url with balanced parens (bug#80429).
2026-02-18 20:01:54 +02:00
Stéphane Marks
54d0764665 Add frame-use-time, get-mru-frame, use mru frame in delete-frame (bug#80397)
* lisp/frame.el (get-mru-frame): New defun.
* src/frame.c (delete_frame): Call 'get-mru-frame' (when force
is not Qnoelisp) to select the most recently used frame that is
not the deleted frame as the candidate to select.
(syms_of_frame): Qget_mru_frame new DEFSYM.
* doc/lispref/frames.texi: Document the new functions.
* etc/NEWS: Announce the new functions.
2026-02-18 19:28:21 +02:00
Sean Whitton
f31c61a9aa New 'delete-files' VC backend function for faster mass deletions
* lisp/vc/vc-git.el (vc-git-delete-files):
* lisp/vc/vc-hg.el (vc-hg-delete-files): New functions.
* lisp/vc/vc.el (vc-delete-file): Use them.
2026-02-18 17:23:25 +00:00
Sean Whitton
2bfcd37609 Fix vc-hg-delete-file on files in nonexistent directories
* lisp/vc/vc-hg.el (vc-hg-delete-file): Always run hg in the
repository root.
2026-02-18 16:41:52 +00:00
Eli Zaretskii
9df4dee8d5 ; Fix last change in treesit.c
* src/treesit.c (ts_tree_cursor_copy) [WINDOWSNT]: Define and load
from the DLL if 'ts_tree_cursor_goto_previous_sibling' is not
available.  This fixes the MS-Windows build broken by the last
change here.  (Bug#80108)
2026-02-18 14:25:24 +02:00
Sean Whitton
e915646b89 vc-git-pull, vc-git-incoming-revision: Use push remotes
* lisp/vc/vc-git.el (vc-git-pull, vc-git-incoming-revision): Use
configured push remotes.
* etc/NEWS: Announce change to vc-git-pull.
2026-02-18 11:35:16 +00:00
Yuan Fu
25149aec99
Change back tree-sitter version requirement (bug#80108)
Now we use treesit_traverse_sibling_helper when it exists, and
use the old code otherwise. So we still support older
tree-sitter versions.

* configure.ac (LIBSYSTEMD_CFLAGS): Add back old config checking
for the malloc function. Add another check for
ts_tree_cursor_goto_previous_sibling.
* src/treesit.c: (treesit_traverse_sibling_helper): Add back the
old code that doesn't require
ts_tree_cursor_goto_previous_sibling.
2026-02-17 17:55:18 -08:00
Paul Eggert
437b27046f Depend explicitly on Gnulib ‘attribute’ module
Problem reported by Basil L. Contovounesios (bug#80428#8).
* admin/merge-gnulib (GNULIB_MODULES): Add ‘attribute’.
2026-02-17 11:11:12 -08:00
Sean Whitton
818ad5e68f ; Docstring fix for outstanding changes commands. 2026-02-17 15:50:30 +00:00
Sean Whitton
39a2a2e3b5 Use -outstanding not -outgoing-base in VC command names
* lisp/vc/vc.el (vc-root-diff-outgoing-base)
(vc-diff-outgoing-base, vc-log-outgoing-base)
(vc-root-log-outgoing-base): Rename from these ...
(vc-root-diff-outstanding, vc-diff-outstanding)
(vc-log-outstanding, vc-root-log-outstanding): ... to these.
All uses changed.
2026-02-17 15:26:20 +00:00
Basil L. Contovounesios
09f2e436ba ; Remove stale commentary in dispnew.c.
* src/dispnew.c: Remove commentary that used to relate to
WINDOW_TO_FRAME_VPOS and WINDOW_TO_FRAME_HPOS.
2026-02-17 15:22:20 +01:00
Basil L. Contovounesios
8cd687c5c6 ; Fix typo in struct image commentary. 2026-02-17 15:22:06 +01:00
Basil L. Contovounesios
0e451ce2ea ; Fix image_error argument in webp_load. 2026-02-17 15:12:02 +01:00
Basil L. Contovounesios
24349bd86d Mark add-log-always-start-new-record as safe
* lisp/vc/add-log.el (add-log-always-start-new-record): Mark as
safe-local-variable (bug#80408).
2026-02-17 13:37:04 +01:00
Juri Linkov
e91f68b742 ; * lisp/treesit.el (treesit-hs-find-next-block): Add guard (bug#80422). 2026-02-17 09:20:16 +02:00
Dmitry Gutov
988e898749 project--delete-zombie-projects: Bind tramp-error-show-message-timeout to nil
* lisp/progmodes/project.el (project--delete-zombie-projects):
Bind tramp-error-show-message-timeout to nil, to instruct Tramp
not to display the "failed to connect" and its message, hiding the
current prompt (bug#80340).
2026-02-17 03:48:22 +02:00
Juri Linkov
e3755a5eb8 Change the default value of 'split-width-threshold' from 160 to 150
* lisp/window.el (split-width-threshold): Change the default value
from 160 to 150 (bug#80050).
(split-window-preferred-function):
Mention 'split-window-preferred-direction' in the docstring.
2026-02-16 19:48:43 +02:00
Paul Nelson
509228fc6c Add repeat-map for smerge-mode commands
* lisp/vc/smerge-mode.el (smerge-repeat-map): New keymap (bug#80414).
2026-02-16 19:27:29 +02:00
Elias Gabriel Perez
f10075d78a * lisp/treesit.el (treesit-hs-find-next-block): Fix infloop. (bug#80232) 2026-02-16 19:12:22 +02:00
Eli Zaretskii
d705a86da4 Fix cross-reference in Emacs Lisp Intro
* doc/lispintro/emacs-lisp-intro.texi
(Lexical & Dynamic Binding Differences): Fix cross-reference.
(Bug#80420)
2026-02-16 18:23:01 +02:00
Michael Albinus
3896b1d4c0 Minor Tramp doc clarifications
* doc/misc/tramp.texi (External packages): Mention handler-bind to
trap for remote-file-error.
(Traces and Profiles): Explain tramp-error-show-message-timeout.
2026-02-16 15:01:42 +01:00
Michael Albinus
aa12e014f6 * lisp/system-sleep.el (sleep-event-state): Define to autoload. 2026-02-16 14:06:26 +01:00
Eli Zaretskii
2b4d088257 ; Unbreak the build broken by a recent commit
* lisp/system-sleep.el (sleep-event): Don't autoload cl-defstruct.
2026-02-16 14:16:27 +02:00
Basil L. Contovounesios
d97326035c ; * lisp/tutorial.el: Remove unneeded require. 2026-02-16 10:47:29 +01:00
Michael Albinus
f432628b71 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2026-02-16 10:34:40 +01:00
Michael Albinus
750d46536e * doc/lispref/commands.texi (Special Events): Fix insert-special-event defun. 2026-02-16 10:34:05 +01:00
Basil L. Contovounesios
486afe1487 ; Fix some markup and typos in the Gnus manual. 2026-02-16 10:31:48 +01:00
Stéphane Marks
3beb804e3a ; Minor updates to system-sleep (bug#80348)
- Add several autoload cookies.
- Separate public API hook used internally into a private hook.
- Fix thinko in setting up the special event sleep-event handler.
- Probe the D-Bus session bus for screen saver support during
enable.

* lisp/system-sleep.el (system-sleep--set-back-end): Move dbus
endpoint tests into the system-sleep--enable dbus
implementation.
(system-sleep--event-after-hook-functions): New private hook.
(system-sleep--dbus-has-screensaver): New defvar.
(system-sleep--sleep-event-handler): Call the new private hook.
(system-sleep--sleep-event-function): Remove.  Use
'system-sleep--sleep-event-handler'.
(system-sleep--enable): Use the internal hook.
(system-sleep--enable): [dbus] Probe session bus for screen
saver support.
(system-sleep--disable): Remove the new internal hook.
(system-sleep--block-sleep): Call screen saver dbus endpoint
only when screen saver support is known to exist.
2026-02-16 10:23:10 +01:00
Paul Eggert
f84fb38a82 Fix SELinux config without -lselinux
Without this fix, a 64-bit build on Ubuntu 25.10 x86-64 failed
when the libselinux1-dev:i386 package (providing <selinux/selinux.h>)
was installed but the libselinux1-dev package (providing
/usr/lib/x86_64-linux-gnu/libselinux.so) was not.
The first symptom was when compiling emacsclient:
‘/usr/bin/ld: ../lib/libgnu.a(file-has-acl.o): in function
`get_aclinfo': .../lib/file-has-acl.c:247:(.text+0x4d8): undefined
reference to `getfilecon'’.
* configure.ac: Default with_selinux to maybe, not to yes.
Defer our SELinux configuration to after Gnulib’s, so that
we handle any SELinux problems that Gnulib discovers.
2026-02-15 12:18:30 -08:00
Heinz Fridolin
e2bf7ce8b6 project.el: Fix in submodules with nonexistent git root (bug#80402)
project-try-vc--search in a submodule directory tries to find the git
root directory, so the local variable root would be set to nil if it
didn't exist. Calling project--vc-merge-submodules-p on nil would lead
to a crash, so now the while loop aborts beforehand.
2026-02-15 18:23:51 +02:00
Vili Aapro
9a5eafa8c3 elisp--highlight-function-argument: Handle special syntax correctly
* lisp/progmodes/elisp-mode.el
(elisp--highlight-function-argument): Handle special usage
syntax correctly when scanning usage arguments using
'forward-sexp' (bug#8432).  Before binding 'origin', skip over
blanks, so as not to highlight them, and to move immediately
before any possible opening square brackets.  After binding
'origin' and before calling 'forward-sexp', skip over opening
square brackets, so as to highlight them.  After calling
'forward-sexp' and before setting 'start' and 'end', skip over
closing square brackets and periods, so as to highlight them.
2026-02-15 11:16:11 +00:00
Vili Aapro
8c39a17eef elisp--highlight-function-argument: Use forward-sexp
* lisp/progmodes/elisp-mode.el
(elisp--highlight-function-argument): Use 'forward-sexp' to move
over usage arguments, handling parenthesized argument patterns
monolithically (bug#8432).  Set 'start' and 'end' to the
beginning and end, respectively, of the usage argument.
2026-02-15 11:16:11 +00:00
Vili Aapro
7d2303aef8 elisp--highlight-function-argument: Use temporary buffer
* lisp/progmodes/elisp-mode.el
(elisp--highlight-function-argument): Insert 'args' into
temporary buffer to prepare for better handling of usage
arguments (bug#8432).  Move point after the first opening
parenthesis of the arguments string.  In the loop, let `origin'
track the point.  No functional change.
2026-02-15 11:16:11 +00:00
Richard Lawrence
858cebd6c5 Fix failing iCalendar tests when TZ=UTC
* lisp/calendar/diary-icalendar.el (diary-icalendar--tz-is-utc-p): New
function.
(diary-icalendar-convert-time-via-strategy): Don't expect a VTIMEZONE
for UTC times.
(diary-icalendar-export-region): Don't generate a VTIMEZONE for 'local
export strategy in UTC.
* test/lisp/calendar/diary-icalendar-tests.el
(diary-icalendar-test-entry-parser): Don't generate a VTIMEZONE for
'local export strategy in UTC.
2026-02-15 12:01:24 +01:00
Eli Zaretskii
9176826f41 ; * lisp/delsel.el: Load cl-lib when byte-compiling to avoid warning. 2026-02-15 07:16:52 +02:00
Yikai Zhao
cdf360059f Fix project-buffers error on buffers with nil default-directory
* lisp/progmodes/project.el (project-buffers):
Check that default-directory is non-nil (bug#80390).
2026-02-15 04:22:45 +02:00
Stefan Monnier
f4a1c00656 delsel.el: Improve the overlay for text replacement
* lisp/delsel.el (delete-selection-replacement-face): Delete var.
(delete-selection-replacement): New face, to replace it.
(delsel--replace-overlay, delsel--replace-text): Delete vars and ...
(delete-selection--replacement-text): ...use this single var instead.
(delete-selection--replacement-cursor): New function.
(delete-active-region): Use it with `cursor-sensor-mode` to avoid the
overlay lingering too long.
(delete-selection--replacement-text): New function extracted from
`delete-selection-repeat-replace-region`, with adjustments to account
for the above changes.
(delete-selection-repeat-replace-region): Use it.

* lisp/emacs-lisp/cursor-sensor.el (cursor-sensor--detect): Do use
`get-pos-property` when it works.  Fix the `missing-p` subfunction
so as not to get fooled by a missing property at END.
2026-02-14 16:55:06 -05:00
Kim F. Storm
38760d4ba7 delsel.el: Use an overlay to track the replacement text
This patch was sent back in 2014 as part of bug#18886.

* lisp/delsel.el (delsel--replace-text-or-position): Delete var.
(delete-selection-replacement-face): New defcustom.
(delsel--replace-text, delsel--replace-overlay): New vars.
(delete-active-region, delete-selection-repeat-replace-region):
Use overlay to track replacement text instead of abusing the
undo-list; this allows the text to be edited before it is
used for substitutions.  Add highlight to the replacement text.
2026-02-14 16:55:01 -05:00
Stefan Monnier
4141beb78c etc/NEWS: Improve text for threads' "buffer disposition" 2026-02-14 16:54:19 -05:00
Basil L. Contovounesios
8f76396da4 ; Mention when make_unibyte_string was introduced. 2026-02-14 20:41:20 +01:00
Basil L. Contovounesios
080ee7f7ec ; Fix define-obsolete-face-alias entry in manual. 2026-02-14 20:32:31 +01:00
Basil L. Contovounesios
973d5d457b Prefer value< with new 'sort' in json.el
Now that json.el uses the new sort calling convention, there's no
need to prefer string< over value<, which may even run faster.
Suggested by Mattias Engdegård <mattias.engdegard@gmail.com>.

* lisp/json.el (json-encoding-object-sort-predicate): Mention value<
in docstring.
(json-pretty-print-buffer-ordered, json-pretty-print-ordered): Use
value< in place of string<.
* test/lisp/json-tests.el (test-json-encode-hash-table-sort): Use
value< as json-encoding-object-sort-predicate in at least one test.
2026-02-14 18:56:44 +01:00
Sean Whitton
ee8b2d8ae2 vc-pull-and-push: Fix when visiting untracked files
* lisp/vc/vc.el (vc-pull-and-push): Don't fail when called from
buffers visiting unregistered or ignored files.
2026-02-14 15:33:44 +00:00
Sean Whitton
f408460cb1 * lisp/vc/vc.el (vc-push): Fix when visiting untracked files. 2026-02-14 15:32:08 +00:00
Philip Kaludercic
ee7c4ed5d8
Don't invoke Dired with -R when reviewing packages
* lisp/emacs-lisp/package.el (package-review): Remove
potentially unportable "-R" switch when calling 'dired'.
2026-02-14 16:29:33 +01:00
Philip Kaludercic
36f35a774b
; Remove 'package-vc-version' declaration 2026-02-14 16:29:33 +01:00
Philip Kaludercic
49c8dd44af
; Remove unnecessary 'inline' require from package.el
* lisp/emacs-lisp/package-activate.el (package-vc-p): Define
using a regular 'defun'.
2026-02-14 16:29:33 +01:00