summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
* Really fix find-func for defgenericLars Ingebrigtsen2022-03-131-1/+1
| | | | | * lisp/emacs-lisp/find-func.el (find-function-regexp): Really add defgeneric.
* Make vtable sorting stableLars Ingebrigtsen2022-03-131-10/+14
| | | | | * lisp/emacs-lisp/vtable.el (vtable--sort): Make the sorting stable.
* Add cl-defgeneric to find-func, tooLars Ingebrigtsen2022-03-131-1/+1
| | | | | * lisp/emacs-lisp/find-func.el (find-function-regexp): Add cl-defgeneric, too (bug#54343).
* Make find-function-regexp also find cl-defun/defmethodLars Ingebrigtsen2022-03-121-0/+1
| | | | | * lisp/emacs-lisp/find-func.el (find-function-regexp): Also find cl-defun and cl-defmethod (bug#54343).
* Fix regression in vtable-goto-objectLars Ingebrigtsen2022-03-091-1/+1
| | | | | * lisp/emacs-lisp/vtable.el (vtable-goto-object): Fix moving to the object.
* (cl-macro-list): Simplify by unifying the variantsStefan Monnier2022-03-071-25/+13
| | | | | | | | * lisp/emacs-lisp/cl-macs.el (cl-macro-list): Add the &whole and the dotted tail cases from `cl-macro-list1`. (cl-macro-list1, cl-define-compiler-macro-list): Delete edebug elem specs. (cl-destructuring-bind, cl-define-compiler-macro): Use `cl-macro-list` instead, now that it covers all the cases we need.
* * lisp/emacs-lisp/seq.el (seq-concatenate): Accept non-`sequencep` sequencesStefan Monnier2022-03-071-0/+1
|
* Restore call to byte-run-strip-symbol-positions in byte-compile-outAlan Mackenzie2022-03-062-1/+7
| | | | | | | | | | Also increment a loop counter. This should fix bug #54248. * lisp/emacs-lisp/byte-run.el (byte-run--strip-vector/record): increment the loop counter 'i' in the main loop. * lisp/emacs-lisp/bytecomp.el (byte-compile-out): call byte-run-strip-symbol-positions on operands which are one-element lists.
* Merge from origin/emacs-28Stefan Kangas2022-03-061-1/+1
|\ | | | | | | | | 0090318c61 * lib-src/seccomp-filter.c (main): Use faccessat2 only if ... 3bb01a499b Fix regression in derived-mode-init-mode-variables
| * Fix regression in derived-mode-init-mode-variablesLars Ingebrigtsen2022-03-041-1/+1
| | | | | | | | | | * lisp/emacs-lisp/derived.el (derived-mode-init-mode-variables): Fix regression caused by lexical-binding derived.el (bug#54240).
* | trace.el: Preserve the line structureStefan Monnier2022-03-041-4/+7
| | | | | | | | | | | | | | | | | | Print newlines appearing inside values (i.e. inside strings) as \n rather than actual newlines so as to avoid messing up the main structure of the trace buffer. * lisp/emacs-lisp/trace.el (trace-entry-message) (trace-exit-message, trace--read-args): Quote newlines
* | Teach Edebug about the special '&whole' syntax for compiler macros.Philipp Stephani2022-03-031-1/+8
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/cl-macs.el (cl-define-compiler-macro-list): New Edebug element specification. (cl-define-compiler-macro): Use it. * test/lisp/emacs-lisp/cl-macs-tests.el (cl-define-compiler-macro/edebug): New unit test.
* | Clean up byte-compile-arglist-warnMattias EngdegÄrd2022-02-281-26/+25
| | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-warn): Remove unnecessary sort (only need min and max). Reduce mutation.
* | Amend byte-run-strip-symbol-positions so that an unexec build buildsAlan Mackenzie2022-02-242-44/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes bug #54098. * lisp/emacs-lisp/byte-run.el (byte-run--strip-list) (byte-run--strip-vector/record): New functions. These alter a list or vector/record structure only where a symbol with position gets replaced by a bare symbol. (byte-run-strip-symbol-positions): Reformulate to use the two new functions. (function-put): No longer strip positions from the second and third arguments. * lisp/emacs-lisp/bytecomp.el (byte-compile-out): Remove the senseless "stripping" of putative symbol positions from OPERAND, which is nil or a number.
* | Don't signal an error on re-builder startup with rx syntaxLars Ingebrigtsen2022-02-221-1/+4
| | | | | | | | | | * lisp/emacs-lisp/re-builder.el (reb-initialize-buffer): Make startup with rx syntax not signal an error (bug#54107).
* | Merge from origin/emacs-28Stefan Kangas2022-02-221-4/+4
|\| | | | | | | | | | | | | | | 666e40a109 Fix 'display-line-numbers-mode' in hide-show buffers 68d134cf0f Don't check whether a deleted window is deletable (Bug#54028) b38223a844 A friendlier error message from image-mode in an empty buffer b7a651ba37 Update to Org 9.5.2-17-gea6b74 3a8c3f7abd ; Don't reference obsolete variables in edebug.el
| * ; Don't reference obsolete variables in edebug.elRaffael Stocker2022-02-201-4/+4
| | | | | | | | | | | | * lisp/emacs-lisp/edebug.el (edebug-mode, edebug-eval-mode): Don't reference obsolete variables in the doc strings. (Bug#54070)
* | Improve vtable :keymap handlingLars Ingebrigtsen2022-02-211-2/+9
| | | | | | | | | | * lisp/emacs-lisp/vtable.el (vtable-map, vtable--make-keymap): Don't alter keymaps passed in, and respect parent keymaps.
* | Make string-pixel-width about 40% fasterLars Ingebrigtsen2022-02-201-1/+4
| | | | | | | | * lisp/emacs-lisp/subr-x.el (string-pixel-width): Speed up.
* | (macroexp-warn-and-return): Fix bug#53618Stefan Monnier2022-02-1910-50/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/macroexp.el (macroexp-warn-and-return): Reorder arguments to preserve compatibility with that of Emacs-28. (macroexp--unfold-lambda, macroexp--expand-all): * lisp/emacs-lisp/pcase.el (pcase-compile-patterns, pcase--u1): * lisp/emacs-lisp/gv.el (gv-ref): * lisp/emacs-lisp/eieio.el (defclass): * lisp/emacs-lisp/eieio-core.el (eieio-oref, eieio-oref-default) (eieio-oset-default): * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): * lisp/emacs-lisp/cl-macs.el (cl-symbol-macrolet, cl-defstruct): * lisp/emacs-lisp/cl-generic.el (cl-defmethod): * lisp/emacs-lisp/byte-run.el (defmacro, defun): * lisp/emacs-lisp/bindat.el (bindat--type): Adjust accordingly.
* | Add column sorting order indicators to vtableLars Ingebrigtsen2022-02-191-9/+29
| | | | | | | | | | | | * lisp/emacs-lisp/vtable.el (vtable--indicator): New function. (vtable--insert-header-line): Use it to display sorting order indicators.
* | Make string-pixel-width slightly speedierLars Ingebrigtsen2022-02-191-3/+5
| | | | | | | | | | * lisp/emacs-lisp/subr-x.el (string-pixel-width): Speed up string-pixel-width in the zero-length string case.
* | Add a new library to format variable-pitch tablesLars Ingebrigtsen2022-02-191-0/+731
| | | | | | | | | | | | * doc/misc/vtable.texi (Index): New manual. * lisp/emacs-lisp/vtable.el: New library.
* | Fix symbols with position appearing in the output of `compile-defun'Alan Mackenzie2022-02-192-69/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This happened with the tags of a condition-case. Also fix the detection of circular lists while stripping the positions from symbols with position. * lisp/emacs-lisp/byte-run.el (byte-run--circular-list-p): Remove. (byte-run--strip-s-p-1): Write a value of t into a hash table for each cons or vector/record encountered. (This is to prevent loops with circular structures.) This is now done for all arguments, not just those detected as circular lists. * lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-defvar) (byte-compile-form, byte-compile-dynamic-variable-op) (byte-compile-constant, byte-compile-push-constant): Remove redundant calls to `bare-symbol'. (byte-compile-lambda): call `byte-run-strip-symbol-positions' on the arglist. (byte-compile-out): call `byte-run-strip-symbol-positions' on the operand. This is the main call to this function in bytecomp.el. * src/fns.c (hashfn_eq): Strip the position from an argument which is a symbol with position. (hash_lookup): No longer strip a position from a symbol with position. (sxhash_obj): Add handling for symbols with position, substituting their bare symbols when symbols with position are enabled.
* | Resurrect innocent joke in byte-opt.elEli Zaretskii2022-02-171-1/+5
| | | | | | | | | | * lisp/emacs-lisp/byte-opt.el: Resurrect innocent joke in a comment.
* | Fix or remove outdated commentsMattias EngdegÄrd2022-02-171-9/+0
| | | | | | | | | | | | | | | | * src/eval.c (funcall_lambda): Rewrite obsolete comment. * src/bytecode.c (exec_byte_code): Remove lying comment and unneeded #define. * lisp/emacs-lisp/byte-opt.el: Remove car. Keep pig. (byte-compile-log-lap-1): Remove obsolete and irrelevant comment.
* | Improve interaction between track-mouse and edebugLars Ingebrigtsen2022-02-121-0/+7
| | | | | | | | | | * lisp/emacs-lisp/edebug.el (edebug--display-1): Work around `track-mouse' oddity (bug#675).
* | Autoload package-installed-pCorwin Brust2022-02-101-0/+1
| | | | | | | | | | | | | | * lisp/emacs-lisp/package.el (package-installed-p): Add autoload cookie. (Bug#53885) Copyright-paperwork-exempt: yes
* | Merge from origin/emacs-28Stefan Kangas2022-02-101-12/+14
|\| | | | | | | | | 69e82968d7 Fix integer arithmetic miss-compilation (bug#53451) 31af9bca99 Mark flymake as compatible with emacs-26.1
| * Fix integer arithmetic miss-compilation (bug#53451)Andrea Corallo2022-02-091-12/+14
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/comp-cstr.el (comp-cstr-set-range-for-arithm): When one of the two sources is negated revert to set dst as number. * test/src/comp-tests.el (comp-tests-type-spec-tests): Add test to verify this is effective.
| * Fix copyright-find-copyright when searching from the endLars Ingebrigtsen2022-01-261-1/+3
| | | | | | | | | | | | | | * lisp/emacs-lisp/copyright.el (copyright-find-copyright): Make the double check also work when searching from the end (bug#7179). Do not merge to master.
| * Fix copyright.el comment and add a testLars Ingebrigtsen2022-01-261-1/+1
| | | | | | | | | | | | | | * lisp/emacs-lisp/copyright.el (copyright-find-copyright): Fix comment (bug#7179). Do not merge to master.
| * Fix memory-report-object-size to initialize memory-report--type-sizeSergey Vinokurov2022-01-211-1/+1
| | | | | | | | | | | | | | * lisp/emacs-lisp/memory-report.el (memory-report-object-size): Allow using function directly (bug#53310). Do not merge to master.
| * * Fix native comp for non trivial function names (bug#52833)Andrea Corallo2022-01-171-1/+3
| | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/comp.el (comp-c-func-name): Fix native compilation for functions with function names containing non trivial characters (bug#52833). This commit is the backport of e7699bf290. Do not merge to master
* | Allow showing show-paren context in an overlayTassilo Horn2022-02-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/paren.el (show-paren-context-when-offscreen): Add new possibility `overlay'. (show-paren--context-overlay): New defvar. (show-paren--delete-context-overlay): New function. (show-paren--show-context-in-overlay): New function. (show-paren-function): Handle the new `overlay' case. * lisp/emacs-lisp/eldoc.el (eldoc-display-message-no-interference-p): There's no interference if `show-paren-context-when-offscreen' is overlay or child-frame.
* | lisp-mnt, checkdoc: Reduce run-time dependenciesStefan Monnier2022-02-072-29/+37
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/lisp-mnt.el: Don't require `mail-parse` at top-level. (lm-crack-address): Require it here instead. * lisp/emacs-lisp/checkdoc.el (dired): Don't load at run-time. (checkdoc-dired): Add corresponding `declare-function`.
* | Fix eval-tests/backtrace-in-batch-mode testStefan Monnier2022-02-061-4/+5
| | | | | | | | | | * lisp/emacs-lisp/debug-early.el (debug-early-backtrace): Fix the zero-arg case.
* | (debug-early-backtrace): Tweak the non-evald outputStefan Monnier2022-02-061-0/+2
| | | | | | | | | | * lisp/emacs-lisp/debug-early.el (debug-early-backtrace): Make the non-evald output more like what is used in `debug.el`.
* | (debug-early-backtrace): Tweak the non-evald outputStefan Monnier2022-02-061-12/+9
| | | | | | | | | | * lisp/emacs-lisp/debug-early.el (debug-early-backtrace): Make the non-evald output more like what is used in `debug.el`.
* | Improve the elp-instrument-package doc stringLars Ingebrigtsen2022-02-061-1/+6
| | | | | | | | | | * lisp/emacs-lisp/elp.el (elp-instrument-package): Note the effect of loading further files (bug#13252).
* | Add new user option 'find-library-include-other-files'Lars Ingebrigtsen2022-02-061-7/+36
| | | | | | | | | | | | | | * lisp/emacs-lisp/find-func.el (read-library-name--find-files): New function (bug#15735). (read-library-name): Use it. (find-library-include-other-files): New user option.
* | * lisp/emacs-lisp/debug-early.el: Improve the documentationAlan Mackenzie2022-02-051-9/+19
| |
* | (with-demoted-errors): Warn on missing `format` argStefan Monnier2022-02-041-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `format` arg has been mandatory for a while, but the backward compatibility code that handled the case of a missing `format` arg made it hard to notice when using the old calling convention. * lisp/subr.el (with-demoted-errors): Warn on missing `format` arg. * lisp/emacs-lisp/smie.el (smie-indent--separator-outdent): Don't abuse `with-demoted-errors`. (smie-indent-line, smie-auto-fill): * test/lisp/emacs-lisp/ert-tests.el (ert-test-with-demoted-errors): * lisp/vc/vc-hooks.el (vc-refresh-state): * lisp/vc/vc-annotate.el (vc-annotate-background-mode): * lisp/vc/diff-mode.el (diff-syntax-fontify-hunk): * lisp/textmodes/reftex-toc.el (reftex-re-enlarge): * lisp/progmodes/sh-script.el (sh-smie-sh-rules): * lisp/progmodes/octave.el (inferior-octave-startup): * lisp/pcmpl-gnu.el (pcmpl-gnu-make-all-targets): * lisp/org/org-refile.el (org-refile): * lisp/org/org-capture.el (org-capture-store-last-position): * lisp/nxml/nxml-mode.el (nxml-mode): * lisp/notifications.el (notifications-notify): * lisp/gnus/mm-view.el (mm-display-inline-fontify): * lisp/finder.el (finder-unload-function): * lisp/files.el (safe-local-variable-p, backup-buffer-copy * lisp/autorevert.el (auto-revert-notify-handler): Pass `format` arg to `with-demoted-errors`.
* | * Have `null' and `not' explicit in LIMPLE so we inline themAndrea Corallo2022-02-041-1/+3
| | | | | | | | | | * lisp/emacs-lisp/comp.el (comp-limplify-lap-inst): Generate explicit `eq' call in LIMPLE for LAP opcode 'not'.
* | New file lisp/emacs-lisp/debug-early.el for backtraces in early bootstrapAlan Mackenzie2022-02-021-0/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is also used in batch mode in general. * lisp/debug-early.el (debug-early-backtrace, debug-early): New functions. * lisp/loadup.el (top level): Load debug-early.el as first file. * src/eval.c (signal_or_quit): Remove the condition in the batch mode section of not being in dumping or bootstrap, since it is no longer needed. Test that 'debug-early's symbol-function is bound. Ensure there is enough working space in specpdl and eval_depth. (syms_of_eval): New DEFSYM for Qdebug_early. Initialise Vdebugger to Qdebug_early rather than Qnil.
* | Fix bug with M-x compile-defun in a defconst/defvarAlan Mackenzie2022-02-021-9/+9
| | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (compile-defun): Have symbols-with-pos-enabled bound to non-nil when the eval takes place.
* | Remove extra \= from obsoletion messageAndreas Schwab2022-02-012-5/+5
| | | | | | | | | | | | | | * lisp/emacs-lisp/eieio.el (defclass): Remove \= from obsoletion message. * lisp/emacs-lisp/eieio-core.el (eieio-defclass-autoload) (eieio-defclass-internal): Likewise.
* | (byte-compile-eval): Adjust to changes in `load-history`Stefan Monnier2022-01-312-18/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `function-history` patch introduced a regression which caused spurious compiler warnings. Fix it. The new code also fixes a bug in the old code, thus causing some new non-spurious warnings. Fix them as well. * lisp/emacs-lisp/bytecomp.el (byte-compile-eval): Adjust to changes in `load-history`. * lisp/gnus/gnus-group.el (nnrss-discover-feed) (nnrss-save-server-data): Use `declare-function`. * lisp/cedet/semantic/wisent/comp.el (wisent-defcontext) (wisent-with-context): * lisp/emacs-lisp/comp.el (comp-op-case): Silence compiler warning.
* | Factor out function to check for clang in testsStefan Kangas2022-01-311-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also stops a flymake test from failing on my machine. * lisp/emacs-lisp/ert-x.el (ert-gcc-is-clang-p): New function factored out from ... * test/lisp/progmodes/flymake-tests.el (flymake-tests--gcc-is-clang): * test/lisp/cedet/semantic/bovine/gcc-tests.el (semantic-gcc-test-output-parser-this-machine): ... here. * test/lisp/progmodes/flymake-tests.el (different-diagnostic-types) (included-c-header-files): * test/lisp/cedet/semantic/bovine/gcc-tests.el (semantic-gcc-test-output-parser-this-machine): Use above new function.
* | Fix with-suppressed-warnings edebug specLars Ingebrigtsen2022-01-311-1/+1
| | | | | | | | | | * lisp/emacs-lisp/byte-run.el (with-suppressed-warnings): Fix edebug spec.