Commit graph

100008 commits

Author SHA1 Message Date
Basil L. Contovounesios
fac42338bb Make member-if compiler-macro hygienic
* lisp/subr.el (member-if): Use uninterned symbol in
compiler-macro (bug#80647).
2026-03-21 13:51:27 +01:00
Stéphane Marks
48d65afa32 vtable truncate-string-pixelwise, ellipsis can be a string (bug#80026)
Eliminate 'vtable--limit-string' in favor of the more efficient
'truncate-string-pixelwise'.  Remove extraneous pre-measurement
calls to 'string-pixel-width' and ellipsis concatenation as
'truncate-string-pixelwise' does both.
The 'make-vtable' 'ellipsis' keyword can be a string to override
the default returned by 'truncate-string-ellipsis'.

* lisp/emacs-lisp/vtable.el (vtable--ellipsis): New defun.
(vtable-insert-object, vtable--insert): Use 'vtable--ellipsis'.
(vtable--insert-line, vtable--insert-header-line): Call
'truncate-string-pixelwise' instead of 'vtable--limit-string'.
(vtable--limit-string): Remove function.

* test/lisp/emacs-lisp/vtable-tests.el
(test-vtable--limit-string-with-face-remapped-buffer): Remove
test, obsoleted by misc-test-truncate-string-pixelwise.

* doc/misc/vtable.texi: Document that :ellipsis can be a string.
2026-03-21 12:50:04 +02:00
Jeff Valk
eca93f40d1 Ensure correct expansion in 'find-sibling-file-search'
* lisp/files.el (find-sibling-file-search): Following expansion
of each EXPANSION, advance the search start position to reflect
the actual length of the expanded text (the updated string), not
the length of the "\\([&0-9]+\\)" (the string before expansion).
(Bug#80636)

Copyright-paperwork-exempt: yes
2026-03-21 12:31:21 +02:00
Tassilo Horn
8ae0877416 Fix wrong-type-argument error in package-upgrade
* lisp/emacs-lisp/package.el (package-upgrade): Fix wrong-type-argument
error when upgrading a builtin package (bug#80633).
2026-03-21 07:15:35 +01:00
Stefan Monnier
f986e5a897 cursor-sensor.el: Partial fix for bug#80255
This provides limited support for window-specific overlay properties.
To complete it, we still need to add support for it to
`next/previous-single-char-property-change`.

* lisp/emacs-lisp/cursor-sensor.el (cursor-sensor--intangible-p):
Add `window` argument.
(cursor-sensor-tangible-pos, cursor-sensor--detect):
Pass `window` argument to the functions
looking for overlay properties.
2026-03-20 23:18:29 -04:00
Stefan Monnier
89b40650da diff-mode.el: Don't recompute the position of Git preamble/footer
On some profiles (after disabling syntax and refined
fontification), this was taking >90% of the time to fontify a buffer.

* lisp/vc/diff-mode.el (diff--git-preamble-overlay)
(diff--git-footer-overlay): New variables.
(diff--git-preamble-end, diff--git-footer-start): Use them to cache
the result.
2026-03-20 16:53:42 -04:00
Eshel Yaron
a1a76ba06e
; Simplify 'elisp-fontify-symbol'.
* lisp/progmodes/elisp-mode.el (elisp-fontify-symbol):
Simplify.  See also discussion at bug#80593.
2026-03-20 15:10:50 +01:00
Eshel Yaron
72c262d5d1
; Adapt 'elisp-fontify-symbol' to 'cursor-sensor-mode' changes
* lisp/progmodes/elisp-mode.el (elisp-fontify-symbol): Mark
the 'cursor-sensor-functions' property as 'rear-nonsticky',
to adapt to 'cursor-sensor-mode' taking into account
property stickiness since f4a1c00656.  See also bug#80593.
2026-03-19 17:29:27 +01:00
Ihor Radchenko
e4aa9cfbab New option to enable global-whitespace-mode in special-buffers (bug#79230)
* lisp/whitespace.el (whitespace-global-mode-buffers): New custom
option.
(whitespace-enable-predicate): Use it.
(whitespace-global-modes): Refer to the new option.
2026-03-19 17:51:02 +02:00
Eli Zaretskii
0801652979 ; * lisp/ibuffer.el (ibuffer-fontification-alist): Doc fix (bug#80618). 2026-03-19 17:46:57 +02:00
Elias Gabriel Perez
5c961f4903 hideshow: Fix 'hs-hide-block-behavior' set to 'after-cursor'.
Bug#80455.

* etc/NEWS: Document changed behavior.

* lisp/progmodes/hideshow.el (hs-get-near-block): Remove
'forward-line'.
(hs-hide-block-behavior): Update docstring.

* doc/emacs/programs.texi (Hideshow): Update.

Suggested-by: Dima Kogan <dima@secretsauce.net>
2026-03-19 17:27:57 +02:00
Elías Gabriel Pérez
c911495fb1 hideshow: New minor mode 'hs-indentation-mode'. (Bug#80179)
This minor mode configures hs-minor-mode to use
indentation-based folding.

* lisp/progmodes/hideshow.el (hs-hideable-block-p): New
function.
(hs-indentation-respect-end-block): New option.
(hs-indentation--store-vars): New variable.
(hs-cycle-filter, hs-get-first-block-on-line, hs-get-near-block)
(hs-find-block-beg-fn--default): Adapt code to use
'hs-hideable-block-p'.
(hs-block-positions): Update.
(hs-indentation-mode): New minor mode.

* doc/emacs/programs.texi (Hideshow): Update documentation.

* etc/NEWS: Announce changes

* test/lisp/progmodes/hideshow-tests.el: Add 'require'.
(hideshow-check-indentation-folding): New test.
2026-03-19 17:11:54 +02:00
Eli Zaretskii
1f04208898 ; * lisp/files.el (find-sibling-rules): Doc fix. 2026-03-19 09:54:07 +02:00
Stefan Monnier
7fae444857 lisp/progmodes/elisp-mode.el (elisp--local-macroenv): Add static-if 2026-03-18 09:33:55 -04:00
Michael R. Mauger
6db7ab34a1 Window handling bug fixes.
* lisp/play/zone.el: (zone--build-zone-buffer): select window.
(zone--prepare-frames): Avoid dedicated windows.
2026-03-17 18:32:40 -04:00
Stefan Monnier
dd264fb439 (delete-selection-repeat-replace-region): Partial fix for bug#80216
* lisp/delsel.el (delete-selection-repeat-replace-region): Clarify the
need for `delete-selection-save-to-register`.
2026-03-17 12:40:22 -04:00
Tassilo Horn
fdfe617e73 Further improve blink-matching-paren-highlight-offscreen
* lisp/simple.el (blink-matching-paren-offscreen): Inherit from
show-paren-match face.
(blink-paren-open-paren-line-string): Add blink-matching-paren-offscreen
face properties to opening paren instead of replacing original
fontification.
* lisp/paren.el (show-paren-context-when-offscreen): Mention
blink-matching-paren-highlight-offscreen in docstring.
2026-03-17 06:13:54 +01:00
Philip Kaludercic
4147410852
; Fix handling of string by the use-package keyword :vc
This makes :vc behave more like 'package-vc-install'.

* lisp/use-package/use-package-core.el (use-package-normalize/:vc):
Translate :vc arguments that are just a string into a minimal
package specification containing only a :url field, thus
preventing a type error down the line.
2026-03-16 18:23:37 +01:00
Michael Albinus
1bae55cdbf * lisp/emacs-lisp/shortdoc.el (list): Fix `ensure-proper-list' examples. 2026-03-16 09:17:18 +01:00
Michael Albinus
1aed658f3b Use consistent alias name in tramp-compat.el
* lisp/net/tramp-compat.el (tramp-compat-error-type-p):
Rename from `tramp-error-type-p'.
2026-03-16 09:02:03 +01:00
Stefan Monnier
e9e9c7cf8e lisp/startup.el (command-line): Simplify with error-message-string
Suggested by Basil L. Contovounesios <basil@contovou.net>.
2026-03-15 17:29:41 -04:00
Stefan Monnier
e2004eb56f Merge remote-tracking branch 'origin/scratch/error-API' 2026-03-15 17:17:21 -04:00
Sean Whitton
e770ddb5e8 ; Tweak documentation for ensure-proper-list. 2026-03-15 20:27:41 +00:00
Eshel Yaron
3921af5e5e
; Minor doc improvements for 'let-alist'.
* doc/lispref/lists.texi:
* lisp/emacs-lisp/let-alist.el (let-alist): Improve docs.
Namely, clarify that 'let-alist' does not "see" symbols
introduced by macro-expansion in its body, and that the
generated code looks up symbols in the alist whether or not
they are actually used in runtime.

See also bug#79706 for some relevant discussion.
2026-03-15 13:15:36 +01:00
Eli Zaretskii
edeed3fd88 ; * lisp/bindings.el (mode-line-percent-position): Doc fix (bug#80617). 2026-03-15 12:16:40 +02:00
Philip Kaludercic
55f0f2056c
Add new function 'ensure-proper-list' (bug#80598)
* doc/lispref/lists.texi (Building Lists): Document it.
* etc/NEWS: Mention it.
* lisp/emacs-lisp/shortdoc.el (list): Demonstrate it.
* lisp/subr.el (ensure-proper-list): Add it.
2026-03-15 10:52:01 +01:00
Philip Kaludercic
9b97d84318
Add references to "User Lisp" Info node where applicable
* etc/NEWS: Update 'package-vc-install-from-checkout'
obsoletion notice.
* lisp/emacs-lisp/package-vc.el (package-vc-install-from-checkout):
Update obsoletion declaration.
2026-03-14 16:17:51 +01:00
Philip Kaludercic
18dfb0db0e
Remove references to 'package-vc-install-from-checkout' in docs
* lisp/emacs-lisp/package-vc.el: Remove mention in Commentary section.
(package-vc-checkout): Remove suggestion in docstring.
2026-03-14 16:17:51 +01:00
Eli Zaretskii
cbefea79ab ; Update ldefs-boot.el. 2026-03-14 09:04:32 -04:00
Eli Zaretskii
696a4e03bf Fix backward motion in Info manuals under 'scroll-conservatively'
* lisp/info.el (Info-find-node-2): Don't skip the header or
breadcrumbs line when 'scroll-conservatively' is set to a value
that could leave the beginning of the node outside of the window.
(Bug#80553)
2026-03-14 13:11:11 +02:00
Eli Zaretskii
17aa3a7e13 ; Fix last change
* lisp/textmodes/flyspell.el (flyspell-generic-progmode-verify):
Fix capitalization and whitespace of last change.
2026-03-14 12:46:19 +02:00
Timon Reinold
87d13146b2 Fix auto-correct previous word with 'flyspell-prog-mode'
* lisp/textmodes/flyspell.el (flyspell-generic-progmode-verify):
Take into account the word 'flyspell-auto-correct-previous-word'
moved to (i.e., the word starting at point, not the character
before point), when checking whether it should be checked/corrected
by flyspell-prog-mode.  (Bug#80289)

Copyright-paperwork-exempt: yes
2026-03-14 12:43:35 +02:00
Stefan Monnier
3ed7ac4e66 (smerge--refine-prepare-regions): Reduce number of args and retvals
* lisp/vc/smerge-mode.el (smerge--refine-set-overlay-props):
New function, extracted from `smerge--refine-prepare-regions`.
(smerge--refine-prepare-regions): Take overlays rather than beg/end
arguments and remove all overlay property manipulation.
(smerge-refine-regions): Create the overlays and pass them to those
two functions.
2026-03-14 02:14:13 -04:00
Dmitry Gutov
949f035544 etags-regen: Don't try to generate tags during completion, by default
* etc/NEWS: Describe the change.

* lisp/progmodes/etags-regen.el
(etags-regen-create-on-completion): New option.
(etags-regen-create-on-completion--set): New function.
(etags-regen-mode): Use it.  Discussed in
https://lists.gnu.org/archive/html/emacs-devel/2026-03/msg00405.html
2026-03-14 04:28:32 +02:00
Philip Kaludercic
9dbcb01153
Simplify 'xref-mouse-mode-map'
See https://mail.gnu.org/archive/html/emacs-devel/2026-03/msg00386.html.

* lisp/progmodes/xref.el (xref-mouse-mode-map): Prevent
C-<down-mouse-1> from triggering 'mouse-buffer-menu' and drop
C-<drag-mouse-1> binding.
2026-03-14 00:03:02 +01:00
Helmut Eller
0efb47d474 * lisp/loadup.el: No longer GC after loading each file
With the portable dumper it's no longer needed as discussed in
bug#79021.  Originally this was done for the unexec based dumping (see
bug#4287 and commit 0e328d3779).
2026-03-13 15:35:05 +01:00
Basil L. Contovounesios
a525a7f2af Fix project-recompile directory
* lisp/progmodes/project.el: Remove stale compilation-read-command
declarations.  Autoload recompile for Emacs versions prior to 31, to
allow calling project-recompile before project-compile (bug#74631).
(project-recompile): Set compilation-directory to avoid recompile
using a value unrelated to the current project (bug#68570).
2026-03-13 08:33:01 +01:00
Basil L. Contovounesios
10bac4d9e5 Fix window-height of project-kill-buffers
An alternative to setting window-height and preserve-size is to rely
on display-buffer--maybe-at-bottom's support for
temp-buffer-resize-mode.

* lisp/progmodes/project.el (project-kill-buffers): Set
window-height to a function, not a form/cons (bug#52148).
2026-03-12 14:59:14 +01:00
Julian Scheid
f15ad18a14 Fix 'comp--func-unique-in-cu-p' to match docstring
* lisp/emacs-lisp/comp.el (comp--func-unique-in-cu-p): Check
only the callee name instead of requiring global uniqueness.
* test/src/comp-resources/comp-test-direct-call.el: New file.
* test/src/comp-resources/comp-test-direct-call-dup.el: New file.
* test/src/comp-tests.el (comp-tests-has-direct-call-p)
(comp-tests-direct-call-with-lambdas)
(comp-tests-direct-call-with-duplicate-names): New tests.
2026-03-12 09:08:08 +01:00
Philip Kaludercic
d019b5ec71
Add 'xref-mouse-mode' minor mode
* doc/emacs/maintaining.texi (Looking Up Identifiers): Document
it.
* etc/NEWS (bindings): Mention it.
* etc/themes/newcomers-presets-theme.el (newcomers-presets): Add
it.
* lisp/progmodes/xref.el (xref-mouse-mode-map, xref-mouse-mode)
(global-xref-mouse-mode): Implement it.
2026-03-12 09:01:08 +01:00
Philip Kaludercic
8bf0981452
; Fix bug in 'package-maintainers'
* lisp/emacs-lisp/package.el (package-maintainers): Detect if
:maintainers contains on a single cons-cell, denoting a single
maintainer, in which case we wrap it in a singleton list.
2026-03-12 08:56:45 +01:00
Tassilo Horn
7fba3c23df Don't strip face properties in blink-paren-open-paren-line-string
With bug#59527 we ensured that the open paren line string was fontified
which was broken again with bug#63089 because there, the opening paren
was fontified with a new face.

With this change, the returned string is fontified again.  Only if
`blink-matching-paren-highlight-offscreen' is non-nil, the opening paren
is unfontified and then fontified again with the
`blink-matching-paren-offscreen' face.

* lisp/simple.el (blink-paren-open-paren-line-string): Keep returned
line string fontified with slight exception if
`blink-matching-paren-highlight-offscreen' is non-nil.
2026-03-12 08:50:33 +01:00
Philip Kaludercic
1882138975
Add ecomplete support for more header types
* lisp/gnus/message.el (message-put-addresses-in-ecomplete):
Handle "BCC" and "X-Debbugs-CC" headers.
2026-03-11 22:32:12 +01:00
Philip Kaludercic
7c22a7d312
Do not initialize Info during package activation
* lisp/emacs-lisp/package-activate.el (package--add-info-node):
Use 'Info-default-directory-list' if Info has not been
initialized, otherwise fall back to 'Info-directory-list'
without calling 'info-initialize' beforehand, since the function
initializes 'Info-directory-list'.  (Bug#80495)
2026-03-11 22:12:55 +01:00
Stefan Monnier
dc4f7e6809 (elisp--shorthand-aware-(f)boundp): Don't allocate
* lisp/progmodes/elisp-mode.el (elisp--read-symbol-shorthands):
New function, extracted from `elisp--completion-local-symbols`.
Remember the longhand symbol in `elisp--longhand` property.
(elisp--completion-local-symbols): Use it.
(elisp--shorthand-aware-fboundp, elisp--shorthand-aware-boundp):
Use the new `elisp--longhand` property.
2026-03-11 16:54:00 -04:00
Basil L. Contovounesios
8d356c55ad Tweak recent error descriptor changes
* etc/NEWS: Fix capitalization and markup.
* lisp/emacs-lisp/ert.el (ert--should-error-handle-error): Prefer
any over cl-some where either will do.
* lisp/epa-file.el (epa-file--find-file-not-found-function):
Reindent.
(epa-file--error-add-context): Use correct variables.  Add
docstring.
* lisp/ffap.el (ffap-machine-p):
* lisp/gnus/nnmaildir.el (nnmaildir--emlink-p): Prefer
string-equal-ignore-case over case fiddling.
* lisp/gnus/gnus-search.el (gnus-search-run-query): Fix typo in
error re-signaling.
* lisp/ibuffer.el (ibuffer-confirm-operation-on): Prefer string
search over regexp matching where either will do.
* test/lisp/vc/vc-tests/vc-tests.el
(vc-test--run-maybe-unsupported-function): Pacify unused
condition-case error variable warnings (bug#72212).
2026-03-11 16:05:04 -04:00
Stefan Monnier
771ab21367 lisp/vc/smerge-mode.el (smerge--refine-apply-diff): Typo 2026-03-11 12:16:10 -04:00
Andrea Corallo
40f4fc1d8c Fix negated equality assumptions (bug#80327)
* lisp/emacs-lisp/comp.el (comp--add-cond-cstrs): Skip
negated equality assumptions only for relational non-immediate
operands. Keep immediate false-branch constraints.
* test/src/comp-resources/comp-test-funcs.el
(comp-test-80327-hash, comp-test-80327-f): Add reproducer.
* test/src/comp-tests.el (comp-tests-bug-80327): Add regression
test.
2026-03-11 17:09:57 +01:00
Stefan Monnier
adafe4f72b lisp/subr.el (run-hook-query-error-with-timeout): Avoid %s for lists 2026-03-11 11:09:12 -04:00
Basil L. Contovounesios
dfd460879b ; Fix quit-window-kill-buffer condition. 2026-03-11 15:53:39 +01:00