Any non-trivial EIEO object in particular is impossible to read in the
*trace-output* buffer without this. Functions, hash-tables, etc now
print as they do in backtrace buffers.
* lisp/emacs-lisp/trace.el (cl-print): Require it
(trace-entry-message, trace-exit-message): Use cl-prin1-to-string
Let the caller tell us clearly where is the base of the backtrace,
if it's not `debug`. This is done by passing a new `:backtrace-base`
keyword argument to `debug`.
Then use this info systematically in all the places where we access
the real C-level backtrace, to try and avoid inconsistencies and brittle
code that tries to enumerate the expected frames we're in.
* src/eval.c (get_backtrace_starting_at): Add support for offsets in the
`base` argument.
(Fbacktrace_debug): Add optional `base` argument.
* lisp/emacs-lisp/debug.el (debug, debugger-frame, debugger-frame-clear):
Use `debugger--backtrace-base` when calling `backtrace-debug`.
(debugger-setup-buffer): Use `debugger--backtrace-base`
when calling `backtrace-get-frames`.
(debugger-frame-number): Drop `skip-base` arg, assume it's never nil.
Add sanity check.
(debugger--backtrace-base): Use the `:backtrace-base` info
in `debugger-args`.
(debugger-eval-expression): Adjust call to `debugger-frame-number`.
(debug--implement-debug-on-entry): Pass appropriate `:backtrace-base`.
* lisp/emacs-lisp/package-vc.el (package-vc--unpack-1): Wait for all
system operations to have been completed, before proceeding to remove
old package descriptors from 'package-alist'. This avoids loosing a
package if an error occurs during upgrades.
M-x eldoc is ElDoc's interactive entry point for on-demand
documentation for users that don't want the behind-the-scenes idle
timer behaviour.
However, eldoc-display-in-echo-area, a member of
eldoc-display-functions, refused to do anything because it thought it
didn't have permission to use the echo area, which isn't true
in interactive use cases. Fix that.
See also: https://github.com/joaotavora/eglot/discussions/1328
* lisp/emacs-lisp/eldoc.el (eldoc-display-in-echo-area): Use
INTERACTIVE argument. Rework comments.
(Version): Bump to 1.15.0
Quickstart can fail in all kinds of ways, for example if a package
was removed without updating the quickstart file.
* lisp/emacs-lisp/package.el (package-activate-all): Revert to the slow
path if the quickstart signals an error.
(package--activate-all): Fix compilation warning without an autoload.
* lisp/emacs-lisp/comp-common.el
(native-comp-never-optimize-functions): Remove macroexpand and
rename-buffer from default value.
* lisp/emacs-lisp/comp.el (comp-call-optim-form-call): Document call
optimization for advised primitives.
* lisp/emacs-lisp/nadvice.el (advice-add): Remove references to TODOs
that were completed already earlier.
* lisp/loadup.el: Disallow advices during preload. (Bug#67005)
Add ert-font-lock as well as unit tests and testing resources.
* lisp/emacs-lisp/ert-font-lock.el: New library.
* test/lisp/emacs-lisp/ert-font-lock-resources/broken.js:
* test/lisp/emacs-lisp/ert-font-lock-resources/correct.js:
* test/lisp/emacs-lisp/ert-font-lock-tests.el: Unit tests.
(Bug#67460)
cd477bf07d Fix behavior of 'split-root-window-*' with 'C-u'
2e5d47f578 ; * doc/lispintro/emacs-lisp-intro.texi (copy-to-buffer):...
c46700deb0 Add more text to clarify the behavior of 'with-current-bu...
687c416ce9 Fix example in Emacs user manual
835902179c ; Fix recent change in 'c-ts-mode'
169a5ff752 ; Fix typo in Gnus manual (bug#67469).
30841c71a5 Mention Titankey in Tramp, which has passed the tests
dab7cc241f Fix c-ts-mode indentation after if/else (bug#67417)
f8d9dc26c7 Fix indentation for else clause in c-ts-mode (bug#67417)
bf0b0c9c73 Ensure that directory is expanded in package-vc-checkout
e551dd72f7 * etc/PROBLEMS: Add entry about pinentry with gpgsm. (Bu...
We shouldn't be warning inside the optimiser in the first place.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form):
Remove byte-compile-form-stack manipulation.
(byte-optimize-form-code-walker): Move malformed function warning
from here...
* lisp/emacs-lisp/cconv.el: ...to here.
A minibuffer is used now instead of read-key.
Registers in preview buffer are now filtered according to type of
registers the current command requires.
Navigation with C-n/p or up/down is now provided and update
minibuffer.
Current register is highlighted in preview buffer.
* lisp/register.el: (register-preview-default-keys)
(register-use-preview): New user variables.
(register-preview-info): New structure to store various info for
preview.
(register-command-info): New generic.
(register-preview-forward-line): New, provide navigation in preview
buffer.
(register-preview-next, register-preview-previous): New, navigation.
(register-type): New, returns register type.
(register--type): Generic fn, new, returns register type according
to value.
(register-of-type-alist): New, filter register-alist according to
type.
(register-preview): Signature changed, use TYPES now.
(register-preview-get-defaults): New generic, compute defauts
according to action.
(register-read-with-preview): Now use read-from-minibuffer and
minibuffer-setup-hook.
* lisp/emacs-lisp/cl-generic.el: Add a call to
'cl--generic-prefill-dispatchers' to fix a build error.
This fixes bug#67483.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form): Push and
pop FORM onto/off byte-compile-form-stack so that warning
messages get a position near to the erroneous source.
* lisp/emacs-lisp/shorthands.el
(shorthands--mismatch-from-end): Rework and document. Works like
CL's mismatch now.
(shorthands-font-lock-shorthands): Allow arbitrary punctuation
as separator for font-locking logic.
Clones of instances of subclasses of 'eieio-instance-inheritor' didn't
delegate to their ':parent-instance' field when reading object fields
using ':accessor'.
* lisp/emacs-lisp/eieio.el (defclass): Remove 'slot-boundp' check for
:accessor's getter
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
(eieio-test-use-accessor-function-with-cloned-object): New test.
Copyright-paperwork-exempt: yes
Also refactor the pertinent part of bytecomp.el.
* lisp/emacs-lisp/bytecomp.el (byte-compile-output-file-form):
Use byte-compile-output-docform for all forms, not just those
with doc strings.
(byte-compile--output-docform-recurse): New function extracted
from byte-compile-output-docform. This function recurses on
functions contained in the constants vector.
(byte-compile-output-docform): Extract parameter DOCINDEX from
the INFO list. Add parameter CVECINDEX, the index of the
constants vector in FORM.
(byte-compile-file-form-defmumble): Several detailed
refactorings. Call byte-compile-output-docform with the new
interface.
(byte-compile-output-as-comment): On exit, leave point after
the inserted text. No longer assume that the output is being
inserted at the end of the buffer.
77ab00207d ; * admin/authors.el (authors-aliases): Add Noah Peart.
6f843f03dc typescript-ts-mode: Add missing 'operator' to treesit-fon...
0676a02931 Extend D-Bus doc and test
df094dd4bc Do not unregister a D-Bus service which is a unique name
e6ad97a333 Fix byte-compilation warnings about 'sqlite-rollback'
* lisp/emacs-lisp/subr-x.el (string-pixel-width):
Instead of checking for display-line-numbers-mode, set the
display-line-numbers variable to nil (bug#67248).
* lisp/emacs-lisp/find-func.el (find-function--any-subform-p):
Don't use 'cl-destructuring-bind'.
(find-library--from-load-history): Don't use 'cl-loop'.
* lisp/thingatpt.el (thing-at-point): Don't use 'cl-loop'. This
avoids loading cl-lib whenever thingatpt.el is loaded, for
example, as result of "M-x load-library".
Previously, if map-y-or-n-p got -1 from read-event (indicating no
input due to the end of a keyboard macro), it would just infinite
loop.
Now it behaves like other commands which use read-event/read-char/etc,
and just errors when we try to look up -1 in our keymap and find
nothing.
Also, just for the sake of users, print a slightly prettier message
when this happens.
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Don't loop if we reach
the end of a keyboard macro. (Bug#67046)
The compiler didn't cancel aliasing if the aliased variable was
modified in a variable binding in the same `let` that created
the alias. For example,
(let ((x A))
(let ((y x)
(z (setq x B)))
y))
would incorrectly substitute y->x in the body form despite x being
already modified at that point, which normally should have cancelled
the aliasing.
Bug reported by Alan Mackenzie.
* lisp/emacs-lisp/byte-opt.el (byte-optimize--aliased-vars):
Now an alist that also contains the aliases; update the doc string.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
* lisp/emacs-lisp/byte-opt.el (byte-optimize-let-form):
Detect aliasing early for `let`-bound variables as well.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
Add test cases.
The code was used to linearize the EIEIO class hierarchy, since
it results in saner results than things like BFS or DFS.
By moving it to `subr.el` we get to benefit from that same
advantage both in `cl--class-allparents` and
in `derived-mode-all-parents`.
* lisp/subr.el (merge-ordered-lists): New function.
(derived-mode-all-parents): Use it to improve parent ordering.
* lisp/emacs-lisp/eieio-core.el (eieio--c3-candidate)
(eieio--c3-merge-lists): Delete functions, replaced by
`merge-ordered-lists`.
(eieio--class-precedence-c3): Use `merge-ordered-lists`.
* lisp/emacs-lisp/cl-preloaded.el (cl--class-allparents):
Use `merge-ordered-lists` to improve parent ordering.
* lisp/emacs-lisp/cl-macs.el (cl--struct-all-parents): Delete function.
(cl--pcase-mutually-exclusive-p): Use `cl--class-allparents` instead.