summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
* ; * lisp/emacs-lisp/cconv.el (cconv-convert): Reindent.Mattias Engdegård2023-12-211-286/+291
|
* Maintain byte-compile-form-stack in cconv-convert (bug#67483)Mattias Engdegård2023-12-212-2/+16
| | | | | | | * lisp/emacs-lisp/macroexp.el (macroexp--with-extended-form-stack): New. * lisp/emacs-lisp/cconv.el (cconv-closure-convert, cconv-convert): Push forms onto byte-compile-form-stack.
* Non-delayed warning for malformed function (bug#67483)Mattias Engdegård2023-12-211-3/+2
| | | | | * lisp/emacs-lisp/cconv.el (cconv-convert): Use an immediate warning; a delayed one made little sense as it's a matter of well-formedness.
* trace.el: use cl-printJoão Távora2023-12-201-4/+6
| | | | | | | | | 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
* debug.el: Straighten the code that find the "base" of the backtraceStefan Monnier2023-12-181-30/+32
| | | | | | | | | | | | | | | | | | | | | | | | | 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`.
* ; Fix typosStefan Kangas2023-12-107-14/+14
|
* Merge from origin/emacs-29Eli Zaretskii2023-12-095-5/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0f361cc985d ; Minor copyedits in description of ':box' face property 46fe7a17f53 Fix dragging mode line on text terminals with a mouse (bu... 12daf386f37 ; * doc/lispref/processes.texi (Network): Fix wording and... 037d858dc1a (rust-ts-mode): Set electric-indent-chars dc9b733ab88 js-ts-mode: Highlight function parameters inside destruct... 4a72f13bdfb js-ts-mode: Highlight property shorthands in assignments 83ed9018ede (js--treesit-font-lock-settings): Highlight parameters in... ad0f87bb4c3 (js--treesit-font-lock-settings): Remove some duplicates 71c5f3694fd ; Another fix of doc string of 'message-mail-user-agent' ... 04a39353bae ; * lisp/gnus/message.el (message-mail-user-agent): Doc f... 82ddcf37ec6 ; * doc/lispref/files.texi (Changing Files): Fix last cha... 89068516b3e Don't claim to signal an error when deleting a nonexistin... 4fd254e1830 * lisp/indent.el (indent-rigidly): Improve prompt (bug#67... 5f923ff1a6a ; Fix typos a1f88963f5d rust-ts-mode--comment-docstring: Handle block doc comments a547b0e2e83 rust-ts-mode--comment-docstring: Fix/improve the previous...
| * ; Fix typosStefan Kangas2023-12-035-5/+5
| |
* | Remove old VC packages from 'package-alist' after installingPhilip Kaludercic2023-12-091-4/+5
| | | | | | | | | | | | | | * 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.
* | ElDoc: make eldoc-display-in-echo-are useful from M-x eldocJoão Távora2023-12-051-14/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | * lisp/emacs-lisp/package.el (package-activate-all): Fix second-order warningStefan Monnier2023-12-051-2/+7
| |
* | (package-activate-all): Be more robust when quickstart failsStefan Monnier2023-12-051-11/+14
| | | | | | | | | | | | | | | | | | 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.
* | Update handling of advices during preloadJens Schmidt2023-12-043-7/+12
| | | | | | | | | | | | | | | | | | | | | | * 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)
* | comp: Fix mvar dependency chain (bug#67239)Andrea Corallo2023-12-041-4/+10
| | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/comp.el (comp-add-cond-cstrs): Emit assume with the original mvar as explicit rhs. (comp-fwprop-insn): Add note. * test/src/comp-tests.el (67239-1): Add new test. * test/src/comp-resources/comp-test-funcs.el (comp-test-time) (comp-test-67239-00-f, comp-test-67239-0-f, comp-test-67239-1-f): Define.
* | * lisp/emacs-lisp/comp.el (comp--native-compile): Better log.Andrea Corallo2023-12-041-1/+1
| |
* | comp: Rename some functionsAndrea Corallo2023-12-041-86/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/comp.el (comp--known-predicate-p) (comp--pred-to-cstr, comp-edge, comp--edge-make) (comp--block-preds, comp--gen-counter, comp-func) (comp--equality-fun-p, comp--arithm-cmp-fun-p, comp--set-op-p) (comp--assign-op-p, comp--call-op-p, comp--branch-op-p) (comp--limple-insn-call-p, comp--type-hint-p) (comp--func-unique-in-cu-p, comp--symbol-func-to-fun) (comp--function-pure-p, comp--alloc-class-to-container) (comp--add-const-to-relocs, comp--prettyformat-insn) (comp--log-func, comp--log-edges, comp-emit-setimm) (comp-emit-lambda-for-top-level, comp-add-cond-cstrs) (comp-collect-calls, comp-compute-dominator-tree) (comp-function-foldable-p, comp-function-call-maybe-fold) (comp-func-in-unit, comp-call-optim-form-call) (comp-dead-assignments-func, comp-tco) (comp-remove-type-hints-func, comp-remove-type-hints) (comp-compute-function-type, comp-finalize-relocs) (comp-compile-ctxt-to-file): Rename and update.
* | * lisp/emacs-lisp/comp-run.el (bytecomp): Require it (bug#67590)Andrea Corallo2023-12-031-0/+1
| |
* | * lisp/emacs-lisp/macroexp.el (macroexp-parse-body): Fix bug#67568Stefan Monnier2023-12-031-11/+12
| | | | | | | | This fixes a regression introduced in commit f616edb4ccce.
* | Add ert-font-lockVladimir Kazanov2023-12-031-0/+364
| | | | | | | | | | | | | | | | | | 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)
* | Revert "Ensure that directory is expanded in package-vc-checkout"Eli Zaretskii2023-12-021-1/+0
| | | | | | | | | | This reverts commit bf0b0c9c73d4793beb11e6125496d0e72d4dd67a. It is only needed in Emacs 29.
* | Merge from origin/emacs-29Eli Zaretskii2023-12-021-0/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | cd477bf07d8 Fix behavior of 'split-root-window-*' with 'C-u' 2e5d47f578a ; * doc/lispintro/emacs-lisp-intro.texi (copy-to-buffer):... c46700deb0a Add more text to clarify the behavior of 'with-current-bu... 687c416ce9b Fix example in Emacs user manual 835902179cd ; Fix recent change in 'c-ts-mode' 169a5ff7524 ; Fix typo in Gnus manual (bug#67469). 30841c71a5d Mention Titankey in Tramp, which has passed the tests dab7cc241f4 Fix c-ts-mode indentation after if/else (bug#67417) f8d9dc26c78 Fix indentation for else clause in c-ts-mode (bug#67417) bf0b0c9c73d Ensure that directory is expanded in package-vc-checkout e551dd72f79 * etc/PROBLEMS: Add entry about pinentry with gpgsm. (Bu...
| * Ensure that directory is expanded in package-vc-checkoutJoseph Turner2023-11-261-0/+1
| | | | | | | | | | * lisp/emacs-lisp/package-vc.el (package-vc-checkout): Expand DIRECTORY. (Bug#66115)
* | Move malformed-function warning from byte-opt to cconv (bug#67483)Mattias Engdegård2023-11-302-11/+9
| | | | | | | | | | | | | | | | | | | | 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.
* | * lisp/emacs-lisp/eieio-core.el (eieio-set-defaults): Silence errorsStefan Monnier2023-11-291-1/+4
| | | | | | | | See bug#66938
* | Improve register-preview (Fix bug#66394)Thierry Volpiatto2023-11-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Compiler optimizer: push forms onto byte-compile-form-stackAlan Mackenzie2023-11-271-0/+2
| | | | | | | | | | | | | | | | 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.
* | Font-lock shorthands with arbitrary punctuation (bug#67390)João Távora2023-11-261-6/+17
| | | | | | | | | | | | | | | | * 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.
* | Add autoload cookie to autoload-compute-prefixes (bug#67325)João Távora2023-11-261-0/+1
| | | | | | | | | | * lisp/emacs-lisp/loaddefs-gen.el (autoload-compute-prefixes): Add autoload cookie.
* | Make EIEIO ':accessor' behave like ':reader' when reading (bug#66938)Brandon2023-11-261-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | .elc format: Record lambdas' doc strings lazily, not inlineAlan Mackenzie2023-11-261-110/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge from origin/emacs-29Eli Zaretskii2023-11-251-2/+0
|\| | | | | | | | | | | | | | | 77ab00207d6 ; * admin/authors.el (authors-aliases): Add Noah Peart. 6f843f03dc2 typescript-ts-mode: Add missing 'operator' to treesit-fon... 0676a029310 Extend D-Bus doc and test df094dd4bc1 Do not unregister a D-Bus service which is a unique name e6ad97a3338 Fix byte-compilation warnings about 'sqlite-rollback'
| * Fix byte-compilation warnings about 'sqlite-rollback'Eli Zaretskii2023-11-241-2/+0
| | | | | | | | | | | | | | * lisp/sqlite.el (sqlite-transaction, sqlite-commit) (sqlite-rollback): Declare. * lisp/emacs-lisp/multisession.el (sqlite-commit) (sqlite-transaction): Remove declaration.
* | Merge from savannah/emacs-29Po Lu2023-11-241-4/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | d72a4ed65ce Fix 'with-sqlite-transaction' when BODY fails a7b3c923733 ; * doc/emacs/cmdargs.texi (Initial Options): Fix last ch... fd76a80864d ; Mention that -x and --script ignore file-locals e0469ddb9d4 ; * doc/emacs/search.texi (Special Isearch): More accurat... e521669fb3f Fix wording in ELisp Intro manual da946ca6924 Add missing python-ts-mode keyword (bug#67015) 0128495afde Fix string-pixel-width with global setting of display-lin... # Conflicts: # etc/NEWS
| * Fix string-pixel-width with global setting of display-line-numbersDmitry Gutov2023-11-181-4/+3
| | | | | | | | | | | | * 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).
* | Adjust affected callers of derived-mode-p` to use the new conventionStefan Monnier2023-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/align.el (align-rules-list): Prefer `derived-mode-p` over `provided-mode-derived-p`. (align--rule-should-run): * lisp/window.el (display-buffer-reuse-mode-window): * lisp/whitespace.el (whitespace-enable-predicate): * lisp/transient.el (transient--do-suffix-p): * lisp/so-long.el (so-long--set-auto-mode): * lisp/simple.el (command-completion-with-modes-p): * lisp/progmodes/tcl.el (tcl-current-word): * lisp/progmodes/idlwave.el (idlwave-fix-keywords): * lisp/progmodes/gdb-mi.el (gdb, gdb-locals-mode-map) (gdb-registers-mode-map, gdb-function-buffer-p): * lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-style-setter) (c-ts-mode-set-style): * lisp/progmodes/bug-reference.el (bug-reference--try-setup-gnus-article): * lisp/help-fns.el (help-fns--list-local-commands): * lisp/emulation/viper.el (viper-mode) (viper-this-major-mode-requires-vi-state): * lisp/emacs-lisp/easy-mmode.el (easy-mmode--globalized-predicate-p): * lisp/dired.el (dired-hide-details-mode, dired-click-to-select-mode): * lisp/calendar/todo-mode.el (todo-reset-nondiary-marker) (todo-reset-done-string, todo-reset-comment-string): * lisp/vc/vc.el (vc-deduce-backend): Use new calling convention for `derived-mode-p` and `provided-mode-derived-p`.
* | (package-quickstart-refresh): Generate marginally more efficient codeAndrea Corallo2023-11-221-2/+2
| | | | | | | | | | * lisp/emacs-lisp/package.el (package-quickstart-refresh): Include only one copy of the file names.
* | * Update 'native-comp-never-optimize-functions' versionAndrea Corallo2023-11-221-1/+1
| | | | | | | | | | * lisp/emacs-lisp/comp-common.el (native-comp-never-optimize-functions): Update version.
* | * Add 'eval' to 'native-comp-never-optimize-functions' (bug#67141)Andrea Corallo2023-11-201-1/+2
| | | | | | | | | | * lisp/emacs-lisp/comp-common.el (native-comp-never-optimize-functions): Add 'eval'.
* | Merge from origin/emacs-29Eli Zaretskii2023-11-181-1/+1
|\| | | | | | | | | | | 32a32853ce9 Typofix in the doc/lispref/modes.texi f98637b51b5 ; Fix 'add-face-text-property' shortdoc 3fff22eb20c Fix spell-checking email message with citations
| * ; Fix 'add-face-text-property' shortdocEshel Yaron2023-11-141-1/+1
| | | | | | | | | | * lisp/emacs-lisp/shortdoc.el (text-properties): Add missing ':no-eval' keyword. (Bug#67138)
* | Merge from origin/emacs-29Eli Zaretskii2023-11-181-2/+9
|\| | | | | | | 5612fd21a05 Add two doc strings to cl-extra.el
| * Add two doc strings to cl-extra.elJeremy Bryant2023-11-121-2/+9
| | | | | | | | | | * lisp/emacs-lisp/cl-extra.el (cl--random-time) (cl-find-class): Add docstrings. (Bug#66949)
* | Avoid loading cl-lib as result of invoking 'load-library'Eli Zaretskii2023-11-181-10/+15
| | | | | | | | | | | | | | | | | | * 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".
* | * lisp/emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates): Add `null`Stefan Monnier2023-11-171-0/+10
| |
* | Merge branch 'derived-mode-add-parents'Stefan Monnier2023-11-165-81/+20
|\ \
| * | Move EIEIO's C3 linearization code to `subr.el`Stefan Monnier2023-11-113-75/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Use new `derived-mode-all/set-parents` functions.Stefan Monnier2023-11-082-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Try and avoid using the `derived-mode-parent` property directly and use the new API functions instead. * lisp/emacs-lisp/derived.el (define-derived-mode): Use `derived-mode-set-parent`. * lisp/loadhist.el (unload--set-major-mode): * lisp/info-look.el (info-lookup-select-mode): * lisp/ibuf-ext.el (ibuffer-list-buffer-modes): * lisp/files.el (dir-locals--get-sort-score): * lisp/emacs-lisp/cl-generic.el (cl--generic-derived-specializers): Use `derived-mode-all-parents`.
* | | Clean-up some native-comp advice special handling.Andrea Corallo2023-11-162-20/+0
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/nadvice.el (advice--add-function): Clean-up nativecomp special handling. * lisp/emacs-lisp/advice.el (ad-add-advice): Likewise.
* | | * lisp/emacs-lisp/nadvice.el (advice--add-function): Move func decl.Andrea Corallo2023-11-161-2/+1
| | |
* | | Don't infinite loop in map-y-or-n-p if at the end of kmacroSpencer Baugh2023-11-151-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)