Extend the "type" system (to be renamed to "spec" in
subsequent commit) of elisp-scope.el with a plist spec.
This allows us to define a spec for the 'slots' argument of
'eieio-defclass-internal'. Also add a 'cl-type' spec,
describing the type specifications used by 'cl-typep', and
replace the 'equal' spec with a more general 'member' spec,
like we have in 'cl-typep'.
Take an Edebug spec of t as an indication that all of the
macro's arguments are evaluated, and analyze them as such.
Only do so as a fallback for macros that we cannot expand,
because expanding can lead to more accurate analysis,
e.g. with regards to the output type of the form.
Hook semantic highlighting into 'font-lock-keywords' instead
of 'font-lock-fontify-region-function'. See discussion at
https://yhetil.org/emacs/jwvseg2mnkx.fsf-monnier+emacs@gnu.org/T/#t
* lisp/progmodes/elisp-mode.el (elisp-fontify-region)
(elisp-fontify-region-semantically): Remove, no longer used.
(elisp-fontify-symbols): New function.
(elisp-semantic-font-lock-keywords): New 'defconst'.
(emacs-lisp-mode): Use it as the new highest
'font-lock-keywords' level.
Change the terminology used in elisp-scope.el to call the
symbols we use to categorizes the use of (other) symbols
"symbol roles" instead of "symbol types".
* lisp/emacs-lisp/elisp-scope.el:
* lisp/progmodes/elisp-mode.el: Change all occurrences of
"symbol type" say "role" instead.
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`.