summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
...
* | Mark ert-test-run-tests-batch-expensive unstable on EMBALars Ingebrigtsen2022-03-071-0/+1
| |
* | Teach Edebug about the special '&whole' syntax for compiler macros.Philipp Stephani2022-03-031-0/+15
| | | | | | | | | | | | | | | | | | * 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.
* | Add a new library to format variable-pitch tablesLars Ingebrigtsen2022-02-191-0/+42
| | | | | | | | | | | | * doc/misc/vtable.texi (Index): New manual. * lisp/emacs-lisp/vtable.el: New library.
* | (with-demoted-errors): Warn on missing `format` argStefan Monnier2022-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`.
* | Reduce code duplication in parts of (auto)load&defaliasStefan Monnier2022-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/data.c (defalias): New function, extracted from `Fdefalias`. (Fdefalias): Use it. (Ffset): Don't handle `Vautoload_queue` here, handle it in `defalias` instead. * src/comp.c (comp--register-subr): Use `defalias` instead of duplicating its code. * src/eval.c (load_with_autoload_queue): New function, extracted from `Fautoload_do_load`. (Fautoload_do_load): Use it. (un_autoload): Mark it as static. * src/fns.c (Frequire): Use it as well. * src/lisp.h (defalias, load_with_autoload_queue): New declarations. (un_autoload): Remove declaration.
* | Fix copyright-fix-years, use a dash to separate years in a rangeLele Gaifax2022-01-281-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 7a46fa9c751f7c3147cd9b27fe84c1ce25419d3b, allowing en-dash as years separator, changed the way the years range is composed taking the separator from the `sep' variable instead of always using an hardwired hyphen. Since the code explicitly avoid to touch (that is, extend) existing ranges, that `sep' variable is almost always a space, or whatever character precedes the last parsed year, thus generating a range like "2020 2022" instead of "2020-2022". * lisp/emacs-lisp/copyright.el (copyright-fix-years): Always use an dash to separate years in a range. * test/lisp/emacs-lisp/copyright-tests.el (with-copyright-fix-years-test): (copyright-fix-years-tests--data): (text-copyright-fix-years): New test cases (bug#53597).
* | Fix copyright-find-copyright when searching from the endLars Ingebrigtsen2022-01-261-0/+11
| | | | | | | | | | * lisp/emacs-lisp/copyright.el (copyright-find-copyright): Make the double check also work when searching from the end (bug#7179).
* | Fix copyright.el comment and add a testLars Ingebrigtsen2022-01-261-0/+11
| | | | | | | | | | * lisp/emacs-lisp/copyright.el (copyright-find-copyright): Fix comment (bug#7179).
* | ; * test/lisp/emacs-lisp/derived-tests.el: Silence byte-compiler.Stefan Kangas2022-01-261-0/+3
| |
* | Add derived-mode test for bug#24176Lars Ingebrigtsen2022-01-241-0/+18
| |
* | cl-generic-tests.el: Fix warningStefan Monnier2022-01-181-1/+1
| | | | | | | | | | * test/lisp/emacs-lisp/cl-generic-tests.el (ert): Require at run-time for `ert--get-explainer`.
* | Move the Gnus range functions to a new range.el fileLars Ingebrigtsen2022-01-171-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/range.el: New file. * lisp/gnus/gnus-agent.el (range): (gnus-agent-synchronize-group-flags): (gnus-agent-possibly-alter-active): (gnus-agent-fetch-headers): (gnus-agent-read-agentview): (gnus-agent-fetch-group-1): (gnus-agent-read-p): (gnus-agent-expire-group-1): (gnus-agent-retrieve-headers): Adjust callers. * lisp/gnus/gnus-art.el (range): (gnus-article-describe-bindings): * lisp/gnus/gnus-cloud.el (range): (gnus-cloud-available-chunks): * lisp/gnus/gnus-draft.el (gnus-group-send-queue): * lisp/gnus/gnus-group.el (range): (gnus-group-line-format-alist): (gnus-number-of-unseen-articles-in-group): (gnus-group-update-eval-form): (gnus-group-read-group): (gnus-group-delete-articles): (gnus-group-catchup): (gnus-group-expire-articles-1): (gnus-add-marked-articles): * lisp/gnus/gnus-int.el (gnus-request-marks): * lisp/gnus/gnus-kill.el (gnus-apply-kill-file-internal): * lisp/gnus/gnus-range.el (gnus-range-difference) (gnus-sorted-range-intersection, gnus-uncompress-range) (gnus-add-to-range, gnus-remove-from-range) (gnus-member-of-range, gnus-list-range-intersection) (gnus-list-range-difference, gnus-range-length, gnus-range-add) (gnus-range-map): Make into obsolete aliases. * lisp/gnus/gnus-start.el (gnus-make-articles-unread): (gnus-convert-old-ticks): (gnus-read-old-newsrc-el-file): * lisp/gnus/gnus-sum.el (gnus-select-newsgroup): (gnus-articles-to-read): (gnus-articles-to-read): (gnus-killed-articles): (gnus-adjust-marked-articles): (gnus-update-marks): (gnus-update-marks): (gnus-compute-read-articles): (gnus-list-of-read-articles): (gnus-summary-update-info): (gnus-summary-move-article): (gnus-summary-expire-articles): (gnus-update-read-articles): (gnus-summary-insert-old-articles): (gnus-summary-insert-old-articles): (gnus-summary-insert-old-articles): * lisp/gnus/mail-source.el (gnus-range): (gnus-compress-sequence): * lisp/gnus/nnheader.el (range): (gnus-range-add): (nnheader-update-marks-actions): * lisp/gnus/nnimap.el (nnimap-update-info): (nnimap-update-info): (nnimap-update-info): (nnimap-update-qresync-info): (nnimap-update-qresync-info): (nnimap-update-qresync-info): (nnimap-parse-copied-articles): * lisp/gnus/nnmaildir.el (nnmaildir-request-update-info): (nnmaildir-request-update-info): (nnmaildir-request-expire-articles): (nnmaildir-request-expire-articles): (nnmaildir-request-set-mark): * lisp/gnus/nnmairix.el (nnmairix-request-set-mark): * lisp/gnus/nnmbox.el (nnmbox-record-active-article): (nnmbox-record-deleted-article): * lisp/gnus/nnml.el (nnml-request-compact-group): * lisp/gnus/nnvirtual.el (nnvirtual-request-expire-articles): * lisp/gnus/nnselect.el (numbers-by-group): (nnselect-request-update-info): (nnselect-push-info):
* | Merge from origin/emacs-28Stefan Kangas2022-01-141-0/+10
|\| | | | | | | | | 34ca4ff9a5 Fix Edebug specification for inline functions (Bug#53068). 3c06c37a8b Remove mention of removed `gnus-treat-play-sounds' variabl...
| * Fix Edebug specification for inline functions (Bug#53068).Philipp Stephani2022-01-131-0/+10
| | | | | | | | | | | | | | * lisp/emacs-lisp/inline.el (inline-quote): Fix Edebug specification. * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-inline): New unit test.
| * Revert "Fix closure-conversion of shadowed captured lambda-lifted vars"Mattias Engdegård2022-01-122-195/+0
| | | | | | | | | | | | | | This reverts commit 3ec8c8b3ae2359ceb8135b672e86526969c16b7e. It was committed to a stable branch without prior discussion; see bug#53071.
| * Fix closure-conversion of shadowed captured lambda-lifted varsMattias Engdegård2022-01-122-0/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lambda-lifted variables (ones passed explicitly to lambda-lifted functions) that are also captured in an outer closure and shadowed were renamed incorrectly (bug#51982). Reported by Paul Pogonyshev. * lisp/emacs-lisp/cconv.el (cconv--lifted-arg): New. (cconv-convert): Provide correct definiens for the closed-over variable. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases): * test/lisp/emacs-lisp/cconv-tests.el (cconv-tests--intern-all) (cconv-closure-convert-remap-var): Add tests. (cherry picked from commit 45252ad8f932c98a373ef0ab7f3363a3e27ccbe4)
* | Make ert explainers work on function aliasesLars Ingebrigtsen2022-01-131-0/+3
| | | | | | | | | | * lisp/emacs-lisp/ert.el: New function. (ert--expand-should-1): Use it (bug#53178).
* | Merge from origin/emacs-28Stefan Kangas2022-01-111-22/+37
|\| | | | | | | 8db5f82d45 ; Fix tabulated-list-mode tests after revert
| * ; Fix tabulated-list-mode tests after revertStefan Kangas2022-01-111-22/+37
| | | | | | | | | | * test/lisp/emacs-lisp/tabulated-list-tests.el (tabulated-list-print, tabulated-list-sort): Fix tests.
* | Improve pp-emacs-lisp-code for #'Lars Ingebrigtsen2022-01-041-0/+6
| | | | | | | | | | * lisp/emacs-lisp/pp.el (pp--insert-lisp): Format (function ...) as #'.
* | Test that buffer exists in shortdoc-all-groups-workStefan Kangas2022-01-041-4/+7
| | | | | | | | | | * test/lisp/emacs-lisp/shortdoc-tests.el (shortdoc-all-groups-work): Test that the shortdoc buffer was created.
* | New test shortdoc-all-groups-workStefan Kangas2022-01-031-0/+8
| | | | | | | | | | * test/lisp/emacs-lisp/shortdoc-tests.el (shortdoc-all-groups-work): New test. See Bug#52969.
* | Silence byte-compiler in eieio testsStefan Kangas2022-01-032-2/+6
| | | | | | | | | | | | | | | | This is a temporary workaround for Bug#52971. * test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el (eieio-compat) * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (eieio-compat): Silence byte-compiler by wrapping require in with-no-warnings.
* | Merge from origin/emacs-28Stefan Kangas2022-01-021-1/+1
|\| | | | | | | | | | | | | efb1c7ec37 ; * admin/notes/years: More known problems. f475c5823a ; Copyright year fixes 2684def348 ; Run set-copyright from admin.el 2558b37b5e ; * admin/notes/years: Mention known problems with 'update...
| * ; Copyright year fixesGlenn Morris2022-01-011-1/+1
| |
* | ; Add 2022 to copyright years.Eli Zaretskii2022-01-012-2/+2
| |
* | Merge from origin/emacs-28Eli Zaretskii2022-01-0164-64/+64
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-0164-64/+64
| |
* | Properly report errors about unbound ERT test symbols.Philipp Stephani2021-12-301-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Assertions should only be used to check internal consistency within a package, not to check arguments passed by callers. Instead, define and use a new error symbol. * lisp/emacs-lisp/ert.el (ert-test-unbound): New error symbol. (ert-select-tests): Use it. * test/lisp/emacs-lisp/ert-tests.el (ert-test-select-undefined): New unit test. * etc/NEWS: Document new behavior.
* | Fix multisession-tests on MS-WindowsEli Zaretskii2021-12-301-3/+4
| | | | | | | | | | | | | | * test/lisp/emacs-lisp/multisession-tests.el (multi-test-files-simple): On MS-Windows and Haiku, wait before invoking the Emacs sub-process, not after, to ensure the later update is detected with 1-sec file time resolution.
* | Make multi-test-files-busy shorterLars Ingebrigtsen2021-12-291-4/+4
| |
* | Adjust multi-test-files-simple test for WindowsLars Ingebrigtsen2021-12-291-0/+3
| | | | | | | | | | | | * test/lisp/emacs-lisp/multisession-tests.el (multi-test-files-simple): Adjust test to Emacs timestamp resolution on Windows.
* | Fix read-multiple-choice testsStefan Kangas2021-12-281-5/+5
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/rmc.el (rmc--add-key-description): Fix typo. * test/lisp/emacs-lisp/rmc-tests.el (test-rmc--add-key-description) (test-rmc--add-key-description/with-attributes) (test-rmc--add-key-description/non-graphical-display): Fix tests.
* | Fix EIEIO tests to account for eieio-compat moveStefan Monnier2021-12-272-0/+2
| | | | | | | | | | | | | | | | | | | | | | * test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el: * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el: Require `eieio-compat` explicitly. * test/manual/cedet/tests/test.el (a-method, a-generic): * doc/misc/srecode.texi (Compound Dictionary Values): * doc/misc/ede.texi (ede-generic-project): Update sample code to use cl-generic syntax.
* | Use defvar-keymap in testsStefan Kangas2021-12-261-16/+14
| | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/button-tests.el (button-tests--map): * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-keymap): * test/lisp/help-tests.el (help-tests-remap-map) (help-tests-major-mode-map, help-tests-minor-mode-map): * test/lisp/kmacro-tests.el (kmacro-tests-keymap): * test/lisp/repeat-tests.el (repeat-tests-map) (repeat-tests-repeat-map): * test/src/keymap-tests.el (keymap-tests-minor-mode-map) (keymap-tests-major-mode-map): Use defvar-keymap.
* | read-multiple-choice: Display "SPC" instead of " "Stefan Kangas2021-12-261-2/+7
| | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/rmc.el (rmc--add-key-description): Improve display of the keys TAB, RET, SPC, DEL, and ESC. This fixes a bug where " " was highlighted in the description in a confusing way. * test/lisp/emacs-lisp/rmc-tests.el (test-rmc--add-key-description) (test-rmc--add-key-description/with-attributes): Update tests for the above change.
* | read-multiple-choice: Add face when key not in name stringStefan Kangas2021-12-261-5/+5
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/rmc.el (rmc--add-key-description): Add face property also when key is not in the name string. * test/lisp/emacs-lisp/rmc-tests.el (test-rmc--add-key-description/with-attributes) (test-rmc--add-key-description/non-graphical-display): Update tests.
* | Factor out new function rmc--add-key-descriptionStefan Kangas2021-12-261-0/+22
| | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/rmc.el (rmc--add-key-description): Factor out new function from... (read-multiple-choice): ...here. * test/lisp/emacs-lisp/rmc-tests.el (test-rmc--add-key-description) (test-rmc--add-key-description/with-attributes) (test-rmc--add-key-description/non-graphical-display): New tests.
* | Fix compile time error in a pcase testStefan Kangas2021-12-221-2/+5
| | | | | | | | * test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-cl-type): Fix test.
* | Declare functions to silence byte-compilerStefan Kangas2021-12-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/auth-source.el (gnutls-symmetric-decrypt, gnutls-ciphers): * lisp/net/dbus.el (libxml-parse-xml-region): * lisp/simple.el (thread-name): * lisp/thread.el (thread-name, thread-signal, thread--blocker) (current-thread, thread-live-p, all-threads): * test/lisp/emacs-lisp/multisession-tests.el (sqlite-close): * test/lisp/net/gnutls-tests.el (gnutls-symmetric-decrypt) (gnutls-symmetric-encrypt, gnutls-hash-mac, gnutls-hash-digest) (gnutls-ciphers, gnutls-digests, gnutls-macs): * test/lisp/net/network-stream-tests.el (gnutls-peer-status): * test/lisp/net/shr-tests.el (libxml-parse-html-region): * test/src/decompress-tests.el (zlib-decompress-region): * test/src/process-tests.el (thread-last-error, thread-join) (make-thread): * test/src/xml-tests.el (libxml-parse-xml-region): Declare functions to silence byte-compiler in --without-all builds.
* | Silence additional byte-compiler warning in testStefan Kangas2021-12-211-0/+1
| | | | | | | | | | * test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el: Silence byte-compiler.
* | Fix bug#28557Stefan Monnier2021-12-201-26/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/emacs-lisp/cconv-tests.el: Remove `:expected-result :failed` from the bug#28557 tests. (cconv-tests-cl-function-:documentation): Account for the presence of the arglist (aka "usage") in the docstring. * lisp/emacs-lisp/cl-macs.el (cl--transform-lambda): * lisp/emacs-lisp/cl-generic.el (cl-defgeneric): Handle non-constant `:documentation`. * lisp/emacs-lisp/generator.el (iter-lambda): * lisp/emacs-lisp/cconv.el (cconv--convert-funcbody): Use `macroexp-parse-body`.
* | eieio-tests.el: Silence last warningsStefan Monnier2021-12-201-1/+4
| | | | | | | | | | | | * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (eieio-tests--dummy): New class. (eieio-test-22-init-forms-dont-match-runnable): Tweak to silence warning.
* | ; Minor license statement fixesStefan Kangas2021-12-204-18/+22
| |
* | Use declare-function instead of defun in eieio-tests.elStefan Kangas2021-12-201-8/+8
| | | | | | | | | | * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el: Prefer declare-function to defun.
* | Body of dynamic let-bindings is not in tail positionMattias Engdegård2021-12-201-1/+18
| | | | | | | | | | | | | | | | This fixes a known bug in `named-let`. * lisp/emacs-lisp/cl-macs.el (cl--self-tco): Prevent TCO from inside dynamic variable bindings. * test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs--labels): Add test.
* | Add `macroexp--dynamic-variable-p`Mattias Engdegård2021-12-202-1/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This predicate can be used for discriminating between lexically and dynamically bound variables during macro-expansion (only). It is restricted to internal use for the time being. * lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment): Use macroexpand--all-toplevel. * lisp/emacs-lisp/macroexp.el (macroexp-dynamic-variable-p): New. (macroexp--expand-all): Maintain macroexp--dynvars. (macroexpand-all): Rebind macroexp--dynvars. (macroexpand--all-toplevel): New. (internal-macroexpand-for-load): Use macroexpand--all-toplevel. * src/eval.c (eval_sub): Transfer defvar declarations from Vinternal_interpreter_environment into macroexp--dynvars during lazy macro-expansion. * src/lread.c (readevalloop): Rebind macroexp--dynvars around read-and-evaluate operations. (syms_of_lread): Define macroexp--dynvars. * test/lisp/emacs-lisp/macroexp-resources/vk.el: New file. * test/lisp/emacs-lisp/macroexp-tests.el (macroexp-tests--run-emacs) (macroexp-tests--eval-in-subprocess) (macroexp-tests--byte-compile-in-subprocess) (macroexp--tests-dynamic-variable-p): Add tests.
* | Silence byte-compiler using with-no-warnings in testsStefan Kangas2021-12-201-58/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | We could silence the specific warnings by adding support for them to with-suppressed-warnings, but it is almost not worth the complexity for warnings that only show up in one file. In any case, it is not urgent, so leave behind FIXMEs for now. * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (eieio-test-37-obsolete-name-in-constructor, class-c) (eieio-test-01-mix-alloc-initarg, slotattr-class-base): * test/lisp/progmodes/elisp-mode-tests.el (xref-elisp-generic-co-located-default): Silence byte-compiler.
* | Silence undefined function warnings in eieio-tests.elStefan Kangas2021-12-201-1/+12
| | | | | | | | | | | | * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el: Silence byte-compiler with some function definitions. These are overridden by class definitions further down.
* | Prefer skip-unless in one eieio testStefan Kangas2021-12-201-13/+13
| | | | | | | | | | | | * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (eieio-test-01-mix-alloc-initarg): Use skip-unless to correctly mark the test as skipped.