Update all remaining function handlers to use
'elisp-scope-define-func-analyzer' instead of
'elisp-scope-define-function-analyzer'. The difference is
that the former handles all arguments explicitly, while the
latter analyzes all arguments as evaluated forms
automatically. By handling the arguments explicitly, we get
a chance to specify the expected type of different arguments.
Lastly, since 'elisp-scope-define-function-analyzer' is now
unused, rename 'elisp-scope-define-func-analyzer' to
'elisp-scope-define-function-analyzer'.
* 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'.
* lisp/mouse.el (mouse-drag-line): Restore dragging in character
increments and make it the default (Bug#79351).
* etc/NEWS: Mention restored behavior of mouse line dragging.
* lisp/dabbrev.el (dabbrev-completion): Revert this part of last
change, but additionally set `dabbrev--last-abbrev-location` so we know
what the vars were reset for.
(dabbrev-capf): Be more careful about when and how to reset the vars.
(dabbrev--abbrev-at-point): Don't set `dabbrev--last-abbrev-location`,
so it doesn't mess with the marker we set it to in
`dabbrev-capf` or `dabbrev-completion`.
This is expected to happen in some cases.
* lisp/vc/vc-git.el (vc-git--with-apply-temp): New OKSTATUS
parameter.
(vc-git--checkin): Use it to ignore 'git apply --3way' exiting
1.
Use private names. Use hashed function symbols. Do not restrict the
overlay to the miniwindow, since the minibuffer can be displayed by
other windows, for example by packages using child frames or by
vertico-buffer-mode (bug#79490).
* lisp/minibuffer.el (minibuffer-nonselected-setup): Rename to
minibuffer--nonselected-setup. Use hashed function symbols.
Add docstring.
(minibuffer-nonselected-check): Rename to
minibuffer--nonselected-check. Use hashed function symbols.
Do not restrict overlay to miniwindow.
(minibuffer-nonselected-overlay): Rename to
minibuffer--nonselected-overlay.
(minibuffer-nonselected-mode): Use hashed function symbol for
custom-initialize-delay.
(global-hl-line-buffers): Rename from recently added 'global-hl-line-modes',
use :type 'buffer-predicate' and change the default value to a condition
to not match completion-list-mode.
(global-hl-line-highlight): Use 'buffer-match-p' instead of
'easy-mmode--globalized-predicate-p' (bug#79481).
* lisp/vc/vc-git.el
(vc-git--with-apply-temp-to-staging): Rename ...
(vc-git--with-apply-temp): ... to this. New ARGS parameter.
All uses changes.
(vc-git--checkin): In POST function, apply PATCH-STRING to the
working tree with 'git apply --3way --ours'.
* lisp/vc/vc-hg.el (vc-hg--checkin): Document what the call to
'hg update' is for.
* test/lisp/vc/vc-tests/vc-tests.el (vc-test--checkin-patch):
Delete completed FIXME and workaround.
* lisp/vc/vc-git.el (vc-git--checkin): Restore dropping stash of
staged changes after applying it. This was accidentally lost
when factoring out vc-git--with-apply-temp-to-staging.
* lisp/electric.el (electric-indent--activate-indent-actions):
Rename from `electric-indent-toggle-indent-actions`. Adjust callers.
Make its result less dependent on the input state. Support `yank` and
`before-save` at the same time.
(electric-indent-actions): Use it instead if `electric-indent-mode`.