summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
...
| * Fix problem with temp buffer killing in package-install-fileLars Ingebrigtsen2021-11-121-0/+1
| | | | | | | | | | * lisp/emacs-lisp/package.el (package-install-file): Allow killing the temporary buffer without querying (bug#51769).
* | Set `minibuffer-completion-*` variables locally in more placesMiha Rihtaršič2021-11-111-24/+23
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/calc/calc-store.el (calc-read-var-name): * lisp/emacs-lisp/crm.el (completing-read-multiple): * lisp/progmodes/cc-styles.el (c-read-offset): * lisp/window.el (read-buffer-to-switch): Set `minibuffer-completion-*` variables buffer-locally instead of using a global let-binding (bug#48925). Follow-up to commit 2021-05-01 "* lisp/minibuffer.el (completing-read-default): Fix bug#45474"
* | Note that loaddefs.el is copied to ldefs-boot.elLars Ingebrigtsen2021-11-111-0/+2
| | | | | | | | | | * lisp/emacs-lisp/autoload.el (autoload-rubric): Add a comment to the file noting what'll happen to it.
* | Improve 'ensure-empty-lines' docstringRobert Pluim2021-11-101-6/+6
| | | | | | | | | | * lisp/emacs-lisp/subr-x.el (ensure-empty-lines): Fix typo and improve wording.
* | Avoid another byte-compiler warning in package-quickstart.elStefan Kangas2021-11-101-0/+1
| | | | | | | | | | | | * lisp/emacs-lisp/package.el (package-quickstart-refresh): Avoid byte-compiler warning "assignment to free variable" in package-quickstart.el.
* | Avoid spurious byte-compiler warnings in package-quickstart.elStefan Kangas2021-11-101-0/+1
| | | | | | | | | | | | | | * lisp/emacs-lisp/package.el (package-quickstart-refresh): Disable the "`make-variable-buffer-local' not called at toplevel" byte-compiler warnings. Given that we wrap it all in a let-form, these are mostly false positives and not helpful.
* | Remove spurious %S from 'define-error' messagesTom Levy2021-11-102-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | ; The MESSAGE arg of 'define-error' does not support format specifiers ; (unlike the 'error' function). The signal data is automatically ; appended to the error message. * lisp/emacs/lisp/cl-generic.el (cl--generic-cyclic-definition): Remove spurious %S from error message. * lisp/emacs-lisp/gv.el (gv-invalid-place): Remove spurious %S from error message (and rephrase) (bug#51718). Copyright-paperwork-exempt: yes
* | Add new function 'file-name-split'Lars Ingebrigtsen2021-11-101-0/+3
| | | | | | | | | | | | | | * doc/lispref/files.texi (File Name Components): Document it. * lisp/files.el (file-name-split): New function (bug#50572). * lisp/emacs-lisp/shortdoc.el (file-name): Mention it.
* | ; * lisp/emacs-lisp/lisp-mode.el: Restore one check in flet handlingakater2021-11-091-6/+6
| | | | | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp--local-defform-body-p): Do check backward-up-list executing without errors (bug#9622).
* | * lisp/emacs-lisp/cl-generic.el: Add reference to inspirationStefan Monnier2021-11-081-0/+8
| |
* | lisp/emacs-lisp/lisp-mode.el: Fix parser state corruption.akater2021-11-081-6/+7
| | | | | | | | | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp--local-defform-body-p): Preserve the point. * test/lisp/progmodes/elisp-mode-resources/flet.erts: Add corresponding test example (bug#9622).
* | Make debugging ert--erts-specifications easierLars Ingebrigtsen2021-11-071-1/+1
| | | | | | | | | | * lisp/emacs-lisp/ert.el (ert--erts-specifications): Strip text properties from specs to make debugging easier.
* | ; Fix some recent typos/thinkos.Basil L. Contovounesios2021-11-071-2/+2
| |
* | Fix pp-emacs-lisp-code for `when' and relatedLars Ingebrigtsen2021-11-071-0/+3
| | | | | | | | | | * lisp/emacs-lisp/pp.el (pp--format-definition): Skip edebug specs we don't understand at all.
* | Ensure return value of ert-with-temp-directoryStefan Kangas2021-11-071-1/+3
| | | | | | | | | | | | | | * lisp/emacs-lisp/ert-x.el (ert-with-temp-file): Ensure return value when :directory is t is the directory name. * test/lisp/emacs-lisp/ert-x-tests.el (ert-x-tests-with-temp-directory): Extend test for the above.
* | Add generated suffix to test temp file namesStefan Kangas2021-11-071-7/+22
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/ert-x.el (ert-with-temp-file): Add temp file name suffix based on file name of caller. Reflow docstring. (ert--with-temp-file-generate-suffix): New defun. * test/lisp/emacs-lisp/ert-x-tests.el (ert-x-tests--with-temp-file-generate-suffix): New test.
* | Fix byte compilation of package built-insdickmao2021-11-071-79/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/package.el (package--activate-autoloads-and-load-path): (package--load-files-for-activation): Remove. (package--library-stem): New function, because file-name-sans-extension is insufficient. (package--reload-previously-loaded): New function. (package-activate-1): Reload directly. (package--files-load-history): (package--list-of-conflicts): (package--list-loaded-files): Remove (package-unpack): Adjust call. * test/lisp/emacs-lisp/package-tests.el (macro-builtin-func): Test. (macro-builtin-10-and-90): Test. (package-test-macro-compilation): Test. (package-test-macro-compilation-gz): Test (bug#49708).
* | New convenience macros ert-with-temp-(file|directory)Stefan Kangas2021-11-061-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/ert-x.el (ert-with-temp-file) (ert-with-temp-directory): New macros. * test/lisp/emacs-lisp/ert-x-tests.el (ert-x-tests-with-temp-directory) ert-x-tests-with-temp-directory/text-signals-error (ert-x-tests-with-temp-file) (ert-x-tests-with-temp-file/handle-error) (ert-x-tests-with-temp-file/prefix-and-suffix-kwarg) (ert-x-tests-with-temp-file/text-kwarg) (ert-x-tests-with-temp-file/unknown-kwargs-signals-error): New tests.
* | Remove messaging in pp-display-expression.Lars Ingebrigtsen2021-11-061-2/+1
| | | | | | | | | | | | * lisp/emacs-lisp/pp.el (pp-display-expression): Remove confusing message -- we don't usually say that we've popped up a new buffer when we do so.
* | Add "N.B." abbreviation to checkdocStefan Kangas2021-11-051-4/+2
| | | | | | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-in-abbreviation-p): Add abbreviation "N.B.".
* | Don't hardcode "Commentary" section in checkdocStefan Kangas2021-11-051-1/+5
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-commentary-header-string): New defvar. (checkdoc-file-comments-engine): Insert value of above new variable instead of hardcoding what is inserted for the "Commentary" section.
* | Allow 'pp' to limit the line widthsLars Ingebrigtsen2021-11-051-25/+65
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/pp.el (pp-max-width, pp-use-max-width): New user options (bug#11934). (pp-to-string): Use it. (pp--insert-lisp): Tweak whether to use standard-output or not. (pp--max-width): New function.
* | Try harder to keep lines short in pp-emacs-lisp-codeLars Ingebrigtsen2021-11-041-1/+11
| | | | | | | | * lisp/emacs-lisp/pp.el (pp--insert): Try harder to keep lines short.
* | Tweak multi-line expressions in pp--format-functionLars Ingebrigtsen2021-11-041-2/+8
| | | | | | | | | | * lisp/emacs-lisp/pp.el (pp--format-function): Fix up multi-line expressions.
* | Fix up some list folding in pp-emacs-lisp-codeLars Ingebrigtsen2021-11-041-7/+24
| | | | | | | | | | * lisp/emacs-lisp/pp.el (pp--insert-lisp, pp--format-list) (pp--insert): Touch up list folding.
* | Indent lambdas/closures betterLars Ingebrigtsen2021-11-041-1/+12
| | | | | | | | | | * lisp/emacs-lisp/pp.el (pp--format-function): Indent lambdas and closures better.
* | Make lambda/closure help buttons format as Emacs LispLars Ingebrigtsen2021-11-041-2/+7
| | | | | | | | | | | | | | | | * lisp/help.el (help--describe-command): Format lambda/closures as Emacs Lisp. * lisp/emacs-lisp/pp.el (pp-display-expression): Allow formatting as Emacs Lisp.
* | Add new basic Emacs Lisp code formatting functionLars Ingebrigtsen2021-11-041-0/+122
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/pp.el (pp-emacs-lisp-code): New interface function. (pp): Mention it. (pp--insert-lisp, pp--format-vector, pp--format-list) (pp--format-function, pp--format-definition, pp--insert-binding) (pp--insert, pp--indent-buffer): New helper functions.
* | Rename button-buttonize to buttonizeLars Ingebrigtsen2021-11-041-1/+1
| | | | | | | | | | | | | | | | * lisp/help.el (help--describe-command): * lisp/emacs-lisp/memory-report.el (memory-report--buffers): * lisp/button.el (button-buttonize): * doc/lispref/display.texi (Making Buttons): Rename button-buttonize to just buttonize and adjust callers.
* | Optimise (cond) => nil at source levelMattias Engdegård2021-11-021-1/+1
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/byte-opt.el (byte-optimize-cond): Optimise clause-free `cond`, which can arise from earlier transformations. This enables further optimisations. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases): Add test cases.
* | Support inserting images in tabulated-list-mode columnsStefan Kangas2021-11-021-11/+26
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/tabulated-list.el (tabulated-list-print-col): Support using an image descriptor to insert an image in a column. (tabulated-list-entries): * doc/lispref/modes.texi (Tabulated List Mode): Update documentation to reflect above change.
* | Make lambdas/closures/byte code in `C-h b' clickableLars Ingebrigtsen2021-11-021-0/+1
| | | | | | | | | | | | | | * lisp/help.el (help--describe-command): Add links for lambdas/closures/byte code (bug#24235). * lisp/emacs-lisp/pp.el (pp-display-expression): Autoload.
* | Read mailcaps again only when necessaryGregory Heytings2021-11-011-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/files.texi (File Attributes): Document it. * lisp/files.el (file-has-changed-p): New function. (file-has-changed-p--hash-table): Internal variable used by the new function (bug#51523). * lisp/emacs-lisp/shortdoc.el (file): Mention it. * lisp/net/mailcap.el (mailcap-parse-mailcaps): Read mailcaps again only when at least one of the mailcap files has changed. Fixes bug#51523.
* | eieio-core.el: Make slot-value work on defstructsStefan Monnier2021-10-312-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adjust the values in EIEIO's index-tables so they are compatible with those of defstructs. * lisp/emacs-lisp/eieio-core.el (eieio--slot-name-index): Don't add the `eieio--object-num-slots` offset. (eieio-defclass-internal): Add the `eieio--object-num-slots` offset here instead. (eieio-oref): Allow its use on `cl-structure-object`. * lisp/emacs-lisp/eieio.el (eieio-pcase-slot-index-from-index-table): Don't need to add the `eieio--object-num-slots` offset. * doc/misc/eieio.texi (Accessing Slots, Accessing Slots): Mention the use on structs. * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (eieio-test-defstruct-slot-value): New test.
* | Remove workaround for fixed Bug#6581 from ertStefan Kangas2021-10-311-35/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/ert.el (ert-equal-including-properties): Make into obsolete function alias for 'equal-including-properties'. * test/src/editfns-tests.el (format-properties): * test/lisp/emacs-lisp/ert-x-tests.el (ert-propertized-string) (ert-test-run-tests-interactively-2): Don't use above obsolete name. (ert--explain-equal-including-properties-rec): New function. (ert--explain-equal-including-properties): Use as an explainer for 'equal-including-properties' now that Bug#6581 is fixed. * test/lisp/emacs-lisp/ert-tests.el (ert-test-explain-equal-string-properties): Expand test. (ert-test-equal-including-properties): Merge test into above expanded test.
* | Fix bug with string values in equal-including-propertiesStefan Kangas2021-10-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/intervals.c (intervals_equal_1): Factor out from intervals_equal. Optionally use Fequal for comparison of string values in property lists. (intervals_equal): Update for the above. (compare_string_intervals): Use the above optional Fequal comparison to fix a bug where 'equal-including-properties' compared strings with eq, instead of equal. (Bug#6581) * test/src/fns-tests.el (fns-tests-equal-including-properties) (fns-tests-equal-including-properties/string-prop-vals): New tests. * test/lisp/emacs-lisp/ert-tests.el (ert-test-equal-including-properties): Remove parts testing 'equal-including-properties'. * lisp/emacs-lisp/ert.el (ert-equal-including-properties): Add FIXME that this should be removed.
* | Add new function string-glyph-splitLars Ingebrigtsen2021-10-302-0/+18
| | | | | | | | | | | | | | * doc/lispref/strings.texi (Creating Strings): Document it. * lisp/emacs-lisp/shortdoc.el (string): Mention it. * lisp/emacs-lisp/subr-x.el (string-glyph-split): New function.
* | Merge from origin/emacs-28Eli Zaretskii2021-10-301-6/+6
|\| | | | | | | | | 20ebd91a73 Improve documentation of string truncation APIs 3f998a3fc8 * lisp/textmodes/css-mode.el: Fix typo. (Bug#51488)
| * Improve documentation of string truncation APIsEli Zaretskii2021-10-301-6/+6
| | | | | | | | | | | | | | | | | | | | | | * doc/lispref/display.texi (Size of Displayed Text): * lisp/international/mule-util.el (truncate-string-to-width): Document caveats of using 'truncate-string-to-width' when character composition is involved. * lisp/emacs-lisp/subr-x.el (string-limit): * doc/lispref/strings.texi (Creating Strings): Improve the documentation of 'string-limit'.
* | Merge from origin/emacs-28Glenn Morris2021-10-291-0/+80
|\| | | | | | | | | | | 52e7049b58 * lisp/loadup.el: Unbreak build. 91e7df281e Move lisp/shorthands.el to lisp/emacs-lisp/shorthands.el 00103154e0 Some Tramp changes, mainly in tramp-tests.el
| * Move lisp/shorthands.el to lisp/emacs-lisp/shorthands.elLars Ingebrigtsen2021-10-291-0/+80
| |
* | Indent cl-flet-like forms correctly in incomplete expressionsakater2021-10-281-42/+32
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp--local-defform-body-p): Support incomplete sexps * test/lisp/progmodes/elisp-mode-resources/flet.erts: Add tests for incomplete sexps (bug#9622).
* | (string-pixel-width): Rewrite to avoid side effectsStefan Monnier2021-10-271-7/+2
| | | | | | | | | | * src/xdisp.c (Fwindow_text_pixel_size): Allow `window` to be a buffer. * lisp/emacs-lisp/subr-x.el (string-pixel-width): Simplify accordingly.
* | Simplify string-pixel-widthLars Ingebrigtsen2021-10-271-12/+6
| | | | | | | | | | | | * lisp/emacs-lisp/subr-x.el (string-pixel-width): Simplify -- save-window-excursion saves dedication status (and the code was buggy).
* | Fix parsing of erts filesLars Ingebrigtsen2021-10-271-3/+4
| | | | | | | | | | * lisp/emacs-lisp/ert.el (ert-test-erts-file): Fix progress through a test file (bug#51409).
* | Harden ert-resource-directory against errorsLars Ingebrigtsen2021-10-271-11/+11
| | | | | | | | | | | | * lisp/emacs-lisp/ert-x.el (ert-resource-directory): Be more resilient -- don't bug out if called from a file that's not visiting a directory.
* | Add new function 'string-pixel-width'Lars Ingebrigtsen2021-10-272-1/+27
| | | | | | | | | | | | | | * doc/lispref/display.texi (Size of Displayed Text): Mention it. * lisp/emacs-lisp/shortdoc.el (string): Mention it. * lisp/emacs-lisp/subr-x.el (string-pixel-width): New function.
* | Add links to commentary reached with finder-list-keywordsStefan Kangas2021-10-231-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/finder.el (finder-goto-xref): Move from here... * lisp/emacs-lisp/package.el (package--finder-goto-xref): ...to here. Make the old name into an obsolete function alias. (package--finder-xref): New button type. (package--describe-add-library-links): Factor out new function... * lisp/finder.el (finder-commentary): ...from here. (describe-package-1): Call above new function. This fixes an issue where commentaries reached via 'finder-list-keywords' did not have links. (Bug#10814)
* | Merge from origin/emacs-28Glenn Morris2021-10-221-4/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b0d64be0bc (origin/emacs-28) Improve some NEWS entries 7fde84e881 Improve documentation of syntax-ppss-context slightly 5ecbed01b2 ; * test/lisp/mh-e/mh-utils-tests.el: Update macro declara... 168665da59 Move some xwidget entries efde024361 time-stamp-tests: improvements to test macros 06c944cff1 Fix rfc6068-parse-mailto-url autoload 9b6b5e37ef Regexp-quote github domains in bug-reference 1f6cdeb12c Ensure valid end/beginning lines in message-mark-inserted-... 9b46150ab0 * etc/NEWS: Improve 'repeat-mode' entry. 9c37b812da ; * lisp/repeat.el (repeat-mode): Fix docstring typo. caf87d80fa * lisp/repeat.el (repeat-keep-prefix): Expand description. 24083c8d13 * lisp/net/eww.el (eww-retrieve-command): Add :tag. cf7d8fb1d7 Add description of cards to etc/refcards/README d2849cc645 Fix 'calculate-lisp-indent' when "[" starts containing sex... 2a0a368ddc Fix typo in doc/emacs/anti.texi 9529e1d2fb Update doc of Edebug specification for macros 5bc522b4f4 ; * lisp/simple.el (kill-region): A better fix for bug#51320. ee6bdd6eef Fix non-interactive behavior of 'kill-region' 2b7655ca0e ; More accurate doc string for 'tab-bar-format' 2841e26744 * test/lisp/dabbrev-tests.el: Use 'kbd' for readable keys. 1cdb4d2077 * lisp/menu-bar.el (menu-bar-keymap): Add optional arg KEY... # Conflicts: # etc/NEWS # lisp/progmodes/bug-reference.el
| * Fix 'calculate-lisp-indent' when "[" starts containing sexp (Bug#51312)Martin Rudalics2021-10-221-4/+5
| | | | | | | | | | | | * lisp/emacs-lisp/lisp-mode.el (calculate-lisp-indent): Handle arbitrary paren syntax after skipping whitespace backwards within containing sexp (Bug#51312).