summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* 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.