summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
...
| * ; Fix typosStefan Kangas2022-12-163-9/+9
| |
* | Warn about unmatchable constant args to `eq`, `memq` etcMattias Engdegård2022-12-141-3/+51
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | Add a byte-compiler warning about attempts to compare literal values with undefined identity relation to other values. For example: (eq x 2.0) (memq x '("a" (b) [c])) Such incomparable values include all literal conses, strings, vectors, records and (except for eql and memql) floats and bignums. The warning currently applies to eq, eql, memq, memql, assq, rassq, remq and delq. * lisp/emacs-lisp/bytecomp.el (bytecomp--dodgy-eq-arg) (bytecomp--value-type-description, bytecomp--arg-type-description) (bytecomp--warn-dodgy-eq-arg, bytecomp--check-eq-args) (bytecomp--check-memq-args): New. (eq, eql, memq, memql, assq, rassq, remq, delq): Set compiler-macro property. * lisp/emacs-lisp/byte-run.el (with-suppressed-warnings): Amend doc string. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp--with-warning-test): Fix text-quoting-style and expand re-warning so that it doesn't need to be a literal. (bytecomp-warn-dodgy-args-eq, bytecomp-warn-dodgy-args-memq): New tests.
* Fix pcase rx patterns using rx-let bindings (bug#59814)Mattias Engdegård2022-12-111-0/+6
| | | | | | | | Reported by Daniel Pittman. * lisp/emacs-lisp/rx.el (rx): Move binding of rx--local-definitions... (rx--to-expr): ...here. * test/lisp/emacs-lisp/rx-tests.el (rx-let-pcase): New test.
* ; Normalize GPLv3 license statements in new filesStefan Kangas2022-12-091-7/+5
|
* Fix 'add-display-text-property' when OBJECT is non-nilEli Zaretskii2022-12-061-1/+10
| | | | | | | | * lisp/emacs-lisp/subr-x.el (add-display-text-property): Fix the case where OBJECT is not nil. (Bug#59857) * test/lisp/emacs-lisp/subr-x-tests.el (subr-x-test-add-display-text-property): Add test for this case.
* Fix and expand tests broken by commit 2772ebe366 of 2022-11-28Juanma Barranquero2022-12-031-24/+31
| | | | | | | | | | * test/lisp/emacs-lisp/comp-tests.el (with-test-native-compile-prune-cache) (test-native-compile-prune-cache) (test-native-compile-prune-cache/delete-only-eln) (test-native-compile-prune-cache/dont-delete-in-parent-of-cache): Check that the last directory in `native-comp-eln-load-path' is not affected by `native-compile-prune-cache'.
* ; Fix typos (don't abbreviate "with" or "without")Stefan Kangas2022-12-011-1/+1
|
* ; Fix typos (prefer US spelling)Stefan Kangas2022-11-181-1/+1
|
* Add missing elpa-package.eld to package test resourcesPhilip Kaludercic2022-11-176-0/+13
|
* Fix &key parameters called without arguments (bug#58714)Gerd Möllmann2022-11-111-0/+6
| | | | | | * lisp/emacs-lisp/cl-macs.el (cl--do-arglist): Check for missing argument. * test/lisp/emacs-lisp/cl-macs-tests.el (cl-&key-arguments): New test.
* cconv.el: Fix regression in cconv-tests-interactive-closure-bug51695Stefan Monnier2022-10-281-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | The new code to make interpreted closures safe-for-space introduced a regression in `cconv-tests-interactive-closure-bug51695`, only seen when using TEST_LOAD_EL. A few other issues were found and fixed along the way. * lisp/emacs-lisp/cconv.el (cconv-fv): Change calling convention and focus on finding the free variables. (cconv-make-interpreted-closure): New function. * lisp/loadup.el: Use `compiled-function-p` rather than `byte-code-function-p` so we also use safe-for-space interpreted closures when we build with native compilation. (internal-make-interpreted-closure-function): Use `cconv-make-interpreted-closure`. * src/eval.c (syms_of_eval): Rename `internal-filter-closure-env-function` to `internal-make-interpreted-closure-function`. (Ffunction): Let that new var build the actual closure. * test/lisp/emacs-lisp/cconv-tests.el (cconv-tests-interactive-closure-bug51695): Test specifically the interpreted case.
* Fix failing test for package HierarchyWamm K. D2022-10-281-1/+1
| | | | | | | This fixes a typo in one of the tests of Hierarchy which was causing the test to fail. * test/lisp/emacs-lisp/hierarchy-tests.el (hierarchy-delayed-add-trees): Fix typo.
* Allow Hierarchy to delay computation of childrenWamm K. D2022-10-271-0/+143
| | | | | | | | | | | | | | | | This adds an option to allow callers to specify that computing the children of the hierarchy should be delayed to when the user calls for them, by utilizing the tree-widget :expander property. * lisp/emacs-lisp/hierarchy.el (hierarchy-add-tree) (hierarchy-add-trees): Add parameter 'delay-children-p'. * lisp/emacs-lisp/hierarchy.el (hierarchy--create-delayed-tree-widget): Add function. * lisp/emacs-lisp/hierarchy.el (hierarchy-convert-to-tree-widget): Utilize ':expander' if delaying children. (Bug#55900) * test/lisp/emacs-lisp/hierarchy-tests.el: Add tests for delayed-children functionality.
* Audit some plist uses with new predicate argumentBasil L. Contovounesios2022-10-223-58/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/lists.texi (Plist Access): Improve description of default predicate. * lisp/emacs-lisp/cl-extra.el (cl-getf, cl--set-getf): Assume plist-member always returns a cons. * lisp/emacs-lisp/gv.el (plist-get): Support new optional predicate argument (bug#47425#91). * lisp/emacs-lisp/map.el: Bump minor version. (map--dispatch): Remove now that bug#58563 is fixed. Break two remaining uses out into corresponding cl-defmethods. (map--plist-p): Add docstring. (map--plist-has-predicate, map--plist-member-1, map--plist-member) (map--plist-put-1, map--plist-put): New definitions for supporting predicate argument backward compatibly. (map-elt): Fix generalized variable getter under a predicate (bug#58531). Use predicate when given a plist. (map-put): Avoid gratuitous warnings when called without the hidden predicate argument. Improve obsoletion message. (map-put!): Use predicate when given a plist. (map-contains-key): Ditto. Declare forgotten advertised-calling-convention (bug#58531#19). (map--put): Group definition in file together with that of map-put!. * lisp/files-x.el (connection-local-normalize-criteria): Simplify using mapcan + plist-get. * lisp/net/eudc.el (eudc--plist-member): New convenience function. (eudc-plist-member, eudc-plist-get, eudc-lax-plist-get): Use it instead of open-coding plist-member. * src/fns.c (Fplist_get, plist_get, Fplist_put, plist_put): Pass the plist element as the first argument to the predicate, for consistency with assoc + alist-get. (Fplist_member, plist_member): Move from widget to plist section. Open-code the EQ case in plist_member, and call it from Fplist_member in that case, rather than the other way around. * test/lisp/apropos-tests.el (apropos-tests-format-plist): Avoid polluting obarray. * test/lisp/emacs-lisp/cl-extra-tests.el (cl-getf): Extend test with generalized variables, degenerate plists, and improper lists. * test/lisp/emacs-lisp/gv-tests.el: Byte-compile file; in the meantime bug#24402 seems to have been fixed or worked around. (gv-setter-edebug): Inhibit printing messages. (gv-plist-get): Avoid modifying constant literals. Also test with a predicate argument. * test/lisp/emacs-lisp/map-tests.el (with-maps-do): Simplify docstring. (test-map-elt-testfn): Rename... (test-map-elt-testfn-alist): ...to this. Also test with a predicate argument. (test-map-elt-testfn-plist, test-map-elt-gv, test-map-elt-signature) (test-map-put!-plist, test-map-put!-signature) (test-map-contains-key-signature, test-map-plist-member) (test-map-plist-put): New tests. (test-map-contains-key-testfn): Also test with a predicate argument. (test-map-setf-alist-overwrite-key, test-map-setf-plist-insert-key) (test-map-setf-plist-overwrite-key): Avoid modifying constant literals. (test-hash-table-setf-insert-key) (test-hash-table-setf-overwrite-key): Fix indentation. (test-setf-map-with-function): Make test more precise. * test/lisp/net/eudc-tests.el: New file. * test/lisp/subr-tests.el (test-plistp): Extend test with circular list. * test/src/fns-tests.el (test-cycle-equal, test-cycle-nconc): Move from plist section to circular list section. (plist-put/odd-number-of-elements): Avoid modifying constant literals. (plist-member/improper-list): Simplify. (test-plist): Move to plist section. Also test with a predicate argument.
* Bindat (src, strz): Operate on vectors tooNacho Barrientos2022-10-211-1/+18
| | | | | | | | | | Copyright-paperwork-exempt: yes * lisp/emacs-lisp/bindat.el (bindat--unpack-str, bindat--unpack-strz): Fix the non-string case. * test/lisp/emacs-lisp/bindat-tests.el (bindat-test--strz-array-unpack) (bindat-test--str-simple-array-unpack,bindat-test--str-combined-array-unpack): New tests.
* Silence recent comp-tests.el lexvar warningsBasil L. Contovounesios2022-10-171-19/+23
| | | | | | | | | | * test/lisp/emacs-lisp/comp-tests.el: Mark used native-compile variables as special to pacify unknown lexvar warnings in the default build. (with-test-native-compile-prune-cache): Instrument macro arguments for debugging and indent conventionally. Reindent all callers. (test-native-compile-prune-cache/dont-delete-in-parent-of-cache): Simplify file name expansion.
* Don't prune *.eln files in parent of eln-load-pathStefan Kangas2022-10-171-0/+11
| | | | | | | | * lisp/emacs-lisp/comp.el (native-compile-prune-cache): Don't prune *.eln files in parent directory of `native-comp-eln-load-path'. * test/lisp/emacs-lisp/comp-tests.el (test-native-compile-prune-cache/dont-delete-in-parent-of-cache): New test.
* Add tests for native-compile-prune-cacheStefan Kangas2022-10-171-0/+62
| | | | * test/lisp/comp-tests.el: New file.
* cl-generic: Fix `advertised-calling-convention` declarationsStefan Monnier2022-10-161-0/+22
| | | | | | | | | | | | | | | * lisp/emacs-lisp/cl-generic.el (cl-generic-define-method): Preserve the `advertised-calling-convention`, if any (bug#58563). * lisp/subr.el (declare): Warn when we hit this. * lisp/emacs-lisp/byte-run.el (get-advertised-calling-convention): New fun. * lisp/progmodes/elisp-mode.el (elisp-get-fnsym-args-string): * lisp/help-fns.el (help-fns--signature): * lisp/emacs-lisp/bytecomp.el (byte-compile-fdefinition): Use it. * test/lisp/emacs-lisp/cl-generic-tests.el (cl-generic-tests--acc): New fun. (cl-generic-tests--advertised-calling-convention-bug58563): New test.
* package.el: Understand a few more variations in tarball formatsStefan Monnier2022-10-083-2/+22
| | | | | | | | | | * lisp/emacs-lisp/package.el (package-untar-buffer): Fix thinko. (package-tar-file-info): Handle the case where the first file is in a subdirectory. * test/lisp/emacs-lisp/package-tests.el (package-test-bug58367): New test. * test/lisp/emacs-lisp/package-resources/ustar-withsub-0.1.tar: * test/lisp/emacs-lisp/package-resources/v7-withsub-0.1.tar: New files.
* Replace aging OpenPGP artifacts in the package-resources tests.Justus Winter2022-10-065-31/+28
| | | | | | | | | | | This replaces the old OpenPGPv4 key that is used in the test suite with a more modern OpenPGPv4 key. The key is the Alice key from https://datatracker.ietf.org/doc/draft-bre-openpgp-samples/. All cryptographic artifacts in the test suite are updated accordingly. Having old cryptographic artifacts in the test suite presents a problem once the old algorithms are rejected by contemporary implementations.
* Add 'seq-keep'Lars Ingebrigtsen2022-10-041-0/+6
| | | | | * doc/lispref/sequences.texi (Sequence Functions): Document it. * lisp/emacs-lisp/seq.el (seq-keep): New function (bug#58278).
* cconv.el: Fix interactive closure bug#51695Stefan Monnier2022-09-231-0/+10
| | | | | | | | | | | | | | | | | | | | Make cconv.el detect when a closure's interactive form needs to capture variables from the context and tweak the code accordingly if so. * lisp/emacs-lisp/cconv.el (cconv--interactive-form-funs): New var. (cconv-convert): Handle the case where the interactive form captures vars from the surrounding context. Remove left over handling of `declare` which was already removed from the cconv-analyze` phase. (cconv-analyze-form): Adjust analysis of interactive forms accordingly. * lisp/emacs-lisp/oclosure.el (cconv--interactive-helper): New type and function. * lisp/simple.el (function-documentation, oclosure-interactive-form): Add methods for it. * test/lisp/emacs-lisp/cconv-tests.el (cconv-tests-interactive-closure-bug51695): New test.
* Don't rewrite `set` to `setq` of lexical variablesMattias Engdegård2022-09-222-6/+12
| | | | | | | | | | | | | | | Only perform the rewrite (set 'VAR X) -> (setq VAR X) for dynamic variables, as `set` isn't supposed to affect lexical vars (and never does so when interpreted). * lisp/emacs-lisp/byte-opt.el (byte-optimize-set): * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--xx): New. (bytecomp-tests--test-cases): Add test cases. * test/lisp/emacs-lisp/bytecomp-resources/warn-variable-set-nonvariable.el: Remove obsolete test.
* Improve check for misleading 'cl-case' cases (Bug#57915).Philipp Stephani2022-09-191-0/+11
| | | | | | * lisp/emacs-lisp/cl-macs.el (cl-case): Check that the case is of the form (quote FOO), not just (quote). * test/lisp/emacs-lisp/cl-macs-tests.el (cl-case-no-warning): New unit test.
* Accept more wide function signatures in docstringsStefan Kangas2022-09-162-0/+8
| | | | | | | | | * test/lisp/emacs-lisp/bytecomp-tests.el ("warn-wide-docstring-ignore-function-signature.el"): New test. * lisp/emacs-lisp/bytecomp.el (byte-compile--wide-docstring-p): Make regexp more allowing to silence warning. * test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-ignore-function-signature.el: New file.
* Fix recently-added cl-macs testsLars Ingebrigtsen2022-09-141-32/+34
| | | | | * test/lisp/emacs-lisp/cl-macs-tests.el (cl-case-error) (cl-case-warning): Fix warning matches.
* Have 'cl-case' warn about suspicious casesPhilipp Stephani2022-09-131-0/+32
| | | | | | | | | * lisp/emacs-lisp/cl-macs.el (cl-case): Warn if the user passes a nil key list (which would never match). Warn about quoted symbols that should probably be unquoted. * test/lisp/emacs-lisp/cl-macs-tests.el (cl-case-warning): New unit test (bug#51368).
* Signal an error if a fallback cl-case is misplacedPhilipp Stephani2022-09-131-0/+11
| | | | | | | | | * lisp/emacs-lisp/cl-macs.el (cl-case): Warn if the user passes a nil key list (which would never match). Warn about quoted symbols that should probably be unquoted. * test/lisp/emacs-lisp/cl-macs-tests.el (cl-case-warning): New unit test (bug#51368).
* ert-x: New `ert-with-test-buffer-selected' convenience macroRichard Hansen2022-09-111-0/+15
| | | | | | | | | * lisp/emacs-lisp/ert-x.el (ert-with-test-buffer-selected): New convenience macro that extends `ert-with-test-buffer' by displaying the test buffer in a temporary selected window. This makes it easier to simulate user input in the body via `execute-kbd-macro'. * test/lisp/emacs-lisp/ert-x-tests.el (ert-test-test-buffer-selected/*): Add tests.
* Fix "warn-lambda-malformed-interactive-spec.el" even moreLars Ingebrigtsen2022-09-091-1/+1
| | | | | * test/lisp/emacs-lisp/bytecomp-tests.el ("warn-lambda-malformed-interactive-spec.el"): Adjust test further.
* Don't bind `s' in the normal backtrace mapLars Ingebrigtsen2022-09-091-1/+2
| | | | | | | | | * lisp/emacs-lisp/backtrace.el (backtrace-mode-map): Don't bind the "s" command, because it's meaningless outside modes that have set the backtrace-goto-source-functions variable (and only edebug does that) (bug#57674). * lisp/emacs-lisp/edebug.el (edebug-pop-to-backtrace): Use it. (edebug-backtrace-mode-map, edebug-backtrace-mode): New mode.
* Update a bytecomp testLars Ingebrigtsen2022-09-091-1/+1
| | | | | | * test/lisp/emacs-lisp/bytecomp-tests.el ("warn-lambda-malformed-interactive-spec.el"): Update test to code change.
* test: Remove redundant "" arg to `mapconcat`Stefan Monnier2022-09-081-1/+1
| | | | | | | | | | | | | | | | | | | * test/src/process-tests.el (process-test-stderr-filter): * test/src/print-tests.el (print-tests-continuous-numbering): * test/src/fns-tests.el (fns-tests-mapconcat): * test/src/data-tests.el (test-bool-vector-to-hex-string): * test/src/casefiddle-tests.el (casefiddle-tests-char-properties) (casefiddle-tests-case-table, casefiddle-tests-casing-character): * test/lisp/tabify-tests.el (tabify-tests--test-changes): * test/lisp/subr-tests.el (subr-tests-bug22027): * test/lisp/sort-tests.el (sort-tests-random-word): * test/lisp/net/hmac-md5-tests.el (hmac-md5-test-encode-string): * test/lisp/md4-tests.el (md4-tests-digest->hex): * test/lisp/emacs-lisp/cl-extra-tests.el (cl-extra-test-map): * test/lisp/dired-tests.el (dired-test-directory-files): * test/lisp/char-fold-tests.el (char-fold--random-word): * test/lisp/ansi-color-tests.el (ansi-color-incomplete-sequences-test): Remove redundant "" arg to `mapconcat`.
* cl-symbol-macrolet: Fix recent regressionStefan Monnier2022-09-062-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recent fix for bug#57397 introduced a regression, breaking the `cl-lib-symbol-macrolet-hide` test. It turned out that the origin of the problem was that `gv.el` uses `macroexpand-1` which does not (can't) use `macroexpand` but `cl-symbol-macrolet` failed to advise `macroexpand-1` the way it advised `macroexpand`. To fix this, we change `cl-symbol-macrolet` so it advises both, and we do that with a new `macroexpand` advice which delegates the bulk of the work to `macroexpand-1`. Along the way, I bumped into another bug in the interaction between `cl-letf` and `cl-symbol-macrolet`, which I tried to fix in `cl-letf`. I hear the war on `cl-symbol-macrolet` was a failure. Maybe ... just say no? * lisp/emacs-lisp/cl-macs.el (cl--sm-macroexpand-1): New function, extracted from `cl--sm-macroexpand`. (cl--sm-macroexpand): Rewrite completely. (cl-symbol-macrolet): Advise both `macroexpand` and `macroexpand-1`. (cl--letf): Don't use the "simple variable" code for symbol macros. * test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-symbol-macrolet-hide): Revert last change because the test was right. * test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-test--symbol-macrolet): Add a test case.
* Disable failing cl-lib-symbol-macrolet-hide test for nowLars Ingebrigtsen2022-09-061-0/+3
| | | | | * test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-symbol-macrolet-hide): Disable until code is fixed.
* Add new function `seq-positions'Damien Cassou2022-09-041-0/+7
| | | | | | | | | | | * doc/lispref/sequences.texi (Sequence Functions): Document it. * lisp/emacs-lisp/seq.el (seq-positions): New function. * lisp/emacs-lisp/shortdoc.el (sequence): Mention it. * test/lisp/emacs-lisp/seq-tests.el (test-seq-positions): Test it (bug#57548).
* Add new function `seq-remove-at-position'Damien Cassou2022-09-041-0/+8
| | | | | | | | | | | * doc/lispref/sequences.texi (Sequence Functions): Document it. * lisp/emacs-lisp/seq.el (seq-remove-at-position): New function. * lisp/emacs-lisp/shortdoc.el (sequence): Mention it. * test/lisp/emacs-lisp/seq-tests.el (test-seq-remove-at-position): Test it.
* gv.el and cl-macs.el: Fix bug#57397Stefan Monnier2022-09-031-1/+14
| | | | | | | | | * lisp/emacs-lisp/gv.el (gv-get): Obey symbol macros. * lisp/emacs-lisp/cl-macs.el (cl--letf): Remove workaround placed to try and handle symbol macros. * test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-test--symbol-macrolet): Add new testcase.
* Disable a lisp-mode test that now failsLars Ingebrigtsen2022-08-231-10/+12
| | | | | * test/lisp/emacs-lisp/lisp-mode-tests.el (test-lisp-current-defun-name): Comment-out now-failing tests.
* Prefer pos-bol and pos-eol in testsStefan Kangas2022-08-212-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/calendar/todo-mode-tests.el (todo-test-toggle-item-header02, todo-test-edit-item-date-month) (todo-test-multiline-item-indentation-1) (todo-test-multiline-item-indentation-2) (todo-test-multiline-item-indentation-3): * test/lisp/cedet/semantic-utest-ia.el (semantic-ia-utest-buffer) (semantic-sr-utest-buffer-refs): * test/lisp/cedet/semantic-utest.el (semantic-utest-kill-indicator) (semantic-utest-unkill-indicator): * test/lisp/dired-tests.el (dired-test-bug27968): * test/lisp/emacs-lisp/backtrace-tests.el (backtrace-tests--verify-single-and-multi-line): * test/lisp/emacs-lisp/find-func-tests.el (find-func-tests--find-library-verbose): * test/lisp/erc/erc-tests.el (erc-ring-previous-command) (erc-log-irc-protocol): * test/lisp/gnus/message-tests.el (message-mode-propertize): * test/lisp/info-xref-tests.el (info-xref-test-emacs-manuals): * test/lisp/mail/footnote-tests.el (footnote-tests-same-place): * test/lisp/progmodes/elisp-mode-tests.el (elisp-shorthand-completion-at-point): * test/lisp/progmodes/f90-tests.el (f90-test-bug38415): * test/lisp/progmodes/python-tests.el (python-indent-electric-comma-inside-multiline-string) (python-indent-electric-comma-after-multiline-string) (python-indent-electric-colon-1, python-indent-electric-colon-2) (python-indent-electric-colon-3, python-indent-electric-colon-4) (python-mark-defun-2, python-mark-defun-3, python-mark-defun-4) (python-mark-defun-5, python-nav-end-of-defun-2) (python-nav-end-of-statement-1, python-nav-end-of-block-1) (python-indent-dedent-line-backspace-2) (python-indent-dedent-line-backspace-3) (python-eldoc--get-symbol-at-point-1) (python-info-beginning-of-statement-p-1) (python-info-beginning-of-statement-p-2): * test/lisp/replace-tests.el (replace-occur-revert-bug32543) (replace-occur-revert-bug32987): * test/lisp/simple-tests.el (simple-delete-indentation-boundaries) (simple-delete-indentation-region) (line-number-at-pos-in-narrow-buffer) (line-number-at-pos-keeps-restriction): * test/lisp/textmodes/css-mode-tests.el (css-mode-test-selectors) (scss-mode-test-selectors): * test/lisp/textmodes/fill-tests.el (fill-test-unbreakable-paragraph) (fill-test-breakable-paragraph): * test/lisp/time-stamp-tests.el (time-stamp-custom-pattern): * test/src/lread-tests.el (lread-tests--last-message): * test/src/process-tests.el (set-process-filter-t): * test/src/undo-tests.el (undo-test-skip-invalidated-markers): Prefer pos-bol and pos-eol.
* Further seq-uniq speed-ups for listsLars Ingebrigtsen2022-08-121-1/+6
| | | | | * lisp/emacs-lisp/seq.el (seq-uniq): Speed up more for long lists (bug#57079).
* Add a faster seq-uniq for listsLars Ingebrigtsen2022-08-091-0/+13
| | | | | * lisp/emacs-lisp/seq.el (seq-uniq): Add a faster method for lists (bug#57079).
* Make which-func-mode output less junkLars Ingebrigtsen2022-08-081-0/+23
| | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-current-defun-name): Use edebug specs to find the name (if they exist), and default to returning the top-level symbol if there isn't a define-like form (bug#49592).
* * test/lisp/emacs-lisp/nadvice-tests.el: Re-add no-byte-compile.Stefan Kangas2022-08-081-0/+4
|
* Remove no-byte-compile cookie from some librariesStefan Kangas2022-08-082-8/+0
| | | | | | | | | | | This gives us back byte-compiler warnings for these files. * lisp/mh-e/mh-acros.el: * test/lisp/comint-tests.el: * test/lisp/emacs-lisp/nadvice-tests.el: * test/lisp/emacs-lisp/syntax-tests.el: * test/lisp/xml-tests.el: * test/src/font-tests.el: Remove no-byte-compile cookie. * test/src/font-tests.el (font-parse-explain): Fix warning.
* Consider built-in packages to be installedMatt Armstrong2022-08-021-0/+15
| | | | | * lisp/emacs-lisp/package.el (package-installed-p): Check for built-in packages before initialization. (bug#56877).
* Add support for user-customizable iconsLars Ingebrigtsen2022-07-281-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/custom.texi (Specific Customization): Mention it. * doc/emacs/display.texi (Icons): New node. * doc/lispref/display.texi (Icons): New node. * lisp/button.el (buttonize): (button--properties, buttonize-region): Allow not overriding faces. * lisp/cus-edit.el (custom-save-all): Save icons. (custom-icon): New widget. (custom-icon-value-create, custom-toggle-hide-icon) (custom--icons-widget-value, custom-icon-set): Helper functions for the widget. (customize-icon): Main command. (custom-icon-state-set, custom-icon-state): Helper functions. (custom-theme-set-icons): Function to be used by theme writers. (custom-set-icons): Function to be used in .emacs. (custom-save-icons): New function. * lisp/custom.el (custom-push-theme): Add icons. * lisp/emacs-lisp/icons.el: New file. * test/lisp/emacs-lisp/icons-tests.el: Add some tests.
* Fix off-by-one error in string-truncate-leftLars Ingebrigtsen2022-07-231-0/+5
| | | | | * lisp/emacs-lisp/subr-x.el (string-truncate-left): Fix off-by-one error (bug#56685).
* Speed up `seq-subseq` for lists (bug#56521)Mattias Engdegård2022-07-181-1/+28
| | | | | | | | * lisp/emacs-lisp/seq.el (seq-subseq): Make faster by using `take` instead of a lisp loop, and more importantly by not front-loading the error text formatting. * test/lisp/emacs-lisp/seq-tests.el (seq-tests--list-subseq-ref) (test-seq-subseq): Test `seq-subseq` for lists more thoroughly.