Commit Graph

181324 Commits

Author SHA1 Message Date
Sean Whitton
76b76fe14c ; * lisp/custom.el (copy-theme-options): New FIXME. 2026-02-21 09:35:30 +00:00
Sean Whitton
6e63a13033 ; Improve appearance of newcomers-presets button. 2026-02-21 09:32:44 +00:00
Sean Whitton
3655449184 ; Improve documentation of newcomers-presets. 2026-02-21 09:32:30 +00:00
Eli Zaretskii
f8075bc523 ; * doc/lispref/edebug.texi (Using Edebug): Fix a typo (bug#80459). 2026-02-21 10:29:45 +02:00
Stefan Monnier
6b101f17b8 Fix predicate of plist-member on function-history
The keys of this plist are strings and should thus be compared
with `equal`.  `eq` works surprisingly often (because we often
happen to use exactly the same string) but not always.

* lisp/loadhist.el (loadhist-unload-element):
* src/data.c (add_to_function_history): Pass `equal` to `plist-member`.
2026-02-20 23:37:48 -05:00
Philip Kaludercic
b83771e534 New command to skip over the head of Customize buffers
* lisp/cus-edit.el (custom-mode-map): Bind it.
(Custom-goto-first-choice): New command.  (Bug#80218)
2026-02-20 22:00:48 +01:00
Philip Kaludercic
6de5976354 * lisp/cus-edit.el (custom-mode-map): Bind 'Custom-reset-standard'
(Bug#80218)
2026-02-20 21:25:34 +01:00
Philip Kaludercic
e347f65951 Add new command 'copy-theme-options'
* doc/emacs/custom.texi (Custom Themes): Mention command in a
general context.
(Newcomers Theme): Mention command in the context of the
'newcomers-preset' theme
* etc/NEWS: Mention new command.
* lisp/custom.el (copy-theme-options): New command.
2026-02-20 21:18:14 +01:00
Philip Kaludercic
ed030e7942 Add a theme and minor mode for new users
* doc/emacs/custom.texi (Beginners Theme): Document new theme.
* etc/NEWS: Mention new theme.
* etc/themes/newcomers-presets-theme.el: New file including
new theme.
2026-02-20 21:18:14 +01:00
Mattias Engdegård
0f832ad8bf Optimise closed-over variables earlier
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Treat 'internal-get-closed-var' as a special form and delete it in
for-effect context.
2026-02-20 18:37:07 +01:00
Mattias Engdegård
90b9c61cc2 Remove two obsolete peephole optimisation rules
* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode):
Remove two rules: the first could sometimes skip a varref in a loop;
this was useful before lexical binding but now just makes some code
slightly bigger.  The second rule attempted to move a conditional branch
from the top to the bottom of a loop but depended on the first to work.

Both were quite slow, easily measurable when compiling big files, and
arguably O(n³) which isn't very good for a peephole optimisation.
2026-02-20 18:37:07 +01:00
Sean Whitton
f680b988c2 ; * lisp/subr.el (and-let*): Expand to 'and' not 'when'. 2026-02-20 12:33:25 +00:00
Sean Whitton
0903fe3ac0 Show "committing" pseudo-state in VC-Dir during an async checkin
* lisp/vc/vc-dir.el (vc-dir-fileinfo): New 'display-state'
field.
(vc-dir-update): Use it.
(vc-default-dir-printer):
* lisp/vc/vc-git.el (vc-git-dir-printer): Use it.  Fontify a
display state of "committing" as vc-dir-status-warning.
* lisp/vc/vc-hooks.el (vc--file-getinheprop): New function.
* lisp/vc/vc.el (vc-checkin): Set "committing" display state on
items we are checking in asynchronously.
2026-02-20 11:37:34 +00:00
Basil L. Contovounesios
027a33f81b Use git ls-files --deduplicate in project.el (bug#80409)
* lisp/progmodes/project.el (vc-git-project-list-files): Prefer
git ls-files --deduplicate, available since Git 2.31 (2021), over
delete-consecutive-dups.  Prefer string-prefix-p and string-suffix-p
over slower and more error-prone regexp matching.  Prefer
string-match-p over string-match when either will do.
2026-02-20 02:12:22 +02:00
kobarity
71d7ea23db Remove (featurep 'project) guards in python.el
* lisp/progmodes/python.el: Since they are included in emacs 29.1,
remove the Package-Requires for seq, project, and flymake.
(require 'project): Remove 'noerror argument.
(python-shell-get-process-name): Remove (featurep 'project).
Use 'project-name'.
(run-python)
(python--import-sources): Remove (featurep 'project).  (Bug#80405)
2026-02-19 19:36:52 +02:00
Sean Whitton
896399d7fb Fix invalid vc-state after vc-revert
* lisp/vc/vc.el (vc-revert-file, vc-revert-files): If the
vc-state of the file is 'added', set it to 'unregistered' after
the operation, not 'up-to-date'.
(vc-revert-files): Fix updating vc-checkout-time to affect files
within directories within FILES.
2026-02-19 12:23:30 +00:00
Sean Whitton
deb667289c * lisp/vc/vc-dispatcher.el (vc-do-async-command): Call special-mode. 2026-02-19 11:50:58 +00:00
Sean Whitton
2bf2855b57 Restore 'cond' one element clauses to 'cond*'
* lisp/emacs-lisp/cond-star.el (cond*-non-exit-clause-p)
(cond*-non-exit-clause-substance): Treat only one element
clauses beginning with match*/pcase* pseudoforms as non-exit.
(cond*-convert-condition): Handle exiting clauses with only one
element, that is a regular Lisp expression.
(cond*):
* doc/lispref/control.texi (cond* Macro): Document the change.
2026-02-19 09:45:21 +00:00
Sean Whitton
e832976f1a Fixes to with-vc-properties
* lisp/vc/vc.el (with-vc-properties): Un-gensym
'vc-touched-properties'; this is a dynamic variable.  Document
the longstanding behavior to capture 'file' while evaluating
SETTINGS, and to evaluate SETTINGS for each file to be updated.
Declare '(indent 0)'.
2026-02-18 19:14:38 +00:00
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