1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-29 10:11:58 -07:00
Commit graph

181555 commits

Author SHA1 Message Date
Eli Zaretskii
81168edb10 Fix absolute cursor positioning in term.el
* lisp/term.el (term-handle-ansi-escape): Cursor Character
Absolute uses one-based column numbers; adjust to Emacs's
zero-based column numbering.  (Bug#80458)
2026-02-22 12:39:12 +02:00
Michael Albinus
923aac2e4e Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2026-02-22 10:38:10 +01:00
Stéphane Marks
1d93015db4 ; system-taskbar tweaks to dbus loading and group keyword (bug#80361)
* lisp/system-taskbar.el (system-taskbar): Defgroup keyword now
system-interface in sympathy with system-sleep.
(dbus-list-activatable-names, dbus-send-signal, dbus-ping):
Pacify byte compiler.
(system-taskbar--set-back-end): Load dbus only when needed.
2026-02-22 10:36:16 +01:00
Stéphane Marks
743d3c5143 ; system-sleep minor follow ups (bug#80361)
* lisp/cus-edit.el (system-interface): New defgroup.
* lisp/system-sleep.el (system-sleep--set-back-end): Correct
dbus initialization order.
2026-02-22 10:35:23 +01:00
Michael Albinus
b1f24b3589 * lisp/net/tramp.el (tramp-signal-hook-function): Extend docstring. 2026-02-22 10:33:40 +01:00
Stéphane Marks
77aac20ce6 New user option 'after-delete-frame-select-mru-frame' (bug#80397)
Users can revert to the old 'delete-frame' behavior of selecting
the oldest frame in 'frame-list' rather than the most-recently
used frame.

* src/frame.c (delete_frame): Consult
'after-delete-frame-select-mru-frame'.
(syms_of_frame): New defvar
'after-delete-frame-select-mru-frame'.
* etc/NEWS: Reflect the new user option.
2026-02-22 10:33:34 +01:00
Eli Zaretskii
2ae21d78ec ; Use 'treesit-declare-unavailable-functions' in markdown-ts-mode. 2026-02-22 10:46:01 +02:00
Rahul Martim Juliato
11476d1ce7
Add support for hiding markup delimiters in markdown-ts-mode
* lisp/textmodes/markdown-ts-mode.el
(markdown-ts-hide-markup): New defcustom controlling
visibility of markup delimiters.
(markdown-ts--fontify-delimiter): Fontify delimiter nodes and
conditionally apply invisibility.
(markdown-ts--set-hide-markup): Internal helper to update
invisibility state.
(markdown-ts-toggle-hide-markup): Interactive command to toggle
delimiter visibility.
(markdown-ts-setup): Initialize delimiter hiding according to
'markdown-ts-hide-markup' and register managed properties.
(markdown-ts--treesit-settings): Use
'markdown-ts--fontify-delimiter' for delimiter nodes.
(require 'outline): Ensure outline faces are available so
headings are fontified correctly on first load.
2026-02-21 23:38:44 -08:00
Paul Eggert
64c2df0e19 Stop ENUM_BF worrying about gcc -std=c89 -pedantic
* src/lisp.h (ENUM_BF): Modernize ENUM_BF doc for latest compilers
that still have a beef with enum bitfields.  Simplify by dropping
support for ‘gcc -std=c89 -pedantic’, as it’s been many years
since Emacs worked with C89, for other reasons.
2026-02-21 20:26:30 -08:00
Paul Eggert
89ce923eb3 Port Lisp_Fwd to strict C bitfields
ISO C does not require C compilers to support enum bitfields.
Problem found with IBM XL C for AIX 16.1 (2018), which IBM
supports through 2029.
* src/lisp.h (struct Lisp_Fwd): Use ENUM_BF instead of declaring
enum bitfields directly.
2026-02-21 20:26:30 -08:00
Jim Porter
7527cc1963 Preserve the original order of Eshell aliases when loading
* lisp/eshell/em-alias.el (eshell-read-aliases-list): Reverse the alias
list back to its original order at the end of loading.

* test/lisp/eshell/em-alias-tests.el
(em-alias-test/alias-load-preserves-order)
(em-alias-test/alias-save-sorted): New tests.
2026-02-21 17:13:46 -08:00
Arto Jantunen
53111ba9f8 Sort Eshell aliases when adding new ones
The main point is to make the content of 'eshell-aliases-file' stable so
that storing it in git becomes feasible.

This also makes the output of the alias command come out in alphabetical
order (bug#80401).

* lisp/eshell/em-alias.el (eshell/alias): Sort when updating
'eshell-command-aliases-list'.

* test/lisp/eshell/em-alias-tests.el
(em-alias-test/alias-list-is-sorted): New test.

* etc/NEWS: Announce this change.
2026-02-21 17:13:35 -08:00
Sean Whitton
f7d795d9c9 vc-do-async-command: Set special-mode only when no mode set
* lisp/vc/vc-dispatcher.el (vc-do-async-command): Set
special-mode only when no other mode set.
2026-02-21 22:32:36 +00:00
Alan Third
a61c098a51 Fix GNUstep width calculation (bug#80331)
* src/nsfns.m (Fx_display_mm_height): 'dpi' should have been 'px_to_mm'.

Co-authored-by: Shay Elkin <shay@elkin.io>
2026-02-21 18:50:23 +00:00
Shay Elkin
a7dbf2427a Use real display geometry on NS (bug#80331)
In nsfns.m, `x-display-mm-height' and `x-display-mm-weight' computes the
display size by dividing its (logical) pixel dimensions by 92 dpi.

This would often give wrong results: by default, logical pixels on in
macOS are computed to 72 dpi, but that can be changed by the user.

As macOS multi-screen geometry is all computed based on the main
screen's cooridnate system, use its dpi to compute the physical size of
the bounding box containing all the screens.

* src/nsfns.m (Fx_display_mm_height):
(Fx_display_mm_width): Calculate the total physical display size
using the main-screen's geometry.

Copyright-paperwork-exempt: yes
2026-02-21 17:37:56 +00:00
Eli Zaretskii
c6cedfbb2f Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2026-02-21 19:34:59 +02:00
Eli Zaretskii
9d98450f36 ; * lisp/mail/rmailsum.el (mail-parse): Require. 2026-02-21 19:33:57 +02:00
Paul Nelson
ab4be3cc1f Make Rmail summary address display customizable
* lisp/mail/rmailsum.el (rmail-summary-sender-function)
(rmail-summary-recipient-function, rmail-summary-address-width):
New user options.
(rmail-summary--address-display, rmail-summary-name-or-address)
(rmail-summary-recipient-strip-quoted-names)
(rmail-summary-recipient-names): New functions.
(rmail-header-summary): Use them when formatting sender and
recipient fields (bug#80406).

* doc/emacs/rmail.texi (Rmail Make Summary): Document them.

* test/lisp/mail/rmailsum-tests.el: New file.
(rmailsum-tests-name-or-address-prefers-name)
(rmailsum-tests-name-or-address-fallback-to-address)
(rmailsum-tests-recipient-strip-quoted-names-first-line)
(rmailsum-tests-recipient-names-folded)
(rmailsum-tests-recipient-names-fallback-to-address): New tests.
2026-02-21 19:30:25 +02:00
Alan Third
7478e6ae7d Fix SVG CSS handling (bug#80384)
This reverts commit 9f5d17cd72, but
includes the fix for adding user CSS after the generated CSS.

* src/image.c (svg_load_image): Set the CSS stylesheet using the librsvg
functions, instead of inserting it into the wrapper.
2026-02-21 17:29:40 +00:00
Eli Zaretskii
f3555fc846 Avoid segfaults if someone sets 'composition-function-table' to nil
* src/composite.c (composition_compute_stop_pos)
(composition_reseat_it): Recreate 'composition-function-table' if
it ever becomes garbled.  (Bug#80462)
2026-02-21 19:27:17 +02:00
Sean Whitton
b055b6e889 New command vc-dir-root-next-action
* lisp/vc/vc-dir.el (vc-dir-root-next-action): New command.
(vc-dir-mode-map): Bind it.
* doc/emacs/maintaining.texi (VC Directory Commands):
* etc/NEWS: Document it.
2026-02-21 17:18:24 +00:00
Liu Hui
f2b99c4c0b Use a custom Pdb class in the Python shell
The custom Pdb class enables native completion in pdb by
wrapping the pdb's native completer.  It also makes necessary
function definitions like __PYTHON_EL_* available between pdb
frames, and enables non-native completion/ffap/eldoc
functionalities when debugging inside python modules.

* lisp/progmodes/python.el (python-shell-send-setup-code): Fix
the separator between python-shell-setup-codes.
(python-shell-completion-native-setup): Move common completion
setup code ...
(python-shell-completion-setup-code): ... here.
(python-shell-completion-at-point): Enable native completion for
pdb and respect the delimiter of pdb completer.
(python-shell-pdb-setup-code): New variable.
(python-shell-comint-watch-for-first-prompt-output-filter): Send
setup codes only once.
(python-ffap-module-path, python-eldoc--get-doc-at-point): Stop
sending setup code in every function call.
* test/lisp/progmodes/python-tests.el (python-tests--pdb-1)
(python-shell-pdb-1): New test.
* etc/NEWS: Mention the change.  (bug#80182)
2026-02-21 16:51:28 +02:00
Eli Zaretskii
6f29a0ca7b Adapt ELisp Intro manual to recent changes in Emacs
* doc/lispintro/emacs-lisp-intro.texi (Effect of installation):
Fix example.  (Bug#80442)
(Review): Adapt to recent Emacs.  (Bug#80447)
2026-02-21 16:46:44 +02:00
Eli Zaretskii
7ec21af8f1 ; * etc/NEWS: Fix last change (bug#80398). 2026-02-21 16:21:28 +02:00
Gabriel Santos
6ba77ede06 browse-url-firefox-program: Add support for more Firefox variants.
* lisp/net/browse-url.el (browse-url-firefox-program): Add support for
Floorp, LibreWolf and Zen Browser.  (Bug#80398)
* etc/NEWS: Announce the change.
2026-02-21 16:17:29 +02:00
Manuel Giraud
9aebe411de Remove one lambda level in some Gnus' functions
* lisp/gnus/gnus-agent.el (gnus-agent-get-undownloaded-list):
* lisp/gnus/gnus-cloud.el (gnus-cloud-prune-old-chunks):
* lisp/gnus/gnus-draft.el (gnus-draft-check-draft-articles):
* lisp/gnus/gnus-group.el (gnus-group-sort-flat)
(gnus-group-expire-all-groups):
* lisp/gnus/gnus-sum.el (gnus-thread-highest-number):
* lisp/gnus/gnus-topic.el (gnus-topic-init-alist)
(gnus-topic-sort-topic): Replace the (lambda (x) (fun x))
pattern with #'fun.  (Bug#80382)
2026-02-21 16:02:53 +02:00
Eli Zaretskii
138ee9b09e ; Make the document language in Info manuals explicitly stated
* doc/misc/woman.texi:
* doc/misc/wisent.texi:
* doc/misc/widget.texi:
* doc/misc/vtable.texi:
* doc/misc/viper.texi:
* doc/misc/vhdl-mode.texi:
* doc/misc/use-package.texi:
* doc/misc/url.texi:
* doc/misc/tramp.texi:
* doc/misc/todo-mode.texi:
* doc/misc/srecode.texi:
* doc/misc/speedbar.texi:
* doc/misc/smtpmail.texi:
* doc/misc/sieve.texi:
* doc/misc/ses.texi:
* doc/misc/semantic.texi:
* doc/misc/sc.texi:
* doc/misc/sasl.texi:
* doc/misc/remember.texi:
* doc/misc/reftex.texi:
* doc/misc/rcirc.texi:
* doc/misc/pgg.texi:
* doc/misc/pcl-cvs.texi:
* doc/misc/octave-mode.texi:
* doc/misc/nxml-mode.texi:
* doc/misc/newsticker.texi:
* doc/misc/mh-e.texi:
* doc/misc/message.texi:
* doc/misc/mairix-el.texi:
* doc/misc/info.texi:
* doc/misc/ido.texi:
* doc/misc/idlwave.texi:
* doc/misc/htmlfontify.texi:
* doc/misc/gnus.texi:
* doc/misc/forms.texi:
* doc/misc/flymake.texi:
* doc/misc/eww.texi:
* doc/misc/eudc.texi:
* doc/misc/eshell.texi:
* doc/misc/ert.texi:
* doc/misc/erc.texi:
* doc/misc/epa.texi:
* doc/misc/emacs-gnutls.texi:
* doc/misc/eieio.texi:
* doc/misc/eglot.texi:
* doc/misc/efaq-w32.texi:
* doc/misc/efaq.texi:
* doc/misc/edt.texi:
* doc/misc/ediff.texi:
* doc/misc/ede.texi:
* doc/misc/ebrowse.texi:
* doc/misc/dired-x.texi:
* doc/misc/dbus.texi:
* doc/misc/cl.texi:
* doc/misc/cc-mode.texi:
* doc/misc/calc.texi:
* doc/misc/bovine.texi:
* doc/misc/autotype.texi:
* doc/misc/auth.texi:
* doc/lispintro/emacs-lisp-intro.texi:
* doc/lispref/elisp.texi:
* doc/emacs/emacs.texi: Add @documentlanguage where it was
missing.  This makes the language explicit given the change in
behavior expected in Texinfo 7.3.
2026-02-21 15:29:13 +02:00
Eli Zaretskii
26492b3b40 ; * lisp/startup.el (fancy-startup-tail): Align links to startup options. 2026-02-21 13:31:01 +02:00
Eli Zaretskii
5b8bed186d ; * lisp/startup.el (fancy-startup-tail): Remove one more newline. 2026-02-21 13:26:43 +02:00
Eli Zaretskii
80c0beef45 ; * lisp/faces.el (mode-line-highlight): Fix colors of the box (bug#80441). 2026-02-21 13:24:08 +02:00
Sean Whitton
a9d92bfa11 ; Further tweaks to newcomers' theme checkbox. 2026-02-21 11:18:17 +00:00
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