Commit graph

181218 commits

Author SHA1 Message Date
João Távora
541040d4c8 Eglot: fix neocmakelsp invocation
See https://github.com/joaotavora/eglot/issues/1578

* lisp/progmodes/eglot.el (eglot-server-programs): Fix neocmakelsp
2026-02-13 11:28:44 +00:00
kobarity
06395ba77d Revert "Use 'project-name-cached' in 'python-shell-get-process-name'"
This reverts commit 482748592f.

Commit 583a112169 removed
'project-name-cached' and also resolved bug#80045.
2026-02-13 09:43:29 +02:00
Eli Zaretskii
48525f500e ; Improve documentation of 'package-autosuggest-mode'
* lisp/emacs-lisp/package.el (package--autosuggest-install-and-enable)
(package--autosugest-prompt, package-autosuggest): Doc fixes.
* lisp/emacs-lisp/package-activate.el (package-autosuggest-style)
(package-autosuggest-once, package-autosuggest-mode)
(package--suggestion-applies-p)
(package--autosuggest-find-candidates)
(package--autosugest-line-format)
(package--autosuggest-after-change-mode): Fix doc strings and add
:version tags.

* etc/NEWS (bindings):
* doc/emacs/package.texi (Package Installation): Improve wording,
markup and indexing.
2026-02-13 09:39:02 +02:00
Dmitry Gutov
f1fe4d4619 Fix new eglot test failure due to project cache
* test/lisp/progmodes/eglot-tests.el
(eglot-test-project-wide-diagnostics-rust-analyzer):
Bind project-vc-non-essential-cache-timeout to 0 so that the
result of project-current is refreshed (bug#80387).
2026-02-13 05:22:15 +02:00
Philip Kaludercic
1e6d4f827c
Merge branch 'feature/package-autosuggest' 2026-02-12 23:08:42 +01:00
Eli Zaretskii
69a7f6f605 ; * src/dispnew.c (box_default): Shut up compilation warnings (bug#80386). 2026-02-12 22:17:31 +02:00
Basil L. Contovounesios
8e71dc6bac Use new 'sort' calling convention in json.el
* lisp/json.el (json--print-alist): Use new 'sort' calling
convention for simplicity and potential performance gains.
2026-02-12 19:51:32 +01:00
Michael Albinus
5ba4446e25 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2026-02-12 19:24:44 +01:00
Michael Albinus
e0e0e95f5b Tramp signals 'remote-file-error' consequently
* doc/misc/tramp.texi (External packages): Mention also special events.
Emphasise, that Tramp raises remote-file-error.

* etc/NEWS: Tramp signals 'remote-file-error' consequently.
Presentational fixes and improvements.

* lisp/net/tramp.el (tramp-skeleton-process-file)
(tramp-handle-make-symbolic-link, tramp-process-actions)
(tramp-wait-for-regexp, tramp-send-string):
* lisp/net/tramp-adb.el (tramp-adb-get-device)
(tramp-adb-send-command-and-check, tramp-adb-barf-unless-okay)
(tramp-adb-wait-for-output, tramp-adb-maybe-open-connection):
* lisp/net/tramp-archive.el (tramp-archive-handle-not-implemented):
* lisp/net/tramp-crypt.el (tramp-crypt-do-encrypt-or-decrypt-file-name)
(tramp-crypt-do-encrypt-or-decrypt-file):
* lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-event-error)
(tramp-gvfs-maybe-open-connection):
* lisp/net/tramp-sh.el
(tramp-do-directory-files-and-attributes-with-perl)
(tramp-do-copy-or-rename-file-directly)
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-sh-handle-file-local-copy, tramp-sh-handle-write-region)
(tramp-bundle-read-file-names, tramp-maybe-send-script)
(tramp-find-file-exists-command, tramp-barf-if-no-shell-prompt)
(tramp-maybe-open-connection, tramp-wait-for-output)
(tramp-send-command-and-check, tramp-barf-unless-okay)
(tramp-send-command-and-read, tramp-get-ls-command):
* lisp/net/tramp-smb.el (tramp-smb-handle-file-attributes)
(tramp-smb-handle-make-symbolic-link)
(tramp-smb-maybe-open-connection, tramp-smb-call-winexe):
* lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-send-command-and-read):
Raise a `remote-file-error' in case of connection problems.

* lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection): Improve
check for host.

* lisp/net/tramp-smb.el (tramp-smb-get-localname): Improve error message.

* lisp/net/tramp-sudoedit.el (tramp-default-host-alist):
Set a default for "sudoedit" method.
(tramp-sudoedit-maybe-open-connection): Check for proper host name.
(tramp-sudoedit-send-command): Do not expand ?h.

* lisp/net/tramp.el (tramp-compute-multi-hops): Check for cycle
proxy definition.

* test/lisp/net/tramp-archive-tests.el (tramp-archive-test20-file-modes)
(tramp-archive-test21-file-links): Check for `rmote-file-error'.

* test/lisp/net/tramp-tests.el (tramp-file-name-with-sudo): Declare.
(tramp--test-ignore-make-symbolic-link-error): Check for
`rmote-file-error'.
(tramp-test03-file-name-method-rules): Delete.
(tramp-test03-file-error): New test.
(tramp--test-supports-processes-p): Make it more rebust.
2026-02-12 19:24:10 +01:00
Basil L. Contovounesios
80a52e118d ; List my areas of interest in maintaining. 2026-02-12 19:15:39 +01:00
Basil L. Contovounesios
aa9acfacf0 Check that a UPower battery device IsPresent
The composite DisplayDevice is meant to be presented to the user
only if it IsPresent.  It is not entirely clear whether PowerSupply
implies IsPresent, so check both (bug#80229).

* lisp/battery.el (battery-upower): Skip hot-removable batteries
that are missing from the bay.
2026-02-12 19:15:39 +01:00
Basil L. Contovounesios
0a02ab6db8 Allow disabling battery-update-timer
Now that battery--upower-subscribe registers to signals from
DisplayDevice (bug#80229), it is possible to react to more than just
State changes, including Percentage and IsPresent (although the
latter may already be covered by the DeviceAdded and DeviceRemoved
signals).

That means that it should be possible to disable polling via
battery-update-timer and still get timely mode line updates.

* etc/NEWS
(Changes in Specialized Modes and Packages in Emacs 31.1):
Announce new battery-update-interval :type.

* lisp/battery.el (battery-update-interval): Allow setting to nil.
(display-battery-mode): Do not create battery-update-timer then.
(battery-upower-display-device-path): New constant.
(battery--upower-subscribe): Use it.
(battery-upower-subscribe-properties): New variable.
(battery--upower-props-changed): Use it for more flexibility over
which DisplayDevice properties to react to.
(battery--upower-signal-handler): Call battery-update-handler
directly when there is no battery-update-timer.
2026-02-12 19:15:39 +01:00
Morgan Smith
0a1238ad28 battery.el: Update on "DisplayDevice" state change
* lisp/battery.el (battery--upower-props-changed): Check if the
"State" has changed.
(battery--upower-subscribe): Subscribe to state changes of the
"DisplayDevice" (bug#80229).
2026-02-12 19:15:39 +01:00
Helmut Eller
eece2377dd * src/lisp.h (struct Lisp_Fwd): Add comments. 2026-02-12 18:51:51 +01:00
Helmut Eller
737ad9080b Add tests for per-buffer variables with predicates
* test/src/data-tests.el (data-tests-per-buffer-var-predicates): New.
2026-02-12 18:51:51 +01:00
Helmut Eller
40f696757c Move the Lisp_Fwd.bufoffset field back to the union
* src/lisp.h (struct Lisp_Fwd): With the predicate enum, we can now pack
the offset and the predicate into a one-word struct.
(XBUFFER_OFFSET): Use the new field name.
* src/buffer.c (DEFVAR_PER_BUFFER): Create the one-word struct.
* src/data.c (store_symval_forwarding): Use the new field name.
2026-02-12 18:51:51 +01:00
Helmut Eller
9008e6a9d7 Introduce an enum Lisp_Fwd_Predicate
Using an enum instead of a symbol makes it obvious that this field is
of no concern to the GC.

* src/lisp.h (enum Lisp_Fwd_Predicate): New.
(struct Lisp_Fwd): Use it instead of a symbol.
* src/buffer.c (DEFVAR_PER_BUFFER): Create the necessary enum constant
instead of a symbol.
* src/data.c (check_fwd_predicate, check_choice): New helpers.
(store_symval_forwarding): Use it.
2026-02-12 18:51:51 +01:00
Helmut Eller
3442fdd2a2 Remove struct Lisp_Buffer_Objfwd
* src/lisp.h (struct Lisp_Buffer_Objfwd): Deleted.
(struct Lisp_Fwd): Add the fields bufoffset and bufpredicate.
Make the type a 1-byte bitfield so that the entire struct still
fits in two words.
(XBUFFER_OFFSET): Renamed from XBUFFER_OBJFWD.
* src/buffer.c (DEFVAR_PER_BUFFER, defvar_per_buffer)
(buffer_local_value): Update accordingly.
* src/data.c (do_symval_forwarding, store_symval_forwarding)
(set_internal, default_value, set_default_internal)
(Fmake_local_variable, Fkill_local_variable, Flocal_variable_): Use
XBUFFER_OFFSET.
2026-02-12 18:51:51 +01:00
Helmut Eller
163dd21e73 Remove struct Lisp_Kboard_Objfwd
* src/lisp.h (struct Lisp_Kboard_Objfwd): Deleted ...
(struct Lisp_Fwd): ... replaced with field kbdoffset.
(DEFVAR_KBOARD): Use new field.
* src/data.c (XKBOARD_OFFSET): Renamed from XKBOARD_OBJFWD.
(do_symval_forwarding, store_symval_forwarding
(set_default_internal): Use it .
2026-02-12 18:51:51 +01:00
Helmut Eller
d109bcf86e Remove struct Lisp_Objfwd
* src/lisp.h (struct Lisp_Objfwd): Deleted.
(struct Lisp_Fwd): Replace it with objvar field.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_LISP_NOPROX): Use the field.
* src/lread.c (defvar_lisp): Updated as needed.
* src/pdumper.c (dump_field_fwd): Use the field.
* src/data.c (XOBJVAR): Renamed and updated from XOBJFWD.
(do_symval_forwarding, store_symval_forwarding): Use it.
2026-02-12 18:51:51 +01:00
Helmut Eller
9d9189f74c Remove struct Lisp_Boolfwd
* src/lisp.h (struct Lisp Boolfwd): Deleted
(struct Lisp_Fwd): Replaced it with a boolvar field.
(DEFVAR_BOOL): Update.
* src/data.c (XBOOLVAR): Renamed from XBOOLFWD.
(do_symval_forwarding, store_symval_forwarding): Use it.
* src/pdumper.c (dump_field_fwd): Use boolvar field.
2026-02-12 18:51:51 +01:00
Helmut Eller
6d9ba8e7bf Remove struct Lisp_Intfwd
It was a struct with a single field.

* src/lisp.h (struct Lisp_Intfwd): Deleted.
(struct Lisp_Fwd): Add an intvar field instead.
(DEFVAR_INT): Update accordingly.
* src/data.c (XINTVAR): Updated and renamed from XFIXNUMFWD.
(do_symval_forwarding, store_symval_forwarding): Use it.
2026-02-12 18:51:51 +01:00
Helmut Eller
10befec978 Introduce a struct Lisp_Fwd
This contains the type and an union of Lisp_Objfwd, Lisp_Intfwd etc.
lispfwd is now a pointer to a struct Lisp_Fwd; the void *fwdptr field is
gone.

* src/lisp.h (struct Lisp_Fwd): New.
(Lisp_Intfwd, Lisp_Boolfwd, Lisp_Objfwd, Lisp_Buffer_Objfwd)
(Lisp_Kboard_Objfwd): The type is in in Lisp_Fwd.
(lispwfd): Is now a pointer to struct Lisp_Fwd.
(SYMBOL_BLV, SET_SYMBOL_FWD, XFWDTYPE, BUFFER_OBJFWDP): Update
accordingly.
(defvar_lisp, defvar_lisp_nopro, defvar_bool, defvar_int)
(defvar_kboard): These all take now a Lisp_Fwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Update for new types.
* src/lread.c (defvar_int, defvar_bool, defvar_lisp_nopro)
(defvar_lisp, defvar_kboard): Update for new types.
* src/pdumper.c (dump_field_fwd, dump_blv): Update accordingly.
(dump_fwd_int, dump_fwd_bool, dump_fwd_obj, dump_fwd_buffer_obj)
(dump_fwd): Deleted.
* src/buffer.c (DEFVAR_PER_BUFFER, defvar_per_buffer, buffer_local_value)
(set_buffer_internal_1): Update accordingly for new types.
* src/data.c (XBOOLFWD, XKBOARD_OBJFWD, XFIXNUMFWD, XOBJFWD, boundp)
(store_symval_forwarding, swap_in_global_binding)
(swap_in_symval_forwarding, find_symbol_value, set_internal)
(default_value, set_default_internal, make_blv, Fmake_local_variable):
Update accordingly.
2026-02-12 18:51:50 +01:00
Helmut Eller
ba9a765081 Make Lisp_Buffer_Objfwd objects const
The predicate field is always a builtin symbol.  That means we know the
bit pattern at compile-time and they don't change at runtime.

* src/buffer.c (DEFVAR_PER_BUFFER): Create a const struct.
(defvar_per_buffer): Remove predicate and address arguments.
(syms_of_buffer): Instead of &BVAR (current_buffer, foo) use a plain foo
as argument to DEFVAR_PER_BUFFER.

* src/pdumper.c (dump_field_fwd): No more relocs needed for
Lisp_Fwd_Buffer_Obj and we can't apply them in the .rodata section.
2026-02-12 18:51:50 +01:00
Helmut Eller
df48f7efc6 Don't dump lispfwd objects
The forwarding structs already exist in the data or bss section.
They are all created with DEFVAR_INT and similar macros.  Instead
of creating new structs in the dump, create relocs to the data section.

* src/pdumper.c (dump_field_fwd): New.
(dump_blv, dump_symbol): Use it.
(dump_pre_dump_symbol): Don't dump fwd objects.
2026-02-12 18:51:50 +01:00
Stephen Berman
f8a25d00ae Make 'overlays_in' use only real EOB (bug#80242)
This restores the original behavior of 'overlays_in'.  Changes in
this behavior had been made for cases of narrowing, but this
resulted in a regression with uses of 'remove-overlays'.

* src/buffer.c (overlays_in): Change all occurrences of ZV to Z.

* test/src/buffer-tests.el (test-overlays-in-2)
(test-remove-overlays): Adjust expected results to accommodate
changes in 'overlays_in'.
2026-02-12 18:48:20 +01:00
Philip Kaludercic
1b02bf1214
Ensure package contents for package suggestions
* lisp/emacs-lisp/package.el (package--autosugest-prompt): Query
archives if the package being described is not listed in
package-archive-contents'.
2026-02-12 18:24:47 +01:00
Philip Kaludercic
02af0e93a0
; Reset :initialize for 'package-autosuggest-mode'
* lisp/emacs-lisp/package-activate.el (package-autosuggest-mode):
We don't need a special initializer for the minor mode, if we
are not enabling the option OOTB.
2026-02-12 18:20:15 +01:00
Philip Kaludercic
92f1d0b5d5
Simplify mode-line prompt for package suggestions
* lisp/emacs-lisp/package-activate.el (package--autosugest-line-format):
Just indicate that packages can be installed, don't mention which.
2026-02-12 18:19:32 +01:00
Stéphane Marks
adf6c7bcbe Move ns_init_colors from ns_term_init to emacs.c (bug#80377)
Accommodate NS Emacs on a headless system.

Add error checking for failed calls to NSColorList writeToURL
and writeToFile.

* src/nsterm.m (ns_term_init): Move color initialization to
nsfns.m.
* src/nsfns.m (ns_init_colors): New function.
(Fns_list_colors): Call ns_init_colors.
2026-02-12 16:55:27 +00:00
Stefan Monnier
c091ff00ec lisp/calendar/diary-icalendar.el (di:summary-regexp): Fix :type 2026-02-12 08:47:09 -05:00
Eli Zaretskii
4b12fb42fc Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2026-02-12 13:54:47 +02:00
Arto Jantunen
773c74ad7c Avoid errors in shr.el due to fractional colspan attribute
Apparently some people believe that a colspan can be fractional, and
produce HTML with such.  Make it possible for SHR to render such HTML
by truncating colspan.
* lisp/net/shr.el (shr-make-table-1): Ensure 'colspan' is a fixnum.
(Bug#80354)
2026-02-12 13:50:06 +02:00
Mattias Engdegård
beb9c26d4c ; Simplify 'prog1' optimiser
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Drop unnecessary condition.  Noticed by Pip Cet.
2026-02-12 12:29:05 +01:00
Eli Zaretskii
b12a068352 Add a character to IPA input method
* lisp/leim/quail/ipa.el ("ipa"): Add ɜ.  Suggested by Coque Couto
<coque.couto@gmail.com>.  (Bug#80364)
2026-02-12 13:23:24 +02:00
Rahul Martim Juliato
396299b3c9 Fix parsing of Title field in Newsticker List buffer
* lisp/net/newst-backend.el (newsticker--parse-text-container):
Only "xhtml" type contains inline XML nodes that need to be run
through 'newsticker--unxml' to serialize back to a string.
(Bug#80317)
2026-02-12 13:15:10 +02:00
समीर सिंह Sameer Singh
970bef602e Improve composition rules for Devanagari script
* lisp/language/indian.el (devanagari-composable-pattern): Account
for contextual positioning of punctuation signs when preceded by
a character.  (Bug#80368)

Improve the Devanagari composition rules to account for contextual
positioning of punctuation signs when preceded by a character.
2026-02-12 12:45:26 +02:00
Martin Rudalics
0ff45e9ca6 Scale position values in xg_frame_set_size_and_position
* src/gtkutil.c (xg_frame_set_size_and_position): Scale
position values.
2026-02-12 09:43:04 +01:00
Dmitry Gutov
cf83dad395 Revise the paragraph about project-vc's caching
* doc/emacs/maintaining.texi (VC-Aware Project Backend):
Rephrase and mention a way to force invalitation (bug#78545).
2026-02-12 05:15:48 +02:00
Richard Lawrence
0f0a632028 * doc/emacs/calendar.texi (Diary iCalendar Import): Doc fix. 2026-02-11 16:04:32 -05:00
Stefan Monnier
451d5c6f05 (describe-mode): Fix bug#80170
* lisp/help-fns.el (describe-mode--minor-modes): Add argument `buffer`.
(describe-mode): Use it to fix call to `documentation` so the
docstrings are computed in the right buffer and thus show
correctly when bindings are shadowed by minor modes.
2026-02-11 15:53:09 -05:00
Morgan Willcock
a1e32130de Fix typo in smie-rules-function documentation
Fix a typo in the documentation for the expected arguments when
calling smie-rules-function to set the indentation offset of
function arguments.

* doc/lispref/modes.texi (SMIE Indentation):
* lisp/emacs-lisp/smie.el (smie-rules-function): Fix typo in
documentation for smie-rules-function arguments.
2026-02-11 15:35:29 -05:00
Stefan Monnier
bc9a53616a make-mode.el: Avoid obsolete font-lock-*-face` variables
* lisp/progmodes/make-mode.el (makefile-make-font-lock-keywords)
(makefile-makepp-font-lock-keywords): Use `font-lock-*-face`
faces rather than variables.
2026-02-11 15:35:03 -05:00
Philip Kaludercic
0afb026a99
Generalize 'scrape-elpa--safe-evil'
* admin/scrape-elpa.el (scrape-elpa--safe-eval): Extend support
from just 'cons' and 'concat' to any side-effect-free function.
2026-02-11 20:47:26 +01:00
Philip Kaludercic
5bc7185afa
Disable 'package-autosuggest-mode' by default
* lisp/emacs-lisp/package-activate.el (package-autosuggest-mode):
Do not set the :init-value when declaring the minor mode.
2026-02-11 20:44:20 +01:00
Mattias Engdegård
badef58d0a Better 'prog1' optimisation
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Always evaporate 'prog1' when the tail is effect-free, even
when the value expression isn't.
2026-02-11 18:47:20 +01:00
Sean Whitton
2e7a066d56 icomplete-ret: Ignore icomplete-show-matches-on-no-input
* lisp/icomplete.el (icomplete-ret): No longer conditionalize on
icomplete-show-matches-on-no-input.
Suggested by Juri Linkov <juri@linkov.net> in bug#62108.
(icomplete-show-matches-on-no-input, icomplete-ret):
* etc/NEWS: Improve documentation.
2026-02-11 15:04:18 +00:00
Sean Whitton
90fbadb3b1 cond*: bind-and* is not always a non-exit clause!
* lisp/emacs-lisp/cond-star.el (cond*-non-exit-clause-p)
(cond*-non-exit-clause-substance): Don't consider a bind-and*
clause without ':non-exit' to be a non-exit clause (bug#80376).
(cond*):
* doc/lispref/control.texi (cond* Macro): Fix docs accordingly.
2026-02-11 14:23:38 +00:00
Stéphane Marks
6967a8ac54 ; system-sleep texi markup fix (bug#80348)
* doc/lispref/os.texi (System Sleep): Minor markup fixes.
2026-02-11 14:32:02 +01:00
Michael Albinus
17fb8a45f7 ; * test/lisp/net/dbus-tests.el: Remove obsolete function declarations. 2026-02-11 14:17:30 +01:00