* lisp/vc/log-view.el (log-view-copy-revision-as-kill): Signal
user-error if there is no revision at point.
* doc/emacs/maintaining.texi (VC Change Log):
* etc/NEWS: Shorten docs for the new command.
* lisp/progmodes/hideshow.el (hs-hideable-region-p): New
function.
(hs--make-indicators-overlays, hs--add-indicators)
(hs-hide-block-at-point, hs-hide-all, hs-hide-block)
(hs-hide-initial-comment-block): Use it. (Bug#79533)
* lisp/editorconfig.el (editorconfig-indentation-alist): Remove entries
of the form `(MODE-mode MODE-basic-offset)`, `(MODE-mode
MODE-indent-level)`, or `(MODE-mode MODE-indent-offset)` since they are
covered by the fallback guessing code.
(editorconfig--default-indent-size-function): Remove "-block-offset"
from the guessing code since it's used only by `octave-mode`.
We use gfm-view-mode to render Markdown before we hand over the string
to ElDoc (which usually put it in a 'special' mode "*eldoc*" buffer).
'gfm-view-mode' adds keymap text properties to make links clickable. It
also makes some of the markup invisible with a special 'invisible'
property value which is specific to 'gfm-view-mode'. We used to delete
the latter, therefore breaking the link-clicking. Simply resetting the
regions with non-nil 'invisible' to 't' instead of deleting them fixes
this. See also https://github.com/joaotavora/eglot/discussions/1238
* lisp/progmodes/eglot.el: Make invisible markup invisible
instead of deleting it.
* etc/EGLOT-NEWS: Mention bugfix.
Co-authored-by: João Távora <joaotavora@gmail.com>
* lisp/vc/log-view.el (log-view-mark-entry)
(log-view-unmark-entry): Mark ARG as a required argument, as it
in fact is.
(log-view-toggle-mark-entry): Call them properly.
* lisp/vc/vc.el (vc-kill-other-working-tree-buffers): New
command.
* lisp/vc/vc-hooks.el (vc-prefix-map): Bind it.
* doc/emacs/vc1-xtra.texi (Other Working Trees):
* etc/NEWS: Document it.
* lisp/net/tramp.el (tramp-process-running-p): Use 'compare-strings'
for matching PROCESS-NAME with process command. (Bug#79545)
Copyright-paperwork-exempt: yes
There won't be any uncommitted changes in the new working tree
yet, so vc-dir is unlikely to be useful.
* lisp/vc/vc.el (vc-add-working-tree): Finish by calling 'dired'
not 'vc-dir'.
* test/lisp/vc/vc-tests/vc-tests.el
(vc-test--other-working-trees): Delete stubbing out 'vc-dir'.
* lisp/progmodes/project.el (project-prompter)
(project-prompt-project-dir, project-prompt-project-name):
* lisp/vc/vc.el (vc--prompt-other-working-tree): New ALLOW-EMPTY
optional argument.
(delete-working-tree, move-working-tree): Specify that callers
must ensure DIRECTORY is not the current working tree.
(vc-delete-working-tree, vc-move-working-tree): Pass ALLOW-EMPTY
non-nil to vc--prompt-other-working-tree. Bind
'default-directory' to another working tree when operating on
the current working tree.
(vc-delete-working-tree): Extra prompt when asked to delete the
current working tree. When deleting the current working tree,
call 'bury-buffer' one or more times at the end.
* test/lisp/minibuffer-tests.el (with-minibuffer-setup)
(completing-read-with-minibuffer-setup): Prevent instrumenting
functions that call these macros from erroring due to an invalid
debug specification in the 'declare' form. Use 't' as the debug
spec since it is the most general and adequate here.
* etc/NEWS: Rename 'global-hl-line-modes' to 'global-hl-line-buffers'
(bug#79481). Mention new default value of 'global-hl-line-buffers'
(bug#64993). Mention new value 'window' of 'global-hl-line-sticky-flag'
that is more useful than the value 'all' now removed from NEWS (bug#64993).
* lisp/hl-line.el (hl-line-nonselected): New face.
(global-hl-line-sticky-flag): Add the value 'window'.
(global-hl-line-buffers): Change the default value to exclude
the minibuffer and 'cursor-face-highlight-mode'.
(global-hl-line-mode): Handle the value 'window' of
'global-hl-line-sticky-flag'.
(global-hl-line-window-redisplay): New function.
* lisp/simple.el (completion-setup-function):
Add 'completion--lazy-insert-strings-on-scroll'
to buffer-local hook 'window-scroll-functions'.
* lisp/minibuffer.el (completion--lazy-insert-strings-on-scroll):
New function.
(completion--in-region-1): Remove calls to the function
'completion--lazy-insert-strings' that now are handled
by the scroll hook.
* configure.ac: Use gl_CHECK_FUNCS_ANDROID_MACOS to check for
'posix_spawn_file_actions_addchdir', since it checks which
version of macOS is being used for the build, rather than what
is available in the SDK. (Bug#79489)
* lisp/gnus/mm-decode.el (mm-copy-to-buffer): Always return a
unibyte buffer. If the original text was multibyte, encode it
while inserting it into the copy buffer. (Bug#79376)
* lisp/progmodes/etags-regen.el
(etags-regen--process-file-region): New function.
(etags-regen--tags-generate, etags-regen--append-tags): Use the
new helper function to run the program, and use relative file
name if TAGS file is in the project root.
(etags-regen--update-file): Use relative file name if possible.
* lisp/mail/rmail.el (rmail-detect-suspicious-headers): New user
option.
(rmail-check-suspicious-from): New function, highlights suspicious
"From" addresses.
(rmail-show-message-1): Call 'rmail-check-suspicious-from' if
'rmail-detect-suspicious-headers' is non-nil.
* lisp/mail/sendmail.el (mail-send): Detect suspicious addresses
before sending.
* etc/NEWS: Announce the new features.
This reverts commit bf750adc4e.
It caused windmove to be loaded unconditionally.
The correct "fix" for bug#79518 is to load the package or
to toggle the mode.
* lisp/progmodes/peg.el (peg--merge-error): Provide a default method.
(peg--merge-error) <call>: Handle calls with arguments.
(peg--merge-error) <any, not>: Remove methods, now redundant with the
default method.
(peg--merge-error) <guard>: Delegate to the default method if we can't
do better.
* lisp/vc/vc.el (prepare-patch): Specify :patch-start and
:patch-end plist entries.
* lisp/vc/vc-git.el (vc-git-prepare-patch): Use -n1 to avoid
passing a revision range to git-format-patch, which is a bit
simpler. Catch search-failed errors and signal an error with a
more helpful message. Properly handle Subject: header by
looking for continuation lines. Return :patch-start and
:patch-end entries in the plist.
* lisp/vc/vc-hg.el (vc-hg-prepare-patch): Always pass --git to
'hg export' for consistency. Catch search-failed errors and
signal an error with a more helpful message. Return a
:patch-start entry in the plist.
* test/lisp/vc/vc-tests/vc-tests.el (vc-test--checkin-patch):
For the last stage of the test, restore alternative code path
for Git, though this time limited to when running the test on
MS-Windows. Cf. subthread starting from
<https://lists.gnu.org/archive/html/emacs-devel/2025-09/msg00785.html>.
In “Avoid duplicate calls to current_timespec” (2015-07-05)
we started caching current_timespec results in NOW.
However, this was buggy: we updated NOW only when the timeout was
nonzero, but the timeout can be set temporarily to zero in several
places in wait_reading_process_output (such as when checking for
process status changes), which would cause us to never update NOW
and therefore never detect that a timeout happened.
Also, this caching was wrong even in principle: since we call
Lisp code from wait_reading_process_output, substantial amounts
of time can pass, and we can be left using an outdated NOW and
incorrectly not time out. Also, nowadays we can use
monotonic_coarse_timespec which is fast, and which is better
anyway because it’s immune to manual clock changes.
Co-authored-by: Spencer Baugh <sbaugh@janestreet.com>
* src/process.c (wait_reading_process_output):
Stop caching the current realtime.
Instead, use the coarse monotonic clock without caching.
They are good enough for this purpose, and are cheaper to get.
* src/timefns.c (monotonic_coarse_timespec): New function.
* src/xterm.c [HAVE_XSYNC && !USE_GTK && HAVE_CLOCK_GETTIME]:
(x_sync_current_monotonic_time): Use it.
(CLOCK_MONOTONIC): Remove; no longer uneeded here.
* doc/lispref/buffers.texi (Buffer List):
* lisp/subr.el (buffer-match-p):
Document that 'derived-mode' can be a list (bug#79481).
* lisp/wid-edit.el (buffer-predicate): Support a list for 'derived-mode'.