Commit graph

99770 commits

Author SHA1 Message Date
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
Philip Kaludercic
d734b240fb
Do not upgrade VC packages using 'package-upgrade'
* lisp/emacs-lisp/package.el (package-upgrade): Trigger error
redirecting user to use 'package-vc-upgrade'.
(package--upgradeable-packages): Exclude VC packages from list
of "upgradable" packages.
2026-02-14 16:29:32 +01:00
Sean Whitton
768c68942e Fix vc-pull from buffers visiting untracked files
* lisp/vc/vc.el (vc-pull): Don't fail when called from buffers
visiting unregistered or ignored files so long as there is a
'pull' function available from the backend.
2026-02-14 15:29:07 +00:00
Sean Whitton
bc763572a9 vc-find-backend-function: Require vc for default implementations
* lisp/vc/vc-hooks.el (vc-find-backend-function): Require vc for
default implementations (bug#80254).  Report and fix due to
Daniel Mendler <mail@daniel-mendler.de>.
2026-02-14 15:03:52 +00:00
Sean Whitton
805d76790d ; vc-user-edit-command-history: Expand docstring. 2026-02-14 14:47:09 +00:00
Eli Zaretskii
5be60a2003 ; Update ldefs-boot.el. 2026-02-14 09:17:15 -05:00
Stéphane Marks
003962fa5f vtable fixes for tty rendering (bug#80312)
* lisp/emacs-lisp/vtable.el (vtable--insert-line): Do not
produce a divider after the final column.  This thinko is more
noticeable on a tty.
(vtable--insert-header-line): On a tty, nullify indicator
padding.
(vtable-tty-char-pixel-width): New defconst.
(vtable--compute-width): On a tty, adjust column width specified
in pixels down by a factor of 'vtable-tty-char-pixel-width'.
(vtable--alter-column-width): On a tty, adjust column width in
characters, otherwise in pixels.
2026-02-14 15:22:16 +02:00
Sean Whitton
16f1ca1acc Improve vc-git-topic-outgoing-base fallback algorithm
* lisp/vc/vc-hg.el (vc-hg--bookmarks): New function.
(vc-hg-trunk-or-topic-p):
* lisp/vc/vc-git.el (vc-git--branch-remotes)
(vc-git-trunk-or-topic-p): New optional BRANCH argument.
(vc-trunk-or-topic-p): Declare.
(vc-git-topic-outgoing-base): Consider only local trunks, if
there are any (bug#80006).
* lisp/vc/vc.el (trunk-or-topic-p): New optional BRANCH
argument.
(vc-trunk-or-topic-p): New function.
(vc--outgoing-base): Call it.
2026-02-14 13:20:08 +00:00
Visuwesh
cf27004e8c Escape attribute values and string DOMs when inserting them
* lisp/net/shr.el (shr-dom-print): Escape these strings, as done
in `dom-print', to prevent producing an erroneous XML document.
* test/lisp/net/shr-tests.el (dom-print-escape): Add new test
(Bug#80383).
2026-02-14 15:04:31 +02:00
Eli Zaretskii
114fab51c0 Fix 'eglot-imenu'
* lisp/progmodes/eglot.el (eglot--imenu-SymbolInformation): Fix
call to 'plist-get'.  Patch by Lester Longley <lester@ieee.org>.
(Bug#80367)

Copyright-paperwork-exempt: yes
2026-02-14 14:22:08 +02:00
Eli Zaretskii
6a1a544a90 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2026-02-14 13:59:53 +02:00
Eli Zaretskii
a444f2c7f9 ; Fix last change
* lisp/textmodes/page-ext.el (pages-directory-list-all-headers-p)
(pages-directory-count-lines-p): Doc fixes.
2026-02-14 13:59:26 +02:00
Marco Wahl
8aa8ab8b03 Add revert capability for page directory buffer
* lisp/textmodes/page-ext.el (pages-directory-revert-function): New
function.
(pages-directory-list-all-headers-p, pages-directory-count-lines-p)
(pages-directory-regexp): New variables to store the page directory
style.  (Bug#80319)
2026-02-14 13:56:26 +02:00
Eshel Yaron
27070b0c47
; completion-preview.el: Refine recent addition.
* lisp/completion-preview.el
(completion-preview-inhibit-functions): Reposition, add
:version tag.
2026-02-14 12:47:07 +01:00
Eshel Yaron
048e9553a8
; Add t as a possible value for 'completion-preview-commands'
* lisp/completion-preview.el (completion-preview-commands):
Allow the value t, which says that completion preview should
be attempted after any command.
* lisp/completion-preview.el
(completion-preview-require-certain-commands): Adapt.
2026-02-14 12:33:29 +01:00
Eshel Yaron
47b48346a3
New option 'completion-preview-inhibit-functions' (bug#80370)
* lisp/completion-preview.el
(completion-preview-inhibit-functions): New option.
(completion-preview--post-command): Respect it.
* etc/NEWS: Announce it.
2026-02-14 12:33:28 +01:00
Eli Zaretskii
25d0259a29 ; * lisp/speedbar.el (speedbar-get-focus): Doc fix. 2026-02-14 12:56:22 +02:00
Matthias Meulien
a93f4f3d93 Support 'speedbar-prefer-window' in 'speedbar-get-focus'
* lisp/speedbar.el (speedbar-get-focus)
(speedbar-frame-or-window): Support for 'speedbar-prefer-window'
with fix of 'speedbar-window' trying to delete current frame.
(Bug#80392)
2026-02-14 12:52:07 +02:00
Eli Zaretskii
187867f0a9 ; 'package--autosuggest-after-change-mode': Improve help-echo. 2026-02-14 08:52:00 +02:00
Stefan Monnier
9fe325c935 ede/proj-shared.el: Remove leftover obsolete EIEIO name arguments
* lisp/cedet/ede/proj-shared.el (ede-gcc-shared-compiler)
(ede-gcc-libtool-shared-compiler, ede-cc-linker-libtool)
(ede-g++-shared-compiler, ede-g++-libtool-shared-compiler)
(ede-g++-linker-libtool): Remove obsolete name argument to `clone`.
2026-02-13 23:48:32 -05:00
Dmitry Gutov
a937396e76 vc-log-show-limit: Change default to 500, and the button to 4X
* lisp/vc/vc.el (vc-log-show-limit):
Change the default to 500 (bug#80037).
(vc-print-log-setup-buttons): Have the first button prompt and
propose 4X the current limit as the default.
(vc-print-fileset-branch-log):
Update the reference to the changed button text.

* lisp/vc/log-view.el (log-view-end-of-defun-1): Same.

* doc/emacs/maintaining.texi (VC Change Log): Also here.
2026-02-14 02:52:52 +02:00
João Távora
aa181cd352 Rewrite flex completion with Gotoh algorithm
The greedy regexp matching, broken scoring and broken highlight were
sources of frequent complaints about the 'flex' matching style.  This
commit fixes that.

Inspired by the 'hotfuzz' style (available at
https://github.com/axelf4/hotfuzz) it uses a modified version of Gotoh's
1982 dynamic programming algorithm. It is strictly more correct than the
"old" flex.  For example, when matching the pattern 'goto' to no longer
will 'eglot-format' be sorted before some hypothetical much better
'goobarbaz-goto'.  And of course the highlighting is also correctly
placed on the 'goto', not scattered across the candidate.

Regarding performance, it is faster than the naive 'flex', primarily
because of the Elisp rewrite in minibuffer.el.  The matching and costing
algorithm matters but is not the bottleneck.

The Elisp parts of the style were almost completely decoupled from the
pcm/substring styles in lisp/minibuffer.el.  Only
'completion-flex-try-completion' uses some of pcm's code for pattern
augmentation.

* src/minibuf.c (completion--flex-cost-gotoh): New function.

* lisp/minibuffer.el (completion-flex--pattern-str): New variable.
(flex-score-match-tightness): Make obsolete.
(completion--flex-all-completions-1): New helper function.
(completion-flex-try-completion, completion-flex-all-completions): Rewrite.
(completion-substring--all-completions): No longer take transform-pattern-fn.
(completion--flex-adjust-metadata): Tweak.
(completion--flex-score, completion--flex-score-1)
(completion--flex-score-last-md, completion-flex--make-flex-pattern): Delete.

* test/lisp/minibuffer-tests.el (completion--sorted-flex-completions):
New helper function.
(completion-flex-test-non-ascii): New test.
(completion--pcm-score): Delete.
(completion-pcm-test-3, completion-pcm-test-4)
(completion-substring-test-1, completion-substring-test-2)
(completion-flex-test-2, completion-flex-test-3): Tweak.

* etc/NEWS: Describe change.
2026-02-13 23:46:11 +00:00
Philip Kaludercic
52b24ed7aa
Only check regular files for package metadata
* lisp/emacs-lisp/package.el (package-dir-info): Do not check
files that do not satisfy 'file-regular-p' when trying to find
the file with the package metadata.  (Bug#79742)
2026-02-13 22:47:59 +01:00
Philip Kaludercic
567155047c
Improve 'package-upgrade-all' robustness
* lisp/emacs-lisp/package.el (package-upgrade-all): Do not quit
because a single upgrade fails with an error.  (Bug#80357)
2026-02-13 22:23:01 +01:00
Philip Kaludercic
d092c8f63a
Fix 'help-echo' for package suggestions in mode line
* lisp/emacs-lisp/package-activate.el (package--autosugest-line-format):
Remove variable and function.
(package--autosuggest-after-change-mode): Inject upgrade prompt
using ':propertize'.  We can drop the condition testing if there
are any suggestions, as installing the package changes the major
mode and thus also 'mode-name'.
2026-02-13 22:01:35 +01:00
Philip Kaludercic
7470151179
Autoload 'diff-no-select'
* lisp/emacs-lisp/package.el (package-review): Remove
unnecessary 'require'.
* lisp/eshell/em-unix.el: Remove declaration.
* lisp/files.el (save-some-buffers-action-alist): Remove
unnecessary 'require'.
* lisp/vc/diff.el (diff-no-select): Autoload it.

(Bug#80288)
2026-02-13 19:53:12 +01:00
Sean Whitton
85dc3d882d ; vc-git-topic-outgoing-base: Preparatory refactoring.
No intentional functional change.
2026-02-13 13:37:22 +00:00
Sean Whitton
da16b48d8f * lisp/emacs-lisp/cond-star.el (cond*): New Edebug specification. 2026-02-13 13:36:50 +00:00
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
Philip Kaludercic
1e6d4f827c
Merge branch 'feature/package-autosuggest' 2026-02-12 23:08:42 +01: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
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
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
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