summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
* Merge from origin/emacs-26Glenn Morris2017-12-201-0/+43
|\ | | | | | | | | | | | | | | | | | | 4122d54 Fix updating scrollbar sizes when scaling is in effect 21a212f Collect GnuTLS extensions and use them to set %DUMBFW if supp... 936136e * test/lisp/emacs-lisp/derived-tests.el: Fix copy&paste lefto... 07b7fb9 * lisp/subr.el (delayed-after-hook-functions): Rename from ..... a5b0a4e * lisp/net/shr.el (shr-string-pixel-width): Return pixel-widt... c51e797 python.el doc fixes c62ced5 Make 'mouse-drag-and-drop-region' more robust and customizable
| * * test/lisp/emacs-lisp/derived-tests.el: Fix copy&paste leftoversStefan Monnier2017-12-181-3/+2
| |
| * * lisp/subr.el (delayed-after-hook-functions): Rename from ...-formsStefan Monnier2017-12-181-0/+44
| | | | | | | | | | | | (run-mode-hooks): `funcall` the functions instead of `eval`ing the forms. * lisp/emacs-lisp/derived.el (define-derived-mode): Push functions rather than forms (bug#29679).
| * Partially revert "Mention new strictness for &optional, &rest..."Noam Postavsky2017-12-151-31/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | The changes to cl argument parsing are not backwards compatible, and cause inconvenience when writing macros (e.g., instead of doing '&aux ,@auxargs', some more complicated conditionals would be required). The `cl-defstruct' macro makes use of this convenience when defining empty structs (Bug#29728). * lisp/emacs-lisp/cl-macs.el (cl--transform-lambda): (cl--do-&aux, cl--do-arglist): Undo strict checking of &rest, &key, and &aux. * test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-bad-arglist): Remove test.
| * Mention new strictness for &optional, &rest in arglists (Bug#29165)Noam Postavsky2017-12-131-0/+31
| | | | | | | | | | | | | | | | | | | | * etc/NEWS: Explain that '&optional' not followed by a variable is now an error. * lisp/emacs-lisp/cl-macs.el (cl--transform-lambda, cl--do-&aux) (cl--do-arglist): Also reject '&optional', '&rest', or '&aux' not followed by a variable for consistency. * test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-bad-arglist): New test.
* | Raise an error when detecting old-style backquotes.Philipp Stephani2017-12-091-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They have been deprecated for a decade now. * src/lread.c (Fload): Don't use record_unwind_protect to warn about old-style backquotes any more. They now generate a hard error. (read1): Signal an error when detecting old-style backquotes. Remove unused label. (syms_of_lread): Remove unused internal variable 'lread--old-style-backquotes'. (load_error_old_style_backquotes): Rename from 'load_warn_oldstyle_backquotes'. Signal an error. * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Remove check from byte compiler. It isn't triggered any more. * test/src/lread-tests.el (lread-tests--old-style-backquotes): Adapt unit test. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--old-style-backquotes) (bytecomp-tests-function-put): Adapt unit tests. * etc/NEWS: Document change.
* | ; Tracing for eieio-test random failure (Bug#24503)Noam Postavsky2017-12-031-2/+20
| | | | | | | | | | | | | | | | * test/Makefile.in [EMACS_HYDRA_CI]: Always show log for eieio-tests. * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (top-level): Trace cl-generic functions. (eieio-test-dump-trace): New function. (eieio-test-37-obsolete-name-in-constructor): Use it.
* | Fix faceup tests when run from elcNoam Postavsky2017-12-031-118/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | String literals may be shared by the compiler, so the test string needs to be copied before adding properties to it. For single properties, just use a string literal with properties. * test/lisp/emacs-lisp/faceup-tests/faceup-test-basics.el (faceup-markup): Split into... (faceup-markup-basics, faceup-markup-escaping, faceup-markup-plain) (faceup-markup-plain-full-text, faceup-markup-anonymous-face) (faceup-markup-anonymous-face-2keys, faceup-markup-anonymous-nested) (faceup-markup-nested, faceup-markup-overlapping) (faceup-markup-multi-face, faceup-markup-multi-property): New tests.
* | Add macros `thunk-let' and `thunk-let*'Michael Heerdegen2017-12-011-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/thunk.el (thunk-let, thunk-let*): New macros. * test/lisp/emacs-lisp/thunk-tests.el: (thunk-let-basic-test, thunk-let*-basic-test) (thunk-let-bound-vars-cant-be-set-test) (thunk-let-laziness-test, thunk-let*-laziness-test) (thunk-let-bad-binding-test): New tests for `thunk-let' and `thunk-let*. * doc/lispref/eval.texi (Deferred Eval): New section. * doc/lispref/elisp.texi: Update menu.
* | Merge from origin/emacs-26Glenn Morris2017-11-293-1/+19
|\| | | | | | | | | | | | | | | | | | | 02d114d6b8 * lisp/tree-widget.el (tree-widget-end-guide): Escape it. ... 0a85d12474 Fix ELisp "Warning Tips" 06d05fec84 Fix Bug#29163 ac64fdb248 Harden exec_byte_code against redefining 'error' 700f74e4c8 Fix Edebug specs for if-let* and and-let* (Bug#29236) 0ded1b41a9 Fix Edebug's handling of dotted specs (bug#6415) 16358d4fcb Improve documentation of "constant" symbols
| * Fix Edebug specs for if-let* and and-let* (Bug#29236)Gemini Lasswell2017-11-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | * test/lisp/emacs-lisp/subr-x.el (if-let*, if-let): Change Edebug spec to cause Edebug to instrument tests the results of which are not bound to symbols (the (VALUEFORM) case). (and-let*): Change Edebug spec to allow empty body. *test/lisp/emacs-lisp/subr-x-tests.el: (subr-x-and-let*-test-group-1): Add missing quote to erroneous form so Edebug will work on this test.
| * Fix Edebug's handling of dotted specs (bug#6415)Gemini Lasswell2017-11-262-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/cl-macs.el (cl-destructuring-bind): Use cl-macro-list1 instead of cl-macro-list in Edebug spec. * lisp/emacs-lisp/edebug.el (edebug-after-dotted-spec): Delete unused variable. (edebug-dotted-spec): Add docstring. (edebug-match-specs): Allow &optional and &rest specs to match nothing at the tail of a dotted form. Handle matches of dotted form tails which return non-lists. * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-dotted-forms): New test. * test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el: (edebug-test-code-use-destructuring-bind): New function.
* | * lisp/emacs-lisp/cl-macs.el: Fix bug#26073.Stefan Monnier2017-11-271-0/+10
| | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/cl-macs.el (cl--sm-macroexpand): Implement Common-Lisp's behavior for symbol-macro's let-rebindings. (cl--letf, cl-letf): Don't get fooled into using a plain `let` for symbol-macros. * test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-symbol-macrolet-hide): New test.
* | * lisp/emacs-lisp/cl-macs.el: Fix &key with no key argStefan Monnier2017-11-271-0/+4
| | | | | | | | | | * test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-empty-keyargs): New test. * lisp/emacs-lisp/cl-macs.el (cl--do-arglist): Fix it.
* | Merge from origin/emacs-26Paul Eggert2017-11-024-1/+84
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7f089aa5f6 Require seq in rmc.el 53aaad1dfc Make an example code introduced in the Gnus info work (bug... 7b29db222f Enable gnus-read-ephemeral-* to run multiple times (bug#29... 015f0bb2d8 Port thread.c to OpenBSD ARM ad68bbd0da Fix another "wrong side of point" error in CC Mode. 646e56e150 Fix Bug#28959 685fd77959 Fix duplicate .o file on QNX e562356c3f Fix two js indentation problems b8cf159bbc Update documentation for windows build 46540a1c7a Fix a "wrong side of point" error in CC Mode. Fixes bug #... 57ca409111 Fix autoload of flymake from elisp-mode during bootstrap (... aee0bc8775 Fix non-native fullscreen on NS (bug#28872) d6c1a9cb8a ; Fix author email address in test/lisp/url/url-tramp-test... 761c630766 Fix Bug#28982 628b653209 Fix windows build errors e8a06a5f9a Fix compile warning for non-w32 builds 0c536a20fb Display commit in package description, if available (Bug#2... 1d83257a1d Port to QNX 19667f44ef * configure.ac: Tweak libcurses diagnostic. 3fc05cfaec Scripts to automate windows binary distribution 928a106939 Fix Edebug specs for map-let and with-maps-do 46f2ee0d4c * test/lisp/net/tramp-tests.el (tramp-test41-delay-load): ... b51009d7f0 * admin/authors.el (authors-canonical-author-name): Ignore... a015db90e3 * test/lisp/progmodes/sql-tests.el (sql-tests-postgres-lis... 529a9c09d3 Further work on Bug#28889 c6deabaf4d Improve Tramp backward compatibility 8093e82e42 Improve backward compatibility of tramp-tests.el 46cdc01daa Fix some ‘window-normalize-’ prefixed functions (Bug#28947) 6360611457 Port to OpenIndiana a012ec766c Don't fill keywords after Emacs Lisp docstring b7c4aa951c Refactor c-forward-token-2 with new function c-forward-ove... 3aee7be62e Avoid unnecessary rounding errors in timestamps 2bfa42855b Fix xdg timestamp error on 32-bit Emacs 237e96bc52 Test that advice doesn't trigger bytecomp warnings (Bug#28... d719ea6ad5 Another fix for unsafe directory error message (Bug#865) b060e091c3 Handle https url for debbugs mbox (Bug#28831) 9e4265ef91 Ignore string properties when saving eshell history (Bug#2... 0f286ca85a Fix Bug#28889
| * Require seq in rmc.elTino Calancha2017-10-271-0/+41
| | | | | | | | | | * lisp/emacs-lisp/rmc.el: Require seq (Bug#28975). * test/lisp/emacs-lisp/rmc-tests.el (test-read-multiple-choice): Add test.
| * Fix Edebug specs for map-let and with-maps-doGemini Lasswell2017-10-241-1/+1
| | | | | | | | | | * lisp/emacs-lisp/map.el (map-let): Fix Edebug spec (bug#24777). * test/lisp/emacs-lisp/map-tests.el (with-maps-do): Fix Edebug spec.
| * Don't fill keywords after Emacs Lisp docstringAlexander Gramiak2017-10-221-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | This approach does mean that keywords that have spaces before them inside of docstrings aren't filled, but I think this is should be fine until Bug#28937 is fixed. * lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Add a colon to paragraph-start unconditionally, but require that it follows at least one space. (Bug#24622) * test/lisp/emacs-lisp/lisp-tests.el: New tests for Bug#24622 and Bug#7751.
| * Test that advice doesn't trigger bytecomp warnings (Bug#28803)John Williams2017-10-211-0/+11
| | | | | | | | | | | | | | * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-no-warnings-with-advice): New test. Copyright-paperwork-exempt: yes
* | New package, `faceup'Anders Lindgren2017-10-266-0/+488
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `faceup' is a framework for regression testing of font-lock keywords in ert. It is based on a human-readable markup language. (Bug#16063 and bug#28311). * lisp/emacs-lisp/faceup.el: * test/lisp/emacs-lisp/faceup-tests/faceup-test-basics.el: * test/lisp/emacs-lisp/faceup-tests/faceup-test-files.el: * test/lisp/emacs-lisp/faceup-resources/faceup-test-mode.el: * test/lisp/emacs-lisp/faceup-resources/faceup-test-this-file-directory.el: * test/lisp/emacs-lisp/faceup-resources/files/test1.txt: * test/lisp/emacs-lisp/faceup-resources/files/test1.txt.faceup: New files.
* | Revert "Raise an error when detecting old-style backquotes."Philipp Stephani2017-10-091-3/+8
| | | | | | | | This reverts commit 9613690f6e51e2f2aa2bcbbede3e209d08cfaaad.
* | Stop Testcover from producing spurious 1value errorsGemini Lasswell2017-10-081-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix bug#25351 by copying results of form evaluations for later comparison. * lisp/emacs-lisp/testcover.el (testcover-after): Copy the result of a form's first evaluation and compare subsequent evaluations to the copy. Improve the error message used when a form's value changes. (testcover--copy-object, testcover--copy-object1): New functions. * test/lisp/emacs-lisp/testcover-resources/testcases.el (by-value-vs-by-reference-bug-25351): Remove expected failure tag. (circular-lists-bug-24402): Add another circular list case.
* | Rewrite Testcover's internals, fixing several bugsGemini Lasswell2017-10-082-23/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/testcover.el: Rewrite the internals of Testcover to analyze instrumented code instead of reinstrumenting it. Use new hooks in Edebug to collect code coverage information at runtime using Edebug's instrumentation. Includes fixes for: (bug#11307) (bug#24509) (bug#24688) (bug#24743) (bug#25316) (bug#25326). (testcover-compose-functions): Remove mapcar. (testcover-start, testcover-this-defun): Analyze code instead of reinstrumenting it. Set edebug-behavior for each definition. (testcover--read, testcover-1value, testcover-reinstrument) (testcover-reinstrument-list, testcover-reinstrument-compose): Deleted. (testcover-after-instrumentation, testcover-init-definition) (testcover-before): New functions. (testcover-enter): Change call signature to match edebug-enter. (testcover-after, testcover-mark): Add handling of 'maybe and 'noreturn. (testcover-analyze-coverage, testcover-analyze-coverage-progn) (testcover-analyze-coverage-edebug-after) (testcover-analyze-coverage-wrapped-form) (testcover-analyze-coverage-wrapped-application) (testcover-analyze-coverage-compose) (testcover-analyze-coverage-backquote) (testcover-analyze-coverage-backquote-form) (testcover-coverage-combine): New functions to analyze instrumented code. * lisp/emacs-lisp/gv.el: Modify edebug-after's gv-expander to instrument in the setter as well as the getter. * test/lisp/emacs-lisp/testcover-tests.el (testcover-tests-run-test-case): Use `edebug-default-enter' instead of `edebug-enter' to detect Edebug invocation during tests. * test/lisp/emacs-lisp/testcover-resources/testcases.el (constants-bug-25316) (customize-defcustom-bug-25326) (1-value-symbol-bug-25316) (quotes-within-backquotes-bug-25316) (backquote-1value-bug-24509) (pcase-bug-24688) (defun-in-backquote-bug-11307-and-24743) (closure-1value-bug) (backquoted-vector-bug-25316) (vector-in-macro-spec-bug-25316) (mapcar-is-not-compose): Remove expected failure tags. (function-with-edebug-spec-bug-25316): Remove expected failure tag and modify expected result. (quoted-backquote): New test. * lisp/textmodes/rst.el: Remove workarounds for bugs in Testcover. (rst-testcover-defcustom): Deleted. * lisp/subr.el (1value): Remove incorrect description of testcover-1value from docstring, replace with description of Testcover's treatment of 1value.
* | Raise an error when detecting old-style backquotes.Philipp Stephani2017-10-081-8/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | They have been deprecated for a decade now. * src/lread.c (Fload): Don't use record_unwind_protect to warn about old-style backquotes any more. They now generate a hard error. (read1): Signal an error when detecting old-style backquotes. Remove unused label. (syms_of_lread): Remove unused internal variable 'lread--old-style-backquotes'. (load_error_old_style_backquotes): Rename from 'load_warn_oldstyle_backquotes'. Signal an error. * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Remove check from byte compiler. It isn't triggered any more. * test/src/lread-tests.el (lread-tests--old-style-backquotes): Adapt unit test. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--old-style-backquotes) (bytecomp-tests-function-put): Adapt unit tests. * etc/NEWS: Document change.
* Fix dynamic binding wrapper in iter-lambda (bug#25965)Gemini Lasswell2017-10-051-0/+10
| | | | | | | * lisp/emacs-lisp/generator.el (cps--make-dynamic-binding-wrapper): Remove extra evaluation of form. * test/lisp/emacs-lisp/generator-tests.el (cps-iter-lambda-with-dynamic-binding): New test.
* Fix slot typecheck in eieio-persistentEric Abrahamsen2017-09-301-0/+22
| | | | | | | | | | | | * lisp/emacs-lisp/eieio-base.el (eieio-persistent-slot-type-is-class-p): An `or' form can specify multiple potential classes (or null) as valid types for a slot, but previously only the final element of the `or' was actually checked. Now returns all valid classes in the `or' form. (eieio-persistent-validate/fix-slot-value): Check if proposed value matches any of the valid classes. * test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el (eieio-test-multiple-class-slot): Test this behavior.
* Fix subr-x-tests when running from elcNoam Postavsky2017-09-251-2/+7
| | | | | * test/lisp/emacs-lisp/subr-x-tests.el (subr-x-and-let*-test-group-1): Use `eval' around the `should-error' cases.
* ; Spelling and URL fixesPaul Eggert2017-09-232-4/+4
|
* Add tests for EdebugGemini Lasswell2017-09-212-0/+1033
| | | | | * tests/lisp/emacs-lisp/edeug-tests.el: New file. * tests/lisp/emacs-lisp/edebug-resources/edebug-test-code.el: New file.
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-1334-42/+42
| | | | | | | | | | | | | Most of this change is to boilerplate commentary such as license URLs. This change was prompted by ftp://ftp.gnu.org's going-away party, planned for November. Change these FTP URLs to https://ftp.gnu.org instead. Make similar changes for URLs to other organizations moving away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and fsf.org when this works, as this will further help defend against man-in-the-middle attacks (for this part I omitted the MS-DOS and MS-Windows sources and the test tarballs to keep the workload down). HTTPS is not fully working to lists.gnu.org so I left those URLs alone for now.
* Implement and-let*Mark Oteiza2017-09-121-148/+160
| | | | | | | | | | | | | | | | | | | | This also includes changes to if-let and when-let. The single tuple special case is ambiguous, and binding a symbol to nil is not as useful as binding it to its value outside the lexical scope of the binding. (Bug#28254) * etc/NEWS: Mention. * lisp/emacs-lisp/subr-x.el (internal--listify): (internal--build-binding-value-form): Extend to account for solitary symbols and (EXPR) items in binding varlist. (if-let*, when-let*): Nix single tuple case and incumbent bind-symbol-to-nil behavior. (and-let*): New macro. (if-let, when-let): Mark obsolete. Redefine in terms of if-let*, so they implicitly gain the new features without breaking existing code. * test/lisp/emacs-lisp/subr-x-tests.el: Adjust tests for: lack of single-tuple special case, lack of binding solitary symbols to nil, and the introduction of uninterned symbols for (EXPR) bindings. Add SRFI-2 test suite adapted to Elisp.
* Add tests for cl-macs.el (Bug#27559)Alexander Gramiak2017-08-212-8/+502
| | | | | | | * test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-test-loop): Remove duplicate. (cl-loop-destructuring-with): Move to cl-macs-tests.el. * test/lisp/emacs-lisp/cl-macs-tests.el: New file.
* Clean up temp files after some testsGlenn Morris2017-08-141-1/+3
| | | | | | | * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--with-temp-file): Also delete .elc file if present. * test/lisp/progmodes/etags-tests.el (etags-buffer-local-tags-table-list): Delete temp file at end.
* Don't define gv expanders in compiler's runtime (Bug#27016)Noam Postavsky2017-08-071-0/+147
| | | | | | | | This prevents definitions being compiled from leaking into the current Emacs doing the compilation. * lisp/emacs-lisp/gv.el (gv-define-expander): Use function-put instead of `put' with `eval-and-compile'. * test/lisp/emacs-lisp/gv-tests.el: New tests.
* Let the cl-typep effects of defclass work during compilation (Bug#27718)Noam Postavsky2017-08-071-12/+0
| | | | | | | | | * lisp/emacs-lisp/eieio.el (defclass): Use `define-symbol-prop' instead of `put'. * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (eieio-tests--dummy-function): Remove. (eieio-test-25-slot-tests, eieio-test-23-inheritance-check): Don't expect to fail if compiled.
* Let `define-symbol-prop' take effect during compilationStefan Monnier2017-08-071-0/+17
| | | | | | | | | | | | * src/fns.c (syms_of_fns): New variable `overriding-plist-environment'. (Fget): Consult it. * lisp/emacs-lisp/bytecomp.el (byte-compile-close-variables): Let-bind it to nil. (byte-compile-define-symbol-prop): New function, handles compilation of top-level `define-symbol-prop' and `function-put' calls by putting the symbol setting into `overriding-plist-environment'. Co-authored-by: Noam Postavsky <npostavs@gmail.com>
* Add a test of handling of circular values to testcover-testsGemini Lasswell2017-08-071-0/+10
| | | | | | * test/lisp/emacs-lisp-testcover-resources/testcases.el (testcover-testcase-cyc1): New function. (testcover-tests-circular-lists-bug-24402): New test.
* ; Avoid test failures when running from compiled test filesNoam Postavsky2017-08-072-0/+20
| | | | | | | | * test/lisp/dom-tests.el: Require `subr-x' during runtime as well. * test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-defstruct-record): * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (eieio-test-23-inheritance-check, eieio-test-25-slot-tests): Mark as expected to fail when byte-compiled.
* Catch argument and macroexpansion errors in ertAlexander Gramiak2017-08-071-0/+9
| | | | | | | | | | | | This kludge catches errors caused by evaluating arguments in ert's should, should-not, and should-error macros; it also catches macroexpansion errors inside of the above macros (Bug#24402). * lisp/emacs-lisp/ert.el: (ert--should-signal-hook): New function. (ert--expand-should-1): Catch macroexpansion errors. * test/lisp/emacs-lisp/ert-tests.el (ert-test-should-error-argument) (ert-test-should-error-macroexpansion): Tests for argument and expansion errors.
* ; Fix map-tests when compiledNoam Postavsky2017-08-041-6/+10
| | | | | | * test/lisp/emacs-lisp/map-tests.el (test-map-elt-testfn) (test-map-put-testfn-alist): Make sure the lookup key is really non-eq to the map's key, even if the code is compiled.
* * lisp/subr.el (define-symbol-prop): New functionStefan Monnier2017-07-281-1/+1
| | | | | | | | (symbol-file): Make it find symbol property definitions. * lisp/emacs-lisp/pcase.el (pcase-defmacro): * lisp/emacs-lisp/ert.el (ert-set-test): Use it instead of `put'. (ert-describe-test): Adjust call to symbol-file accordingly.
* * lisp/subr.el (method-files): Move function to cl-generic.elStefan Monnier2017-07-281-0/+24
| | | | | | | | * lisp/emacs-lisp/cl-generic.el (cl-generic-p): New function. (cl--generic-method-files): New function, moved from subr.el. * lisp/emacs-lisp/edebug.el (edebug-instrument-function): Use them. * test/lisp/emacs-lisp/cl-generic-tests.el: * test/lisp/subr-tests.el: Move and adjust method-files tests accordingly.
* Add 'rx' pattern for pcase.Philipp Stephani2017-07-231-0/+10
| | | | | * lisp/emacs-lisp/rx.el (rx): New pcase macro. * test/lisp/emacs-lisp/rx-tests.el (rx-pcase): Add unit test.
* Use a more specific test for running on hydra.nixos.orgGlenn Morris2017-07-182-2/+2
| | | | | | | | | | | * lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit): * test/Makefile.in (WRITE_LOG): * test/lisp/filenotify-tests.el: * test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el (eieio-test-method-order-list-6): * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (eieio-test-37-obsolete-name-in-constructor): * test/lisp/net/tramp-tests.el: Replace NIX_STORE with EMACS_HYDRA_CI.
* alist-get: Add optional arg TESTFNTino Calancha2017-07-171-0/+12
| | | | | | | | | | | | If TESTFN is non-nil, then it is the predicate to lookup the alist. Otherwise, use 'eq' (Bug#27584). * lisp/subr.el (alist-get): Add optional arg FULL. * lisp/emacs-lisp/map.el (map-elt, map-put): Add optional arg TESTFN. * lisp/emacs-lisp/gv.el (alist-get): Update expander. * doc/lispref/lists.texi (Association Lists): Update manual. * etc/NEWS: Announce the changes. * test/lisp/emacs-lisp/map-tests.el (test-map-put-testfn-alist) (test-map-elt-testfn): New tests.
* Fix lisp-comment-indent for single-semicolon caseNoam Postavsky2017-07-061-0/+26
| | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-comment-indent): Only check for open paren if we're looking at multiple comment characters. * test/lisp/emacs-lisp/lisp-mode-tests.el (lisp-comment-indent-1) (lisp-comment-indent-2): New tests.
* Don't redundantly cl-print arglist in function docstring againNoam Postavsky2017-06-291-1/+1
| | | | | | | * lisp/emacs-lisp/cl-print.el (cl-print-object): Don't print arglist part of docstring. * test/lisp/emacs-lisp/cl-print-tests.el (cl-print-tests-1): Update test accordingly.
* Improve ert backtrace recordingNoam Postavsky2017-06-291-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Change ert to use the new `backtrace-frames' function instead of collecting frames one by one with `backtrace-frame'. Additionally, collect frames starting from `signal' instead the somewhat arbitrary "6 from the bottom". Skipping 6 frames would skip the expression that actually caused the signal that triggered the debugger. Possibly 6 was chosen because in the case of a failed test, the triggering frame is an `ert-fail' call, which is not so interesting. But in case of a test throwing an error, this drops the `error' call which is too much. * lisp/emacs-lisp/debug.el (debugger-make-xrefs): Remove. * lisp/emacs-lisp/ert.el (ert--make-xrefs-region): Bring in relevant code from `debugger-make-xrefs'. (ert--print-backtrace): Add DO-XREFS parameter, delegate to `debugger-insert-backtrace'. (ert--run-test-debugger): Record the backtrace frames starting from the instigating `signal' call. (ert-run-tests-batch): Pass nil for `ert--print-backtrace's new DO-XREFS parameter. (ert-results-pop-to-backtrace-for-test-at-point): Pass t as DO-XREFS to `ert--print-backtrace' and remove call to `debugger-make-xrefs'. * test/lisp/emacs-lisp/ert-tests.el (ert-test-record-backtrace): Check the backtrace list instead of comparing its string representation. Expect `signal' to be the first frame.
* Fix wrong indentation after string literal (Bug#27306)Noam Postavsky2017-06-131-0/+13
| | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-indent-state) (lisp-indent-calc-next): Remove `depth' field, use (car ppss) instead. * test/lisp/emacs-lisp/lisp-mode-tests.el (lisp-indent-region-after-string-literal): New test.
* More small authors.el updatesGlenn Morris2017-06-061-1/+1
| | | | | | | | | | * admin/authors.el (authors-aliases): Fix recent addition. (authors-obsolete-files-regexps, authors-no-scan-regexps) (authors-ignored-files, authors-valid-file-names) (authors-renamed-files-alist): Additions. ; * lisp/vc/pcvs.el, test/lisp/emacs-lisp/checkdoc-tests.el: ; Fix Author headers. ; * ChangeLog.2: Fixes.