Commit graph

181274 commits

Author SHA1 Message Date
Dmitry Gutov
b37711a25f Some manual updates for the recent change
* doc/emacs/maintaining.texi (Looking Up Identifiers):
Mention that 'M-.' can signal an error.
(Xref): Recommend using 'etags-regen-mode' (bug#43086).

* etc/NEWS: Add updated marks.
2026-02-07 00:01:56 +02:00
Philip Kaludercic
bc413b3507
Use 'buffer-file-name' when matching 'auto-mode-alist'
* lisp/emacs-lisp/package-activate.el (package--suggestion-applies-p):
The file name associated with a buffer is a better match for
entries in 'auto-mode-alist', so we use that instead of the
buffer name that can have additional noise to make the name unique.
2026-02-06 22:50:49 +01:00
Philip Kaludercic
6314c08c6b
Link to "Major Mode" node in manual when suggesting packges
* lisp/emacs-lisp/package.el (package--autosugest-prompt): Add
another button.
2026-02-06 22:37:06 +01:00
Philip Kaludercic
f561eed4d6
Add separate user option to prevent repetitive package suggestions
* lisp/emacs-lisp/package-activate.el
(package-autosuggest-style): Remove option 'once' and defer to
new user option.
(package-autosuggest-once): Add new option.
(package--suggestion-applies-p)
(package--autosuggest-after-change-mode): Respect new user option.
2026-02-06 22:31:30 +01:00
Philip Kaludercic
5808909d1e
; Properly initialize 'package-autosuggest-mode'
* lisp/emacs-lisp/package-activate.el (package-autosuggest-mode):
Add :initialize property to minor mode definition as recommended
in (elisp) Variable Definitions.
2026-02-06 22:24:09 +01:00
Philip Kaludercic
f64430fbad
; Fix typo
* lisp/emacs-lisp/package-activate.el (package--autosugest-line-format):
Use actually existing face symbol.
2026-02-06 22:15:49 +01:00
Philip Kaludercic
4a1e4a6edc
; * lisp/emacs-lisp/package-activate.el: Add note on preloading 2026-02-06 22:15:06 +01:00
Philip Kaludercic
ae67318362
Enable 'package-autosuggest-mode' at startup
* lisp/emacs-lisp/package.el (package-autosuggest-style)
(package-autosuggest-mode, package--autosuggest-suggested)
(package--suggestion-applies-p, package--autosuggest-database)
(package--autosuggest-find-candidates)
(package--autosugest-line-format, package-autosuggest-face)
(package--autosuggest-after-change-mode, package-autosuggest):
Remove definitions needed to recognise suggestions from here.

* lisp/emacs-lisp/package-activate.el (package-autosuggest-style)
(package--autosuggest-database, package--autosuggest-suggested)
(package--suggestion-applies-p)
(package--autosuggest-find-candidates)
(package--autosugest-line-format, package-autosuggest)
(package--autosuggest-after-change-mode)
(package-autosuggest-mode): Move definitions from package.el.

(package--activated, package-installed-p, package-get-version)
(package-activate-all, package-activate-all): Remove unnecessary
autoloads.

* lisp/loadup.el: Load "package-activate.el".
2026-02-06 21:15:29 +01:00
Mattias Engdegård
66d307aa08 ; * etc/NEWS (help-setup-xref): slight polish (bug#80276) 2026-02-06 17:11:17 +01:00
Sean Whitton
c6e550c24e Separate input histories for 'C-x v !' and Git pulling & pushing
* lisp/vc/vc-dispatcher.el (vc-user-edit-command-history): Use
this as a dynamically bound variable, not a minibuffer history.
(vc-user-edit-command): Pass its value to read-shell-command.
* lisp/vc/vc-git.el (vc-git--pushpull):
* lisp/vc/vc.el (vc-edit-next-command): Bind it.
(vc-edit-next-command-history): New variable.
* etc/NEWS: Document the change.
2026-02-06 14:06:36 +00:00
Dmitry Gutov
90d3fdaffc Allow using xref-find-references without visiting a tags table
* lisp/progmodes/xref.el (xref-find-backend):
Allow returning nil (bug#43086).
(xref-backend-definitions, xref-backend-apropos):
Signal user-error when no backend is available.  The error text
suggests a few built-in Xref backends.
(xref-backend-identifier-completion-table): Default to nil.
(xref--no-backend-available): New helper function.

* lisp/progmodes/etags.el (etags--xref-backend):
Return nil when no tags table is visited.
2026-02-06 05:56:52 +02:00
João Távora
ec5479f0b5 Eglot: fix thinko in eglot--async-request
Just because a specific request of a specific "hint" is
cancelled doesn't mean we can cancel the other's too.  Also
eglot-advertise-cancellation = nil was subtly broken.

This manifested itself mostly in Eglot semantic tokens.

* lisp/progmodes/eglot.el (eglot--async-request): Fix thinkos.
2026-02-05 22:39:19 +00:00
Mattias Engdegård
4169720313 ; * test/lisp/vc/ediff-mult-tests.el: use ert-with-temp-directory
Suggested by Pip Cet.
2026-02-05 17:36:18 +01:00
Mattias Engdegård
893e0783c9 ; * lisp/subr.el (take-while): bytecode micro-optimisation 2026-02-05 17:36:17 +01:00
Sean Whitton
a06cddec20 ; diff--revert-kill-hunks: Hoist binding inhibit-read-only. 2026-02-05 12:24:05 +00:00
Sean Whitton
3863449a0a ; * lisp/window.el (window--frame-landscape-p): Tweak wording. 2026-02-05 12:18:54 +00:00
Visuwesh
e2f9e6ba7d vc-git--mailinfo: Use file-local-name (bug#80295, bug#80320)
* lisp/vc/vc-git.el (vc-git--mailinfo):
Use file-local-name (bug#80295, bug#80320).
2026-02-05 12:11:53 +00:00
Protesilaos Stavrou
dda572a2fa New minibuffer history for vc-user-edit-command (bug#80169)
* lisp/vc/vc-dispatcher.el (vc-user-edit-command-history): New variable.
(vc-user-edit-command): Use it (bug#80169).
* etc/NEWS: Announce it.
2026-02-05 12:01:43 +00:00
Sean Whitton
10aa35bab7 Bind "u", "@" in diff-mode-read-only-map, not diff-mode-shared-map
* lisp/vc/diff-mode.el (diff-mode-shared-map): Move bindings for
"u" and "@" from here ...
(diff-mode-read-only-map): ... to here.
2026-02-05 11:49:28 +00:00
Sean Whitton
ccee1c0de6 ; Improve outgoing base command docstrings. 2026-02-05 11:46:01 +00:00
Sean Whitton
0dfaa75612 Bind "s" in diff-mode-read-only-map, not diff-mode-shared-map
* lisp/vc/diff-mode.el (diff-mode-shared-map): Move binding for
"s" from here ...
(diff-mode-read-only-map): ... to here (bug#80330).
2026-02-05 11:31:05 +00:00
Eli Zaretskii
8beb69b77c ; Fix cross references in "User Lisp Directory"
* doc/emacs/custom.texi (User Lisp Directory): Fix wording,
punctuation, and cross-references.  (Bug#80321)
2026-02-05 11:28:13 +02:00
Troy Brown
f660a5469c Fix last change in align.el
* lisp/align.el (align-region): Additional fix of last change.
(Bug#80316)

Copyright-paperwork-exempt: yes
2026-02-05 10:56:51 +02:00
John Wiegley
fd6d8faa62 Fix aligning buffer regions containing multiple alignment sections
* lisp/align.el (align-region): Use markers to ensure the regions
stay accurate after overlapping aligning modifications.  (Bug#80316)

* test/lisp/align-tests.el (align-c-multi-section): New test.
2026-02-05 10:51:16 +02:00
Philip Kaludercic
ebe3838011
Merge remote-tracking branch 'origin/master' into feature/package-autosuggest 2026-02-04 17:36:37 +01:00
Philip Kaludercic
0277fd791b
Rephrase package suggestion message
* lisp/emacs-lisp/package.el (package--autosugest-prompt):
Follow Richard's suggestion from
https://mail.gnu.org/archive/html/emacs-devel/2026-02/msg00040.html.
2026-02-04 17:36:32 +01:00
Stefan Monnier
3ea1010a6b * lisp/comint.el (comint-redirect-hook): Defvar (bug#80313) 2026-02-04 11:14:10 -05:00
Stefan Monnier
f38b0872f0 (yaml-ts-mode-yamllint-options): Use a list of strings
It is both simpler to code and marginally more general (allows
spaces in arguments).

* lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode-yamllint-options): Use
a list.
(yaml-ts-mode-flymake): Adjust accordingly.
2026-02-04 11:03:57 -05:00
Stefan Monnier
f73cb8fba2 shortdoc: Don't burp on missing docstrings
* lisp/emacs-lisp/shortdoc.el (shortdoc--display-function): Report
missing docstrings more cleanly than "Wrong type argument: stringp, nil".
2026-02-04 10:59:23 -05:00
Mattias Engdegård
1396b373ff ediff-mult-tests.el: remove temporary directory after test
* test/lisp/vc/ediff-mult-tests.el (ediff-test-bug3348): Clean up.
2026-02-04 14:33:36 +01:00
Mattias Engdegård
6dc2336a4f Make vc-git-tests work with git < 2.46
* test/lisp/vc/vc-git-tests.el (vc-git-test-branch-remotes):
The 'unset' subcommand to 'git config' was introduced in git 2.46; use
the '--unset' option instead.
2026-02-04 13:26:08 +01:00
Philip Kaludercic
4ab81f82bf
Do not compile database into package.el
* lisp/emacs-lisp/package.el (package--autosuggest-database):
Add new variable.
(package--autosuggest-find-candidates): Load the contents of the
database from 'data-directory' if necessary, and store them in
the new variable.
2026-02-03 17:25:57 +01:00
Dmitry Gutov
083f89f858 Fix [More] buttons in tutorial and other buttons in Semantic
* lisp/help-mode.el (help-setup-xref): Update docstring (bug#80276).

* etc/NEWS: Add description for the earlier change in help-setup-xref.

* lisp/tutorial.el (tutorial--describe-nonstandard-key)
(tutorial--detailed-help): Use 'with-help-window', call it after.

* lisp/cedet/semantic/util.el (semantic-describe-buffer): Same.

* lisp/cedet/semantic/decorate/include.el
(semantic-decoration-include-describe)
(semantic-decoration-unknown-include-describe)
(semantic-decoration-fileless-include-describe)
(semantic-decoration-unparsed-include-describe)
(semantic-decoration-all-include-summary): Same.
2026-02-03 05:14:59 +02:00
Stefan Monnier
53bc4a2cb6 isearch.el: Remove autoloads hacks
* lisp/isearch.el (char-fold-to-regexp): Remove redundant autoload.
(emoji--read-emoji): Use `declare-function` rather than autoload.
2026-02-02 17:42:40 -05:00
Eli Zaretskii
16b10d7617 ; Improve indexing in the ELisp manual
* doc/lispref/functions.texi (Function Names):
* doc/lispref/variables.texi (Tips for Defining): Improve
indexing.
2026-02-02 15:24:21 +02:00
Sean Whitton
a269bcb86b diff-mode-shared-map: Bind '@' to diff-revert-and-kill-hunk
* lisp/vc/diff-mode.el (diff-mode-shared-map): Bind '@' to
diff-revert-and-kill-hunk.
2026-02-02 12:57:12 +00:00
Stephen Berman
89bc088a8d ; Fix last change to iroquoian.el
* lisp/leim/quail/iroquoian.el
(iroquoian-haudenosaunee-exception-alist): Delete mistaken
apostrophe in doc string.
2026-02-02 00:27:03 +01:00
Philip Kaludercic
2cde30aa1b
Merge remote-tracking branch 'origin/master' into feature/package-autosuggest 2026-02-01 21:01:40 +01:00
Philip Kaludercic
850382c7d6
Adjust formatting of package suggestion buffer
* lisp/emacs-lisp/package.el (package--autosugest-prompt): Move
'describe-package' link into the parentheses after the "Install
..." button.
2026-02-01 20:58:17 +01:00
Philip Kaludercic
1b8eaed723
; Use right variable name in 'pcase'
* lisp/emacs-lisp/package.el (package--suggestion-applies-p): Do
not refer to the interpreter regexp as "magic".
2026-02-01 19:44:06 +01:00
Philip Kaludercic
0054a5ff0c
Clarify that package suggestions have to be confirmed
* lisp/emacs-lisp/package.el (package--autosugest-prompt):
Adjust message to indicate that no changes have yet occurred.

Co-Developed-By: Jens Schmidt <jschmidt4gnu@vodafonemail.de>
2026-02-01 19:43:26 +01:00
Philip Kaludercic
9b1935dc2e
Explain why package suggestions match
* lisp/emacs-lisp/package.el (package--autosugest-prompt): Go
through all suggestions for the same package and mention why a
package suggestion was relevant.
2026-02-01 19:41:04 +01:00
Mattias Engdegård
8f5badc26b * etc/symbol-releases.eld: 'any' and 'all' added in Emacs 31 2026-02-01 18:20:56 +01:00
Eli Zaretskii
2652e11930 Minor improvements in vertical cusror motion
* src/xdisp.c (move_it_vertically_backward): Zero out cached value
of line height, to avoid using stale and incorrect values.
(try_window_reusing_current_matrix): Fix conditions for changes in
tab-line height.
Reported by Michael Heerdegen <michael_heerdegen@mailbox.org> in
https://lists.gnu.org/archive/html/help-gnu-emacs/2026-01/msg00163.html
This improves the scrolling a little bit, but doesn't solve the
problem entirely.
2026-02-01 17:26:56 +02:00
Philip Kaludercic
24f45c85ea
Enable 'package-autosuggest-mode' by default
* lisp/emacs-lisp/package.el (package-autosuggest-mode): Set
:init-value.
2026-02-01 16:14:24 +01:00
Philip Kaludercic
a234b90048
; Close package suggestion window after installing package
* lisp/emacs-lisp/package.el (package--autosuggest-after-change-mode):
Call 'quit-window' after installing package.
2026-02-01 16:13:31 +01:00
Richard Lawrence
4db3be2001 Fix iCalendar macro (debug ...) forms and indentation
As discussed in Bug#74994.

* lisp/calendar/icalendar-ast.el (icalendar-make-param)
(icalendar-make-property, icalendar-make-component)
(icalendar-make-node-from-templates)
* lisp/calendar/icalendar-macs.el (icalendar-with-node-children)
(icalendar-with-node-value, icalendar-with-param)
(icalendar-with-child-of, icalendar-with-property-of): Remove extraneous
arguments in (debug ...) forms.
* lisp/calendar/icalendar-recur.el
* lisp/calendar/diary-icalendar.el: Fix indentation of calls to them.

Plus one other minor fix:

* lisp/calendar/diary-icalendar.el
(diary-icalendar-current-tz-to-vtimezone): Ignore unused error
variable (fixes a byte compiler warning).
2026-02-01 09:46:09 -05:00
Philip Kaludercic
b6b599aa83
Add more elaborate prompt when suggesting packages
* lisp/emacs-lisp/package.el (package--autosugest-prompt): Add
new function.
(package--autosuggest-after-change-mode, package-autosuggest):
Call new function.
2026-02-01 15:14:10 +01:00
Philip Kaludercic
ad89a3e8d6
Display hint for package suggestions after mode name
* lisp/emacs-lisp/package.el (package--autosugest-line-format):
Insert a space before the mode-line hint.
(package--autosuggest-after-change-mode): Add hint to 'mode-name'.
2026-02-01 14:20:01 +01:00
Philip Kaludercic
d13769955e
Inline database of package suggestions
* lisp/emacs-lisp/package.el (package--autosuggest-database):
Remove unnecessary variable.
(package--autosuggest-find-candidates): Load the database at
compile time.
(package--autosuggest-suggested, package--suggestion-applies-p)
(package--autosuggest-install-and-enable): Update documentation.
2026-02-01 14:14:17 +01:00