summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
* Disable byte-compile-cond-use-jump-table (Bug#35770)Noam Postavsky2019-06-011-2/+2
| | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-cond-use-jump-table): Set to nil by default. Don't merge to master, the bug is already fixed there.
* Allow macros autoloaded as functions during bytecomp (Bug#36022)Noam Postavsky2019-06-011-1/+3
| | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-callargs-warn): Don't pass symbols which don't have a known definition to byte-compile--function-signature, it fails to compile code which previously compiled successfully (for example, gnus.el until 2019-06-01 "* lisp/gnus/gnus.el: Mark autoloaded macros as such" which autoloads some macros as if they were functions).
* * lisp/emacs-lisp/package.el: Obey buffer-file-coding-system (bug#35739)Stefan Monnier2019-05-311-9/+27
| | | | | | | | | | | | | | | | `url-insert-file-contents` saves in buffer-file-coding-system the coding-system used to decode the contents. Preserve this as the contents is moved from buffer to string to buffer, and use it when saving the contents to file, so as to try and better preserve the original byte sequence. (package--buffer-string, package--cs): New functions. (package--check-signature): Encode `string` if a coding-system was specified in buffer-file-coding-system. (package--download-one-archive, package-install-from-archive): Obey and preserve the buffer-file-coding-system if specified. Do not merge.
* Warn about wrong number of args for subrs (Bug#35767)Noam Postavsky2019-05-301-1/+1
| | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-callargs-warn): Don't assume byte-compile-fdefinition will return non-nil. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-warn-wrong-args) (bytecomp-warn-wrong-args-subr): New tests.
* Use plain symbols for eieio type descriptors (Bug#29220)Noam Postavsky2019-05-302-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | Since Emacs 26, eieio objects use a class record (with circular references) as the type descriptor of the object record. This causes problems when reading back an object from a string, because the class record is not `eq' to the canonical one (which means that read objects don't satisfy the foo-p predicate). * lisp/emacs-lisp/eieio.el (make-instance): As a (partial) fix, set the record's type descriptor to a plain symbol for the type descriptor when eieio-backward-compatibility is non-nil (the default). * lisp/emacs-lisp/eieio-core.el (eieio--object-class): Call eieio--class-object on the type tag when eieio-backward-compatibility is non-nil. (eieio-object-p): Use eieio--object-class instead of eieio--object-class-tag. * test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el (eieio-test-persist-hash-and-vector) (eieio-test-persist-interior-lists): Make into functions. (eieio-persist-hash-and-vector-backward-compatibility) (eieio-persist-hash-and-vector-no-backward-compatibility) (eieio-test-persist-interior-lists-backward-compatibility) (eieio-test-persist-interior-lists-no-backward-compatibility): New tests which call them, eieio-backward-compatibility let-bound.
* Avoid infloop in read-multiple-choice (Bug#32257)Noam Postavsky2019-05-261-2/+7
| | | | | | | | * lisp/emacs-lisp/rmc.el (read-multiple-choice): When `read-char' signals an error "Non-character input-event", call `read-event' to take the non-character event out of the queue. Don't merge to master, we just use `read-event' directly there, rather than this solution which relies a particular error message.
* Fix incorrect cloning of eieio-instance-inheritor objects (Bug#34840)Vitalie Spinu2019-05-081-2/+10
| | | | | | * lisp/emacs-lisp/eieio-base.el (clone): Unbound slots of eieio-instance-inheritor objects as documented in the docs string and implemented in the original eieio implementation.
* Fix cloning of eieio-named objects (Bug#22840)Vitalie Spinu2019-05-071-9/+11
| | | | | * lisp/emacs-lisp/eieio-base.el (clone): Correctly set the name of the cloned objects from eieio-named instances.
* Be more careful about indent-sexp going over eol (Bug#35286)Noam Postavsky2019-04-221-8/+14
| | | | | | | | * lisp/emacs-lisp/lisp-mode.el (indent-sexp): Only go over multiple sexps if the end of line is within a sexp. * test/lisp/emacs-lisp/lisp-mode-tests.el (indent-sexp-stop-before-eol-comment) (indent-sexp-stop-before-eol-non-lisp): New tests.
* Fix downloading updates for packages with non-ASCII descriptionsEli Zaretskii2019-03-191-2/+7
| | | | | | | * lisp/emacs-lisp/package.el (package--download-one-archive): Make sure archive contents are written using UTF-8 encoding. (Bug#34909) (list-packages): Set buffer's encoding to UTF-8.
* Fix a typo in the doc string of 'regex-opt'Eli Zaretskii2019-02-221-2/+2
| | | | | * lisp/emacs-lisp/regexp-opt.el (regexp-opt): Fix example in the doc string. (Bug#34596)
* * lisp/emacs-lisp/debug.el (debug-on-variable-change): Doc fix. (Bug#34518)David Pathakjee2019-02-181-1/+1
| | | | Copyright-paperwork-exempt: yes
* Fix copyright years by handPaul Eggert2019-01-011-1/+1
| | | | | These are dates that admin/update-copyright did not update, or updated incorrectly.
* Update copyright year to 2019Paul Eggert2019-01-0186-86/+86
| | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
* cl-make-random-state was not copying its argPaul Eggert2018-12-191-1/+1
| | | | | | | | Problem reported by Xu Chunyang (Bug#33731). * lisp/emacs-lisp/cl-extra.el (cl-make-random-state): Use copy-sequence, not copy-tree, so that the record is copied. * test/lisp/emacs-lisp/cl-extra-tests.el: (cl-extra-test-cl-make-random-state): New test.
* * lisp/emacs-lisp/cursor-sensor.el: Add motivationStefan Monnier2018-12-091-0/+21
|
* Improve documentation of cursor-sensor.el (bug#33664)Stefan Monnier2018-12-091-7/+19
| | | | | | * doc/lispref/text.texi (Special Properties): Mention cursor-sensor-inhibit. * lisp/emacs-lisp/cursor-sensor.el (Commentary): Add cursor-sensor-mode. (cursor-sensor-inhibit): Add docstring.
* * lisp/emacs-lisp/subr-x.el (if-let, when-let): Doc fix: active voice.Glenn Morris2018-12-011-16/+13
|
* Fix a typo in a doc stringEli Zaretskii2018-11-281-1/+1
| | | | | * lisp/emacs-lisp/map-ynp.el (read-answer-short): Fix typo. (Bug#33528)
* * lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Pass format to message.Glenn Morris2018-11-271-1/+3
|
* Avoid clearing echo-area message by auto-save-visited-file-nameEli Zaretskii2018-11-261-2/+4
| | | | | | * lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Record the previous echo-area message, if any, and restore it before exiting. (Bug#33490)
* Fix two Edebug defcustoms (bug#33428)Stephen Berman2018-11-191-2/+2
| | | | | | * lisp/emacs-lisp/edebug.el (edebug-print-length) (edebug-print-level): Fix customization type to allow setting the documented valid value nil via the Customize interface.
* Fix tempfile creation when byte compilingPaul Eggert2018-11-151-11/+1
| | | | | | | | | | This improves on the recent fix for master failing to build on FreeBSD. Suggested by Stefan Monnier in: https://lists.gnu.org/r/emacs-devel/2018-01/msg00600.html * lisp/emacs-lisp/bytecomp.el (byte-compile-file): Put tempfile next to the target file, as was the original intent. (cherry picked from commit 64c846738617d1d037eac0cefb6586c04317b0a1)
* Improve documentation of destructuring-binding macrosEli Zaretskii2018-11-031-16/+27
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/pcase.el (pcase-dolist, pcase-let) (pcase-let*): Improve the doc strings. * doc/lispref/sequences.texi (Sequence Functions): Improve wording and rename arguments of seq-let to be more descriptive. Add a cross-reference to "Destructuring with pcase Patterns". * doc/lispref/control.texi (Pattern-Matching Conditional): Improve wording and the menu. (pcase Macro): Incorporate patch suggested by Paul Eggert <eggert@cs.ucla.edu>. Reformat text. (Destructuring with pcase Patterns): Rename from "Destructuring patterns", and improve wording and indexing.
* Doc fix for checkdoc-continueEric Abrahamsen2018-11-011-3/+2
| | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-continue): There is no second optional argument, and the function always starts from point.
* Fix a typo in autoload.elEli Zaretskii2018-11-011-1/+1
| | | | | * lisp/emacs-lisp/autoload.el (update-directory-autoloads): Remove stray backslashes. (Bug#33231)
* * lisp/emacs-lisp/pcase.el: Improve docstrings.Stefan Monnier2018-10-301-6/+12
|
* * lisp/emacs-lisp/rx.el (rx): Fix typo in doc string. (Bug#33205)Eli Zaretskii2018-10-301-1/+1
|
* Don't error when indenting malformed Lisp (Bug#30891)Noam Postavsky2018-10-251-0/+4
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-indent-calc-next): If we run out of indent stack, reset the parse state.
* Further fix to eieio-persistentEric Abrahamsen2018-10-041-17/+15
| | | | | | | | * lisp/emacs-lisp/eieio-base.el (eieio-persistent-validate/fix-slot-value): Make handling of hash tables and vectors recursive. This is necessary because the write process, in `eieio-override-prin1' is also recursive. With any luck, this will be the last fix of its kind. If that's true, cherry-pick to Emacs 26.2 later on.
* Improve cl-do, cl-do* docstringsTino Calancha2018-09-291-2/+37
| | | | | * lisp/emacs-lisp/cl-macs.el(cl-do, cl-do*): Improve docstring (Bug#32803).
* Small checkdoc quoting fix (bug#32546)Glenn Morris2018-08-271-1/+1
| | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine): Fix quoting thinko.
* Do not consider external packages to be removable (Bug#27822)Yuri D'Elia2018-08-111-1/+12
| | | | | | | | | Packages which are not directly user-installed shouldn't be autoremoved, since they can be setup through a different path (via `package-directory-list') where we have no authority over. * lisp/emacs-lisp/package.el (package--user-installed-p): New function. (package--removable-packages): Use it.
* New function read-answer (Bug#31782)Juri Linkov2018-08-041-0/+128
| | | | | | | | | | | | | | * lisp/emacs-lisp/map-ynp.el (read-answer-short): New defcustom. (read-answer): New function. * lisp/subr.el (assoc-delete-all): New function. * etc/NEWS: Announce them. * lisp/dired.el (dired-delete-file): Use read-answer. (dired--yes-no-all-quit-help): Remove function. (dired-delete-help): Remove defconst. (backported from master, "New function read-answer (bug#30073)" and "Respect non-saved value of `read-short-answer' (Bug#31782)")
* Don't fail to indent-sexp before a full sexp (Bug#31984)Noam Postavsky2018-07-271-8/+16
| | | | | | | | * lisp/emacs-lisp/lisp-mode.el (indent-sexp): Only signal error if the initial forward-sexp fails. Suppress scan-error forn any of the forward-sexp calls after that. * test/lisp/emacs-lisp/lisp-mode-tests.el (indent-sexp-cant-go): New test.
* Fix indent-sexp of #s(...) (Bug#31984)Noam Postavsky2018-07-211-2/+8
| | | | | | * lisp/emacs-lisp/lisp-mode.el (indent-sexp): Look for a sexp that ends after the current line. * test/lisp/emacs-lisp/lisp-mode-tests.el (indent-sexp-go): New test.
* Improve documentation of 'pcase-defmacro rx'Eli Zaretskii2018-07-201-14/+18
| | | | | | * lisp/emacs-lisp/rx.el (rx): Clarify and improve the doc string. For the details, see the discussion starting at http://lists.gnu.org/archive/html/emacs-devel/2018-06/msg00399.html.
* Avoid turning on the global-minor-mode recursivelyJohn Shahid2018-07-101-12/+16
| | | | | | * lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Clear the buffer-list inside MODE-enable-in-buffers to avoid enabling the mode recursively. (Bug#31793)
* Stop using indent-line-to in lisp-indent-line (Bug#32014)Noam Postavsky2018-07-091-2/+8
| | | | | | | | | | | | This is partial revert of "Remove ignored argument from lisp-indent-line", because `indent-line-to' doesn't respect field boundaries. * lisp/emacs-lisp/lisp-mode.el (lisp-indent-line): Use delete-region and indent-to instead of `indent-line-to'. * test/lisp/emacs-lisp/lisp-mode-tests.el (lisp-indent-with-read-only-field): Expect to pass. Don't merge to master, we will fix indent-line-to there instead.
* Increase max-lisp-eval-depth adjustment while in debugger (bug#31919)Gemini Lasswell2018-06-301-0/+1
| | | | | | | * src/eval.c (call_debugger): Increase the amount of extra Lisp evaluation depth given to the debugger to allow it to call cl-print. * lisp/emacs-lisp/debug.el (debugger-setup-buffer): Add a comment to suggest updating call_debugger when changing print-level.
* Detect a non-list package archive content properly (Bug#22311)Noam Postavsky2018-06-261-1/+1
| | | | | | | | | | * lisp/emacs-lisp/package.el (package--download-one-archive): Use `read' instead of `read-from-string'; the latter always returns a cons, so the `listp' check on its return value doesn't make sense. It was changed from `read' to `read-from-string' in 2015-04-01 "* emacs-lisp/package.el: Implement asynchronous refreshing", but that change was not needed because `read' works fine on strings as well as buffers.
* * lisp/emacs-lisp/regexp-opt.el (regexp-opt): Fix docstring quotes.Noam Postavsky2018-06-241-5/+5
|
* Change name of `seqp' argument (Bug#26411)Simen Heggestøyl2018-06-211-3/+3
| | | | | | * lisp/emacs-lisp/seq.el (seqp): Change argument name. * doc/lispref/sequences.texi: Update the documentation for seqp.
* Fix #'fun handling inside `labels' (Bug#31792)Noam Postavsky2018-06-192-7/+17
| | | | | | | | | | | | | * lisp/emacs-lisp/cl.el (labels): Apply the equivalent of the cl-labels change from 2015-01-16 "* lisp/emacs-lisp/cl-macs.el: Fix last change". * test/lisp/emacs-lisp/cl-tests.el (labels-function-quoting): New test. * lisp/emacs-lisp/cl-macs.el (cl-flet, cl-labels): Improve docstring, link to relevant manual page. * doc/misc/cl.texi (Function Bindings): Don't imply that function cells of symbols are modified by cl-flet. Don't claim that cl-flet or cl-labels affect references of the form (quote FUNC).
* Fix byte compilation of (eq foo 'default)Paul Eggert2018-06-161-9/+15
| | | | | | | | | | | | | Backport from master. Do not use the symbol ‘default’ as a special marker. Instead, use a value that cannot appear in the program, improving on a patch proposed by Robert Cochran (Bug#31718#14). * lisp/emacs-lisp/bytecomp.el (byte-compile--default-val): New constant. (byte-compile-cond-jump-table-info) (byte-compile-cond-jump-table): Use it instead of 'default. * test/lisp/emacs-lisp/bytecomp-tests.el: (byte-opt-testsuite-arith-data): Add a test for the bug.
* Make cl-print respect print-quoted (bug#31649)Gemini Lasswell2018-06-071-2/+7
| | | | | | * lisp/emacs-lisp/cl-print.el (cl-print-object) <cons>: Observe print-quoted when printing quote and its relatives. Add printing of 'function' as #'.
* Make cl-print respect print-level and print-length (bug#31559)Gemini Lasswell2018-06-041-47/+68
| | | | | | | | | | | | | | | * lisp/emacs-lisp/cl-print.el (cl-print--depth): New variable. (cl-print-object) <cons>: Print ellipsis if printing depth greater than 'print-level' or length of list greater than 'print-length'. (cl-print-object) <vector>: Truncate printing with ellipsis if vector is longer than 'print-length'. (cl-print-object) <cl-structure-object>: Truncate printing with ellipsis if structure has more slots than 'print-length'. (cl-print-object) <:around>: Bind 'cl-print--depth'. * test/lisp/emacs-lisp/cl-print-tests.el (cl-print-tests-3, cl-print-tests-4): New tests. (cherry picked from commit 0f48d18fd2a30f29cc3592a835d2a2254c9b0afb)
* Update doc string of 'rx'Eli Zaretskii2018-06-031-6/+12
| | | | | * lisp/emacs-lisp/rx.el (rx): Update the description of some character classes.
* Fix cl-print for circular sublists (Bug#31146)Noam Postavsky2018-06-031-3/+6
| | | | | | | | | * lisp/emacs-lisp/cl-print.el (cl-print-object) <cons>: Push each element of list being printed onto cl-print--currently-printing. * test/lisp/emacs-lisp/cl-print-tests.el (cl-print-circle-2): New test. (cherry picked from commit b8aa7ecf54c9b164a59f1b0e9f9fe90531dadd20)
* Improve read-multiple-choice docstring (Bug#31628)Damien Cassou2018-05-291-9/+9
| | | | * lisp/emacs-lisp/rmc.el (read-multiple-choice): Improve docstring.