summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Overhaul pcase documentationThien-Thi Nguyen2018-05-271-51/+51
| | | | | | | | | | | | | | | | | | | Suggested by Drew Adams (Bug#31311). * doc/lispref/control.texi (Control Structures): Add "Pattern-Matching Conditional" to menu, before "Iteration". (Conditionals): Delete menu. (Pattern matching case statement): Delete node/subsection, by actually moving, renaming, and overhauling it to... (Pattern-Matching Conditional): ...new node/section. (pcase Macro): New node/subsection. (Extending pcase): Likewise. (Backquote Patterns): Likewise. * doc/lispref/elisp.texi (Top) In @detailmenu, add "Pattern-Matching Conditional" under "Control Structures" section and delete "Conditionals" section. * lisp/emacs-lisp/pcase.el (pcase): Rewrite docstring. (pcase-defmacro \` (qpat) ...): Likewise.
* Use EXPVAL in docstrings of patterns defined using pcase-defmacroThien-Thi Nguyen2018-05-274-9/+11
| | | | | | | | | Suggested by Drew Adams (Bug#31311). * lisp/emacs-lisp/cl-macs.el (cl-struct): ...here. * lisp/emacs-lisp/eieio.el (eieio): Likewise. * lisp/emacs-lisp/radix-tree.el (radix-tree-leaf): Likewise. * lisp/emacs-lisp/rx.el (rx): Likewise.
* Introduce EXPVAL for pcase, pcase-defmacro docstringsThien-Thi Nguyen2018-05-271-2/+6
| | | | | | | | | Suggested by Drew Adams (Bug#31311). * lisp/emacs-lisp/pcase.el (pcase): Use EXPVAL in docstring to stand for the result of evaluating EXP. (pcase-defmacro): Add (fn ...) form in docstring that includes [DOC], and the EXPVAL convention.
* Ensure pcase doc shows `QPAT first among extensionsThien-Thi Nguyen2018-05-271-9/+24
| | | | | | | * lisp/emacs-lisp/pcase.el (pcase--make-docstring): Split extensions display into two phases, collection and display, separated by a reordering step that ensures backquote is the first.
* Clarify when to use advice-add vs add-functionNoam Postavsky2018-05-221-0/+3
| | | | | * lisp/emacs-lisp/nadvice.el (add-function): Note in docstring that advice-add should be used for named functions.
* * lisp/emacs-lisp/inline.el: Clarify apparent typosStefan Monnier2018-04-041-0/+4
|
* Quote a few backticks in docstrings.Philipp Stephani2018-04-011-3/+3
| | | | | * lisp/emacs-lisp/macroexp.el (macroexp-progn, macroexp-let*) (macroexp-if): Quote backtick in docstrings.
* Document return value of pcase (Bug#30425)Noam Postavsky2018-03-311-2/+5
| | | | | | | | * doc/lispref/control.texi (Pattern matching case statement): * lisp/emacs-lisp/pcase.el (pcase): State that pcase returns nil if no patterns match. (pcase-exhaustive): State that an error is signaled if no patterns match.
* ; Fix some tiny doc typosGlenn Morris2018-03-271-1/+1
|
* De-obsolete `if-let' and `when-let'Michael Heerdegen2018-03-271-20/+26
| | | | | | | | | | For the following release it is planned to make `if-let*' and `when-let*' aliases for `if-let' and `when-let'. For now we revert declaring `if-let' and `when-let' obsolete and tweak the docstrings. * lisp/emacs-lisp/subr-x.el (if-let*, when-let*): Make docstrings refer to those of `if-let' and `when-let'. (if-let, when-let): De-obsolete. Rewrite documentation.
* * lisp/htmlfontify.el (hfy-begin-span-handler): Doc fix.Glenn Morris2018-03-261-2/+2
|
* Improve warning and error messagesEric Abrahamsen2018-03-221-8/+12
| | | | | | * lisp/emacs-lisp/eieio-base.el (eieio-persistent-read, (eieio-persistent-validate/fix-slot-value): Indicate exactly what went wrong.
* Let eieio-persistent-read read what object-write has writtenEric Abrahamsen2018-03-221-8/+17
| | | | | | | | | | | * lisp/emacs-lisp/eieio-base.el (eieio-persistent-validate/fix-slot-value): `object-write' may quote lists inside hash tables and vectors, so unquote those lists here. This patch allows the eieio-persistent write/restore process to perform a clean round trip. It only handles a very specific and limited range of object structures, but at least the write and read procedures match.
* Handle possible classtype values in eieio-persistent-readEric Abrahamsen2018-03-221-1/+1
| | | | | | * lisp/emacs-lisp/eieio-base.el (eieio-persistent-validate/fix-slot-value): The function `eieio-persistent-slot-type-is-class-p' could return either a single class, or a list of classes.
* Clarify that nil doesn't match itself as a cl-case clause (Bug#30749)Noam Postavsky2018-03-101-7/+9
| | | | | * lisp/emacs-lisp/cl-macs.el (cl-case): Mention that the ATOM => (ATOM) short form is only for non-nil ATOMs.
* Revert last commitMichael Heerdegen2018-03-061-23/+32
| | | | | This reverts commit af4697faa1f5b643f63a9ea61aa205a4c1432e23. It's too late for this to be in the release.
* Define if-let* and derivatives as aliases for if-let etcMichael Heerdegen2018-03-061-32/+23
| | | | | | | | | | | | | | | | | | This commit reverts declaring `if-let' and `when-let' obsolete in favor of the new `if-let*' and `when-let*' versions because of the compiler warning mess (Bug#30039). Instead we make foo-let* aliases for foo-let. The old single-tuple variable spec case is still supported for backward compatibility. * lisp/emacs-lisp/subr-x.el (if-let, when-let): Don't declare obsolete. Tweak edebug specs. (and-let): Renamed from `and-let*' for compatibility with the names `if-let' and `when-let'. (if-let*, when-let*, and-let*): Define as aliases for `if-let', `when-let' and `and-let'. * test/lisp/emacs-lisp/subr-x-tests.el (if-let-single-tuple-case-test) (when-let-single-tuple-case-test): New tests for the single-binding tuple case. In the whole file, prefer the names without "*".
* Remove outdated comment in syntax.elEli Zaretskii2018-03-031-6/+0
| | | | | * lisp/emacs-lisp/syntax.el (syntax-ppss-toplevel-pos): Remove outdated comment. (Bug#30617)
* ; Spelling and grammar fixes.Paul Eggert2018-02-171-1/+1
|
* Improve documentation of Profiling featuresEli Zaretskii2018-02-172-3/+5
| | | | | | | | * doc/lispref/debugging.texi (Profiling): Improve the description of elp.el. Improve wording of the rest of the section. (Bug#30491) * lisp/emacs-lisp/elp.el (elp-instrument-list): Make the interactive invocation work. Doc fix.
* ; Fix doc typos related to indefinite articlesGlenn Morris2018-02-161-1/+1
|
* ; Fix doc typos related to indefinite articlesGlenn Morris2018-02-162-2/+2
|
* Make 'byte-compile-error-on-warn' a safe file variableRobert Cochran2018-02-161-0/+5
| | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-error-on-warn): Mark as a safe local variable for boolean values.
* Define cl-type-definition button type as needed (Bug#28899)Noam Postavsky2018-01-301-1/+4
| | | | | * lisp/emacs-lisp/eieio-opt.el (eieio-help-constructor): Require `cl-extra' before using the `cl-type-definition' button type.
* * lisp/emacs-lisp/rx.el (rx): Fix the definition of 'blank'.Philipp Stephani2018-01-301-4/+7
|
* Revert "Fix tempfile creation when byte compiling"Eli Zaretskii2018-01-201-1/+11
| | | | | | This reverts commit 4fd446e9f65e5531b18d4a0c5e08a6eeabc292d8: * lisp/emacs-lisp/bytecomp.el (byte-compile-file): Put tempfile next to the target file, as was the original intent.
* Fix tempfile creation when byte compilingPaul Eggert2018-01-191-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.
* * lisp/emacs-lisp/bytecomp.el: Tweak last changeStefan Monnier2018-01-191-7/+7
| | | | (byte-compile-file): Move comment closer to the code it describes.
* Unbreak building Emacs on FreeBSDEli Zaretskii2018-01-191-1/+11
| | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-file): Don't create the temporary file under temporary-file-directory if the file being compiled is specified by an absolute file name. This avoids problems with ACL copying from temporary-file-directory on FreeBSD. For the details, see http://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00513.html.