1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-05 22:20:24 -08:00
Commit graph

180368 commits

Author SHA1 Message Date
Sean Whitton
022facd986 * lisp/vc/diff-mode.el (diff-revert-and-kill-hunk): Fix finding END. 2025-12-05 17:05:47 +00:00
Mattias Engdegård
5e7a71d0f4 Don't emit print-circle refs for empty string and vector
The empty vector and string(s) are immutable, contain no references and
always read as the same objects.

* src/print.c (PRINT_CIRCLE_CANDIDATE_P): Turn macro into...
(print_circle_candidate_p): ...a function, and exclude [] and "".
* test/src/print-tests.el (print-circle): Add test case.
2025-12-04 17:52:14 +01:00
Mattias Engdegård
2d682ca13f * lisp/emacs-lisp/bytecomp.el (funarg-positions): amend 'sort' 2025-12-04 17:52:14 +01:00
Andrea Corallo
d52bf63de2 * Have comp do not use builtin_expect with libgccjit < 14 (bug#79722)
* src/comp.c (emit_EQ): Do not use '__builtin_expect' with
libgccjit < 14.
2025-12-04 17:05:23 +01:00
Sean Whitton
d63ed68684 * lisp/vc/diff-mode.el (diff-revert-and-kill-hunk): Fix killing. 2025-12-04 15:40:11 +00:00
Kristoffer Balintona
21f9295aa9 Improve performance of 'flyspell-goto-next-error'
* lisp/textmodes/flyspell.el (flyspell-goto-next-error): Use
'next-overlay-change' and 'previous-overlay-change'.
(Bug#79933)
2025-12-04 14:19:51 +02:00
Rudolf Adamkovič
cbf9c58730 NS: Fix toolbar style and position
* src/nsterm.m ([EmacsWindow initWithEmacsFrame:fullscreen:screen:]):
Always show the toolbar below the window title.  This is needed on
Mac OS 11+ where the toolbar style is decided by the system (which
is unpredictable) and the newfangled "compact" toolbar may be chosen
(which is undesirable).  (Bug#79900)
2025-12-04 14:16:35 +02:00
Eli Zaretskii
6a4ca5e59b ; Avoid assertion violations in 'font-match-p'
* src/font.c (font_match_p): Avoid assertion violations in
'font_encode_char' if FONT is not a font-object.
2025-12-04 10:11:09 +02:00
Stephen Gildea
7f04e046fb ; time-stamp: factor out two small, internal utilities
* lisp/time-stamp.el (time-stamp--message, time-stamp--system-name):
New utility functions.
(time-stamp, time-stamp-once, time-stamp-string-preprocess):
Call the new functions.
2025-12-03 23:44:45 -08:00
Paul Eggert
335f1a11f0 Waste 4 fewer bytes in GNU/Linux 32-bit HPPA
Also, add more commentary about the situation.
* src/systhread.h (SYSTHREAD_ALIGN_ROOM): Use alignof (double),
not alignof (int), to align the room.  This means we have
only 8 (not 12) bytes of slop on 32-bit HPPA GNU/Linux.
2025-12-03 13:10:35 -08:00
Stefan Monnier
c79eb45340 lisp/emacs-lisp/bytecomp.el (seq-sort-by): Improve funarg-positions 2025-12-03 14:23:34 -05:00
Stefan Monnier
7f4f9c3b8f gnus-icalendar.el: Avoid EIEIO's non-standard FOO-p predicates
* lisp/gnus/gnus-icalendar.el (gnus-icalendar-event->gnus-calendar)
(gnus-icalendar-event:inline-org-buttons): Avoid EIEIO's non-standard
FOO-p predicates.
2025-12-03 14:22:47 -05:00
Sean Whitton
ed87a95a78 Query-on-exit for VC push, pull and async checkin commands
* lisp/vc/vc-bzr.el (vc-bzr--pushpull):
* lisp/vc/vc-git.el (vc-git--checkin, vc-git--pushpull):
* lisp/vc/vc-hg.el (vc-hg--checkin, vc-hg--pushpull): Set
query-on-exit flag for async processes.
2025-12-03 16:09:52 +00:00
Paul Nelson
02afd1305b Use dedicated minibuffer history for mairix-search
* lisp/net/mairix.el (mairix-search-history): New variable.
(mairix-search): Use it (bug#79926).
2025-12-03 12:42:09 +00:00
Sean Whitton
7d4e2107b3 ; * etc/NEWS: Update annotation. 2025-12-03 11:22:08 +00:00
Sean Whitton
b8cefd6c43 * lisp/vc/vc.el (vc-pull): Clear cached incoming revisions. 2025-12-03 11:20:00 +00:00
Sean Whitton
34331ae6f9 Pass the VC backend down through fns called by vc--count-revisions
* lisp/vc/vc-hooks.el (vc--repo-setprop, vc--repo-getprop)
(vc--repo-clearprops):
* lisp/vc/vc.el (vc-root-dir): New BACKEND parameter.
(vc--incoming-revision, vc-push): Pass it.
(vc-default-log-incoming, vc-default-log-outgoing): Pass down
BACKEND provided by caller, instead of ignoring it and always
calling vc-deduce-backend (bug#79929).
2025-12-03 11:19:12 +00:00
Sean Whitton
f15e98afb6 ; (emacs)VC Directory Buffer: Document outgoing revisions count. 2025-12-03 11:16:02 +00:00
Paul Eggert
1b2b433fc0 Port to GNU/Linux HPPA malloc
On this platform, you cannot reliably malloc objects containing
values of type pthread_mutex_t or pthread_cond_t, since malloc
guarantees only 8-byte alignment but these two types require
16-byte alignment.  See GCC bug 115750
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115750> reported by
Sam James and Emacs bug 79936 <https://bugs.gnu.org/79936>
reported by John Paul Adrian Glaubitz.
* configure.ac (ALIGNOF_MAX_ALIGN_T, ALIGNOF_PTHREAD_COND_T)
(ALIGNOF_PTHREAD_MUTEX_T) [HAVE_PTHREAD]: New C macros.
* src/systhread.c (sys_mutex_init, sys_mutex_lock)
(sys_mutex_unlock, sys_cond_init, sys_cond_wait)
(sys_cond_signal, sys_cond_broadcast, sys_cond_destroy):
Use SYTHREAD_ALIGN_PTR to convert sys_mutex_t and sys_cond_t to
pthread_mutex_t and pthread_cond_t, since runtime conversion is
needed on GNU/Linux HPPA.
* src/systhread.h (SYSTHREAD_ALIGN_ROOM, SYSTHREAD_ALIGN_PTR):
New macros, which affect the generated code only on
unusual platforms like GNU/Linux HPPA.
(sys_mutex_t, sys_cond_t) [HAVE_PTHREAD]: Use them.
2025-12-02 17:46:56 -08:00
Paul Eggert
3930d12e4d Pacify gcc -Wdangling-else in dbusbind.c
* src/dbusbind.c (XD_DBUS_VALIDATE_BUS_NAME)
(XD_DBUS_VALIDATE_PATH, XD_DBUS_VALIDATE_INTERFACE)
(XD_DBUS_VALIDATE_MEMBER): Make these expand to single statements
when they are followed by ‘;’.  All uses changed.
2025-12-02 17:46:56 -08:00
Juri Linkov
d2ac3cfb90 Improve margin handling in outline-minor-mode (bug#76193)
* lisp/outline.el (outline-minor-mode): Make margin changes
idempotent to multiple calls.  When enabling, check for
nil 'outline--margin-width' instead of relying on the value
of 'left-margin-width'.  When disabling, check for non-nil
'outline--margin-width' and set back to nil afterwards.
Use kill-local-variable for 'fringes-outside-margins'.
2025-12-02 19:21:21 +02:00
Sean Whitton
df4d8c1475 * lisp/vc/vc.el (vc-push): Delay clearing incoming revisions cache. 2025-12-02 11:55:14 +00:00
Sean Whitton
7780ac923c * lisp/vc/vc.el (vc--incoming-revision): Do store 'nil'. 2025-12-02 11:43:54 +00:00
Sean Whitton
b0a0127880 vc-dir-headers: Use ngettext, move the newline out of 'propertize'
* lisp/vc/vc-dir.el (vc-dir-headers): Use ngettext, move the
newline out of 'propertize'.
2025-12-01 22:00:42 +00:00
Elías Gabriel Pérez
49611cce30 hideshow.el: New commands 'hs-cycle' and 'hs-toggle-all'. (Bug#79877)
* etc/NEWS: Announce features.
* doc/emacs/programs.texi (Hideshow): Document it.
* lisp/progmodes/hideshow.el (hs-prefix-map): Bind the new
commands.
(hs-hide-level-recursive): Simplify.
(hs--toggle-all-state): New variable.
(hs-toggle-all, hs-cycle): New commands.
(hs-get-near-block): New function.
(hs-hide-block): Simplify.

Co-authored-by: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
2025-12-01 19:42:52 +02:00
Juri Linkov
481977f597 Override 'display-buffer-overriding-action' conditionally in perform-replace
* lisp/replace.el (perform-replace): For 'diff' display, override
'display-buffer-overriding-action' only when it has the default value.
https://lists.gnu.org/archive/html/emacs-devel/2025-11/msg01077.html
2025-12-01 19:29:11 +02:00
Mattias Engdegård
310ec70648 Deduplicate bytecode strings in each top-level form
This cheap device enables sharing of byte-code for local functions
that only differ in their constant vectors (and/or doc strings etc).
It makes the .elc files smaller by about 150 KB, and should reduce
in-memory usage a little as well.

* lisp/emacs-lisp/bytecomp.el (bytecomp--code-strings): New.
(byte-compile-from-buffer, byte-compile-flush-pending)
(byte-compile-lambda): Hash-cons byte-code locally.
2025-12-01 15:32:30 +01:00
Eli Zaretskii
4b55e56232 Fix whitespace in remember.el
* lisp/textmodes/remember.el (remember-mode): Remove redundant
whitespace.  Patch by Huang Jing <rne.kou@icloud.com> (bug#79928).
2025-12-01 15:16:49 +02:00
Sean Whitton
4271fc0daa * lisp/vc/vc-dir.el (vc-dir-headers): Put newlines in better places. 2025-12-01 12:19:20 +00:00
Kristoffer Balintona
1c3d37a673 log-edit-show-files: Respect display-buffer-alist
* lisp/vc/log-edit.el (log-edit-show-files): Consolidate the
call to cvs-pop-to-buffer-same-frame,
shrink-window-if-larger-than-buffer, and set-window-dedicated-p
into a single call to display-buffer.
2025-12-01 12:15:21 +00:00
Sean Whitton
fd3b74ca08 Fix log-view-vc-fileset in *vc-incoming* and *vc-outgoing* buffers
This fixes log-view-modify-change-comment in those buffers.

* lisp/vc/vc.el (vc-incoming-outgoing-internal): Pass the VC
root to vc-log-internal-common.
2025-12-01 11:18:07 +00:00
Sean Whitton
5e98195e84 log-edit-generate-changelog-from-diff: Special-case Summary field
* lisp/vc/add-log.el (log-edit-fill-entry): Delete unused
declaration.
* lisp/vc/log-edit.el (log-edit-generate-changelog-from-diff):
Special-case inserting a single line into the Summary field.
2025-12-01 11:14:55 +00:00
Sean Whitton
5b07a81bed New display of outgoing revisions count in VC-Dir
This relies on how vc--incoming-revision now caches incoming
revisions.

* lisp/vc/vc.el (vc--count-outgoing): New function.
* lisp/vc/vc-dir.el (vc-dir-header-urgent-value): New face.
(vc-dir-outgoing-revisions-map): New keymap.
(vc-dir-headers): Use them.
* etc/NEWS: Document the change.
2025-11-30 21:35:23 +00:00
Stephen Gildea
77a57041d0 time-stamp: Add test of multi-line start regexp
* test/lisp/time-stamp-tests.el: (time-stamp-custom-start-multiline):
New test, inspired by Amin Bandali.
2025-11-30 12:36:12 -08:00
Juri Linkov
c2e2a86d1b Make goto-address/bug-reference buttons TAB-navigable in 'button-mode'
* lisp/net/goto-addr.el (goto-address-fontify): Set overlay property
'button' to 'this-overlay', and 'category' to 'goto-address'.

* lisp/progmodes/bug-reference.el (bug-reference-fontify):
Set overlay property 'button' to 'ov' (bug#74792).
2025-11-30 20:40:12 +02:00
Sean Whitton
0f90cc033d ; * lisp/progmodes/project.el (project-compile): Fix last change. 2025-11-30 18:32:51 +00:00
Sean Whitton
30e178e7cb * lisp/vc/vc.el (vc-push): Clear cached incoming revision. 2025-11-30 18:31:37 +00:00
Sean Whitton
2abad90dce * lisp/vc/vc.el (vc--incoming-revision): Don't cache 'nil'. 2025-11-30 18:28:55 +00:00
Juri Linkov
0f9dd5b3a1 Show Flymake diagnostics on clicking mouse-1 on the mode-line indicator
* lisp/progmodes/flymake.el (flymake--mode-line-counter-map):
Bind [mode-line mouse-1] to 'flymake-show-buffer-diagnostics' (bug#76254).
2025-11-30 20:24:34 +02:00
Sean Whitton
5167989b2a Cache VC incoming revisions
* lisp/vc/vc-hooks.el (vc-file-setprop): Use cl-pushnew.
(vc--repo-setprop, vc--repo-getprop, vc--repo-clearprops): New
functions.
* lisp/vc/vc.el (vc--incoming-revision): Cache incoming
revisions.
* src/fns.c (Fput): State that VALUE is returned.
2025-11-30 18:20:50 +00:00
Juri Linkov
9174bc811a Use treesit-extra-load-path for more values of treesit-auto-install-grammar
* lisp/treesit.el (treesit-auto-install-grammar): Use the first
writable directory from 'treesit-extra-load-path' for values
'always', 'ask', 'ask-dir' (bug#79862).

* src/treesit.c (syms_of_treesit): Extend docstring.
2025-11-30 20:14:19 +02:00
Sean Whitton
16b19ceb28 project-compile: Don't let-bind compile-command
* lisp/progmodes/project.el (project-compile): Handle ignoring
compile-command from a vc-compilation-mode buffer in a way that
does not involve let-binding compile-command.
2025-11-30 17:36:33 +00:00
João Távora
27f0a3fd86 Eglot: revert changes to eglot-rename's interface (bug#79757)
After some weeks of testing, I've changed by mind on this.  Having the
current name appear passed the INITIAL-VALUE to read-from-minibuffer is
a jarring backward-incompatible change.  There is no evidence that the
majority of renames are simple tweaks to the existing names, and even
less evidence that these tweaks happen frequently at the end of the
symbol.

Therefore it's better for the ergonomics of this commonly used command
to leave the code as it was and simply rely on C-n to bring in the
default value (which is the current symbol name), instead of forcing
users accustomed to the previous behaviour remember to press sth like
M-DEL to clean the input.

* lisp/progmodes/eglot.el (eglot-rename): Tweak.
2025-11-30 13:52:30 +00:00
Sean Whitton
ae36ee3655 ; * lisp/server.el (server--process-filter-1): Fix typo. 2025-11-30 13:47:00 +00:00
Sean Whitton
7d2e22843f server--process-filter-1: Fix stripping -auth argument (bug#79889)
* lisp/server.el (server--process-filter-1): Strip trailing
space after -auth argument (bug#79889).  Fix due to Richard
Copley <rcopley@gmail.com>.
2025-11-30 11:24:32 +00:00
Roi Martin
b208b08371 Fix bug in semantic linefeed filling
Fix bug in semantic linefeed filling related to wide characters and
`sentence-end-without-space'.
* lisp/textmodes/fill.el (fill-region-as-paragraph-semlf): Fix the
calculation of the maximum column.  Do not depend on where
`fill-region-as-paragraph-default' leaves point after being called.
(Bug#79575)
2025-11-30 11:41:49 +02:00
Mattias Engdegård
ef903e0f5a * test/src/data-tests.el (data-tests-ash-lsh): Test for bug#79876. 2025-11-29 19:41:16 +01:00
Sean Whitton
c499c2f67b * lisp/vc/diff-mode.el (diff-filename-drop-dir): Match backslashes. 2025-11-29 18:21:31 +00:00
Stephen Gildea
9f2b1c43c9 time-stamp: return quicker when inactive
* lisp/time-stamp.el (time-stamp-once): Do not look for additional
templates once we have displayed the warning about being disabled.
Move earlier the check for arguments being the correct type.
* test/lisp/time-stamp-tests.el (time-stamp-custom-messages): New test.
2025-11-29 09:14:58 -08:00
Sean Whitton
1677c4681a Handle copying additions & removals between working trees
* lisp/vc/diff-mode.el (diff-file-kill): New optional DELETE
parameter.
(diff-kill-creations-deletions):
* lisp/vc/vc.el (vc--fileset-by-state): New functions.
(diff-kill-creations-deletions, diff-filename-drop-dir)
(diff-hunk-file-names, diff-file-next, diff-hunk-header-re)
(vc-dir-resynch-file): Declare.
(vc--apply-to-other-working-tree): Handle copying and moving
files in the added, removed, missing and unregistered states.
* test/lisp/vc/vc-tests/vc-tests.el
(vc-test--apply-to-other-working-tree): New test.
2025-11-29 14:35:39 +00:00