summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
* Remove useless unwind-protect forms, or make them useful as intendedMattias Engdegård2023-04-072-83/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/imenu.el (imenu--generic-function): * lisp/mail/yenc.el (yenc-decode-region): * lisp/textmodes/table.el (table-recognize-region): * test/lisp/dired-tests.el (dired-test-directory-files): * test/lisp/hl-line-tests.el (hl-line-tests-sticky): Fix unwind-protect bracketing mistakes that caused the unwind code to be misplaced. * lisp/strokes.el (strokes-read-stroke): Fix a bracketing mistake that misplaced the unwind code, and another one that misplaced the else-clause of an `if` form. * test/lisp/gnus/mml-sec-tests.el (mml-secure-test-fixture): Fix a bracketing mistake that misplaced the unwind code, and remove superfluous condition-case. * lisp/mwheel.el (mouse-wheel-global-text-scale): * lisp/speedbar.el (speedbar-stealthy-updates) (speedbar-fetch-dynamic-etags): * lisp/emacs-lisp/edebug.el (edebug--recursive-edit): * lisp/emacs-lisp/package.el (package--read-pkg-desc): * lisp/cedet/semantic.el (semantic-refresh-tags-safe): * lisp/emulation/viper-cmd.el (viper-escape-to-state): * lisp/emulation/viper-cmd.el (viper-file-add-suffix): * lisp/gnus/mail-source.el (mail-source-movemail): * lisp/mail/feedmail.el (feedmail-send-it-immediately) (feedmail-deduce-address-list): * lisp/mail/mailclient.el (mailclient-send-it): * lisp/mail/smtpmail.el (smtpmail-deduce-address-list): * lisp/mh-e/mh-print.el (mh-ps-print-range): * lisp/textmodes/reftex-index.el (reftex-index-this-phrase): * test/lisp/emacs-lisp/ert-tests.el (ert-test-run-tests-batch): (ert-test-run-tests-batch-expensive): Remove unwind-protect forms that are apparently useless, some since a prior edit that removed their purpose, some since their first appearance. * test/lisp/subr-tests.el (subr-test--frames-2): Insert dummy unwind form in backtrace test code.
* Comp: Fix limplification pass (bug#62537)Andrea Corallo2023-04-051-1/+8
| | | | | | | | * test/src/comp-resources/comp-test-funcs.el (comp-test-62537-1-f) (comp-test-62537-2-f): New functions. * lisp/emacs-lisp/comp.el (comp-jump-table-optimizable): Make it stricter add a comment.
* Merge from origin/emacs-29João Távora2023-04-032-22/+24
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3bdbb66efb9 ; CONTRIBUTE: Minor stylistic changes. d0eb12e8d3c Fix typo in section 14.1 of Emacs Manual b2fbec37f39 ; * etc/EGLOT-NEWS: Clarify scope of topmost section 131ec049db0 Eglot: unbreak eglot-extend-to-xref on w32 0622e1f29f6 Eglot: ensure server shutdown turns off eglot-inlay-hints... 59f66ea3027 ; * lisp/emacs-lisp/package-vc.el: Remove completed item ... d23dc3dd7e3 ; * lisp/emacs-lisp/package-vc.el (package-vc): Fix manua... 4508a024e81 ; Clarify documentation of 'cursor' text property d2e82817a3f Add two typescript-ts-mode faces (bug#62429) 10918fc9d24 Fix scrolling window when point moves up 9b32bc134c4 Improve documentation of 'defcustom's :set keyword ab4273056e0 Comp fix calls to redefined primtives with op-bytecode (b... c98929c7e18 ; Fix last change a14c3f62a67 ; Fix last change 09fece5722f Fix duplicate defcustom in eww.el e45bd10a3d9 Fix indentation regression in 'C-h l' 46fd10a7600 * doc/misc/tramp.texi (Remote shell setup): Clarify use o...
| * ; * lisp/emacs-lisp/package-vc.el: Remove completed item from TODOPhilip Kaludercic2023-03-301-3/+0
| |
| * ; * lisp/emacs-lisp/package-vc.el (package-vc): Fix manual referencePhilip Kaludercic2023-03-301-1/+1
| |
| * Comp fix calls to redefined primtives with op-bytecode (bug#61917)Andrea Corallo2023-03-291-18/+23
| | | | | | | | | | | | | | | | * test/src/comp-tests.el (61917-1): New test. * src/comp.c (syms_of_comp): New variable. * lisp/loadup.el: Store primitive arities before dumping. * lisp/emacs-lisp/comp.el (comp--func-arity): New function. (comp-emit-set-call-subr): Make use of `comp--func-arity'.
* | Eldoc: bump package version to 1.14.0João Távora2023-04-021-1/+1
| | | | | | | | * lisp/emacs-lisp/eldoc.el (Version): Bump to 1.14.0
* | ; Eldoc: fix doc of e-d-functions w.r.t. :origin keywordJoão Távora2023-04-021-5/+5
| | | | | | | | * lisp/emacs-lisp/eldoc.el (eldoc-documentation-functions): Fix.
* | Avoid unwind-protect without unwind forms in cl-letfMattias Engdegård2023-03-291-15/+18
| | | | | | | | | | * lisp/emacs-lisp/cl-macs.el (cl--letf): Use unwind-protect only if necessary, avoiding a warning.
* | Warn about unwind-protect without unwind formsMattias Engdegård2023-03-291-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `unwind-protect` without unwind forms is not just pointless but often indicates a mistake where the intended unwind part is misplaced, as in (unwind-protect (progn PROT-FORMS UNWIND-FORMS)) ; oops or (unwind-protect PROT-FORM) UNWIND-FORMS ; also oops or entirely forgotten for that matter. Warning about this makes sense, and the warning can always be silenced by removing the `unwind-protect` altogether if it shouldn't be there in the first place. * lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Implement warning. * etc/NEWS: Announce. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-test--with-suppressed-warnings): Add test case.
* | Merge from origin/emacs-29Stefan Kangas2023-03-291-19/+11
|\| | | | | | | | | | | | | | | | | | | | | 3965c65d5e2 ; * lisp/subr.el (read-char-choice): Fix last change. c1eac5b6586 Improve documentation of 'read-choice' and related symbols a8c9283e170 Revert "Comp fix calls to redefined primtives with op-byt... 8b66d8abd01 Revert "* lisp/emacs-lisp/comp.el (comp-emit-set-call-sub... 4ec4f614c71 ; Fix incompatibility in 'display-buffer-assq-regexp' ba3ade58f3b Skip ruby-ts-imenu-index test if needed 9133446db87 Fix Eglot Tramp tests on EMBA 5b351bc7fa9 * test/infra/Dockerfile.emba (emacs-gnustep): Instrument ...
| * Revert "Comp fix calls to redefined primtives with op-bytecode (bug#61917)"Andrea Corallo2023-03-281-19/+11
| | | | | | | | | | | | | | This reverts commit 263d6c38539691c954f4c3057cbe8d5468499b91. These patch series caused a number of regression and more analysis is required.
| * Revert "* lisp/emacs-lisp/comp.el (comp-emit-set-call-subr): Improve..."Andrea Corallo2023-03-281-1/+1
| | | | | | | | | | | | | | This reverts commit 4a7a0c9a9f521b04b23580901e9c0a662b504e32. These patch series caused a number of regression and more analysis is required.
* | Enable ASLR for dynamic libraries on CygwinKen Brown2023-03-271-2/+3
| | | | | | | | | | | | | | | | | | This seems to avoid the fork failures described in etc/PROBLEMS ("Fork failures in a build with native compilation"). * lisp/treesit.el (treesit--install-language-grammar-1): * lisp/emacs-lisp/comp.el (native-comp-driver-options): Add the linker flag "-Wl,-dynamicbase" on Cygwin.
* | Merge from origin/emacs-29Stefan Monnier2023-03-271-1/+1
|\| | | | | | | | | | | | | b08bf828605 ; Fix :version of the new defcustom d941666d859 ; Fix last change e19b7da7b09 Add 'eww-default-download-directory'. 564c26bdbeb ; Fix edebug spec for 'gv-define-simple-setter' (bug#62256)
| * ; Fix edebug spec for 'gv-define-simple-setter' (bug#62256)Matus Goljer2023-03-261-1/+1
| |
* | Merge commit '1bc9dfc5bee'Stefan Monnier2023-03-271-10/+18
|\|
| * ; Improve documentation of :predicate in globalized minor modesEli Zaretskii2023-03-231-9/+17
| | | | | | | | | | | | | | * doc/lispref/modes.texi (Defining Minor Modes): * lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Improve documentation of the :predicate keyword in defining globalized minor modes.
| * Fix :predicate handling in globalized minor modesStefan Monnier2023-03-231-1/+1
| | | | | | | | | | * lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Fix a thinko. (Bug#62376)
* | Add option to register packages as projectsPhilip Kaludercic2023-03-271-0/+12
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/package-vc.el (package-vc-register-as-project): Add new option. (project-remember-projects-under): Declare function for usage in 'package-vc--clone'. (package-vc--clone): Respect 'package-vc-register-as-project'. * etc/NEWS: Document the feature.
* | Generalise a LAP optimisation ruleMattias Engdegård2023-03-251-1/+3
| | | | | | | | | | | | | | * lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): Accept (stack-set 1) as equivalent to (discardN-preserve-tos 1) in a rule previously overlooked. This is usually beneficial in code size and almost always shortens dynamic paths.
* | ; * lisp/emacs-lisp/eldoc.el (eldoc-doc-buffer-separator): Fix doc.Yuan Fu2023-03-241-2/+2
| |
* | Allow users to customize eldoc buffer separator (bug#62029)João Távora2023-03-241-1/+6
| | | | | | | | | | | | * lisp/emacs-lisp/eldoc.el (eldoc-doc-buffer-separator): New variable. (eldoc--format-doc-buffer): Use it.
* | Eldoc: slightly enhance meaning of :echo optionJoão Távora2023-03-241-4/+8
| | | | | | | | | | | | | | | | Can now be a string to echo instead of a larger docstring. * lisp/emacs-lisp/eldoc.el (eldoc-documentation-functions): Describe :echo. (eldoc--echo-area-render): Allow :echo to be string.
* | Eldoc: fix bug recently introduced in "old" protocolJoão Távora2023-03-241-2/+5
| | | | | | | | | | | | | | | | In the "old" protocol, eldoc-documentation-strategy is actually used as the deprecated eldoc-documentation-function and it is itself the "origin" of the doc snippet to be displayed. * lisp/emacs-lisp/eldoc.el (eldoc--invoke-strategy): Fix.
* | ElDoc: rework rendering of echo area (bug#62029)João Távora2023-03-231-42/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the display function 'eldoc-display-in-echo-area' reused the same buffer as 'eldoc-display-in-doc-buffer', but that made it harder to render documentation items differently depending on the specific constraints of each display functions. Allow documentation-generating backends to pass an :echo-area property for tweaking the echo area display of certain documentation items. * lisp/emacs-lisp/eldoc.el (eldoc-documentation-functions): Update docstring. (eldoc--doc-buffer-docs): Remove. (eldoc--format-doc-buffer): Simplify. (eldoc--echo-area-render): New helper. (eldoc-display-in-echo-area): Use 'eldoc--echo-area-render'.
* | ElDoc: remember origin backend in doc snippets (bug#62029)João Távora2023-03-231-13/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | This lays groundwork for discriminating between different documentation providers in ElDoc display outlets, i.e. members of eldoc-display-functions * lisp/emacs-lisp/eldoc.el (eldoc--make-callback): Take extra origin arg. (eldoc-documentation-compose-1) (eldoc-documentation-compose-eagerly) (eldoc-documentation-default): Pass extra arg to eglot--make-callback. (eldoc--invoke-strategy): Rework. (eldoc-documentation-functions): Work docstring.
* | Merge from origin/emacs-29Stefan Kangas2023-03-221-11/+19
|\| | | | | | | | | | | | | | | | | | | | | | | | | 8b6a0de964d Improve docstring of treesit-parent-while (bug#62301) 35648a86730 ; Delete accidental leftover '()' Eglot function 47d8e4b0d38 Eglot: report window/workDoneProgress capability to langu... 4a7a0c9a9f5 * lisp/emacs-lisp/comp.el (comp-emit-set-call-subr): Impr... 4a6eefb93a5 Expand defvar-keymap documentation 7a1272168af * lisp/treesit.el (treesit-end-of-defun): Guard arg again... 263d6c38539 Comp fix calls to redefined primtives with op-bytecode (b... 6bf441ff115 Warn package authors away from keymap-unset with REMOVE 786de66ec3c Comment out jobs on EMBA eed240bc022 Improve defvar-keymap docstring.
| * * lisp/emacs-lisp/comp.el (comp-emit-set-call-subr): Improve 263d6c38539Andrea Corallo2023-03-211-1/+1
| |
| * Comp fix calls to redefined primtives with op-bytecode (bug#61917)Andrea Corallo2023-03-201-11/+19
| | | | | | | | | | | | * lisp/emacs-lisp/comp.el (comp-emit-set-call-subr): Fix compilation of calls to redefined primtives with dedicated op-bytecode. * test/src/comp-tests.el (61917-1): New test.
* | Merge from origin/emacs-29Stefan Kangas2023-03-201-39/+29
|\| | | | | | | | | | | | | | | | | | | | | | | 028f1102738 Fix quoting of font-family in 'hfy-family' 4cb8a850b08 ; Tweak doc/misc/eglot.texi d5d4959ed7d Document how to construct JSONRPC arrays in Eglot manual 078cf512eef * test/infra/Dockerfile.emba: Use debian:bullseye. 61adb44318a * configure.ac: Fix native comp compatibility check (bug#... d814c249f44 * test/infra/Dockerfile.emba: Install clangd. 27edd7f88cb Remove 'package-vc--query-spec' 39fea115515 Do not store :lisp-dir in package descriptors 168165178f3 Use 'package-vc-selected-packages' to store package specs
| * Remove 'package-vc--query-spec'Philip Kaludercic2023-03-151-9/+0
| | | | | | | | | | | | | | * lisp/emacs-lisp/package-vc.el (require): Do not load `inline' during compilation. (package-vc--query-spec): Remove function. (package-vc--clone): Do not call 'package-vc--query-spec'.
| * Do not store :lisp-dir in package descriptorsPhilip Kaludercic2023-03-151-16/+9
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/package-vc.el (package-vc--main-file) (package-vc--unpack-1): Query 'pkg-spec' instead of 'package-desc-extras'. (package-vc--unpack): Do not update 'package-desc-extras'. This simplification is possible due to the change in 2718bbb3bc, since we now ensure that package specifications are not lost. They are either provided by a package archive or stored in 'package-vc-selected-packages'.
| * Use 'package-vc-selected-packages' to store package specsPhilip Kaludercic2023-03-151-16/+22
| | | | | | | | | | | | | | | | | | | | | | * doc/emacs/package.texi (Fetching Package Sources): Do not promote the usage of 'package-vc-selected-packages' to install packages. * lisp/emacs-lisp/package-vc.el (package-vc-selected-packages): Remove custom setter and change docstring according to these changes. (package-vc--desc->spec): Consult 'package-vc-selected-packages' for package specifications. (package-vc--unpack): Add unknown package specifications to 'package-vc-selected-packages'
* | Always display the "Archive" column in the package listPhilip Kaludercic2023-03-151-5/+3
| | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/package.el (package-menu-mode): Always display column. (package-menu--print-info-simple): Always provide column information. Since NonGNU ELPA has been added to the default value of 'package-archives', this condition is practically never satisfied, meaning the code can be simplified.
* | Repair and speed up safe-copy-tree and make it internal (bug#61962)Mattias Engdegård2023-03-121-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no particular requirement for safe-copy-tree so let's make it internal for now. The new implementation is faster and more correct. * doc/lispref/lists.texi (Building Lists): * etc/NEWS: Remove doc and announcement. * lisp/subr.el (safe-copy-tree--seen, safe-copy-tree--1) (safe-copy-tree): Remove old version. * lisp/emacs-lisp/bytecomp.el (bytecomp--copy-tree-seen) (bytecomp--copy-tree-1, bytecomp--copy-tree): Add new version. (byte-compile-initial-macro-environment): Use it. * test/lisp/subr-tests.el (subr--safe-copy-tree): * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp--copy-tree): Move and improve tests.
* | Fix pluralization in shortdoc-help-fns-examples-functionDaniel Martín2023-03-121-5/+30
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/shortdoc.el (shortdoc-help-fns-examples-function): Implement a better logic to pluralize "Example", by counting the number of arrow characters in the example string. (Bug#61877) * test/lisp/emacs-lisp/shortdoc-tests.el (shortdoc-help-fns-examples-function-test): Add a test.
* | ; Fix last changeEli Zaretskii2023-03-121-15/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/shortdoc.el (shortdoc-help-fns-examples-function) (shortdoc-function-examples): Fix compilation warning and add an empty line before the examples. * lisp/emacs-lisp/shortdoc.el (shortdoc--insert-group-in-buffer) (shortdoc-function-examples) (shortdoc-help-fns-examples-function): * etc/NEWS: * doc/lispref/help.texi (Documentation Groups): * doc/emacs/help.texi (Name Help): Improve documentation of the last change. (Bug#61877)
* | Add functions to query Emacs Lisp examples registered in shortdocDaniel Martín2023-03-121-36/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/shortdoc.el (shortdoc--display-function): Add a new shortdoc-example text property so that ELisp examples can be searched for later. (shortdoc--insert-group-in-buffer): New function extracted from the buffer insertion code in 'shortdoc-display-group'. (shortdoc-display-group): Implement in terms of 'shortdoc--insert-group-in-buffer'. (shortdoc-function-examples): New function that returns an alist of Emacs Lisp examples from shortdoc. (shortdoc-help-fns-examples-function): New function to insert Emacs Lisp function examples in *Help* buffers, if added to 'help-fns-describe-function-functions'. * test/lisp/emacs-lisp/shortdoc-tests.el (shortdoc-function-examples-test): Test it. * doc/emacs/help.texi (Name Help): Document in the user manual. * doc/lispref/help.texi (Documentation Groups): Document it. * etc/NEWS: Advertise it. (Bug#61877)
* | Merge from origin/emacs-29Stefan Kangas2023-03-091-1/+3
|\| | | | | | | | | | | | | | | | | | | | | 7e1012765c4 Fix libwebp check for some webp installations c2ca009da4c Avoid potential infloop 34c14430e9d Don't misindent 'else:' after 'if re.match:' in Python 8a2a554192a * Make sure `default-directory' exists before spawning pr... 1862e7eb7ef Fix sed expression in install-etc make target c8ec0017cb9 Avoid using bash in the emacsclient desktop file a588937094f Fix documentation of the 'line-height' text property 971ded31c4f Add 'declare' specs to with- and without-restriction
| * * Make sure `default-directory' exists before spawning processes (bug#62004)Andrea Corallo2023-03-081-1/+3
| | | | | | | | | | * lisp/emacs-lisp/comp.el (comp-final, comp-run-async-workers): Bind `default-directory' to `invocation-directory'.
* | safe-copy-tree. Correct mistakes from earlier patch.Alan Mackenzie2023-03-071-8/+1
| | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (compile-defun): Remove unintended change. * lisp/subr.el (safe-copy-tree--seen): Correct grammatical error in doc string. (safe-copy-tree): Delete hash table at end of function. * doc/lispref/lists.texi (Building Lists): Add an "@end defun" line.
* | eval-and-compile: Strip symbol positions for eval but not for compile.Alan Mackenzie2023-03-071-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes bug #61962. * lisp/subr.el (safe-copy-tree): New function. * lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment): Amend the entry for eval-and-compile to use safe-copy-tree and byte-run-strip-symbol-positions for the eval part. * doc/lispref/lists.texi (Building Lists): Document safe-copy-tree. * etc/NEWS: Note the new function safe-copy-tree.
* | Merge from origin/emacs-29Stefan Kangas2023-03-071-4/+6
|\| | | | | | | | | | | | | | | bd07cec8442 Fix regression in Fido mode (bug#62015) 0e3c7ac13da * Fix `emacs-lisp-native-compile-and-load' for (bug#61917) 4a7e657389a * lisp/emacs-lisp/comp.el (comp-prettyformat-insn): Fix (... 8a8a994cfab Revert "Fix configuration of webp libraries" de4277af009 Fix configuration of webp libraries
| * * lisp/emacs-lisp/comp.el (comp-prettyformat-insn): Fix (bug#61917)Andrea Corallo2023-03-061-4/+6
| |
* | Don't modify interactive closures destructively (Bug#60974).Vibhav Pant2023-03-061-10/+27
| | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/cconv.el (cconv-convert): When form is an interactive lambda form, don't destructively modify it, as it might be a constant literal. Instead, create a new list with the relevant place(s) changed. * test/lisp/emacs-lisp/cconv-tests.el (cconv-tests-interactive-form-modify-bug60974): New test.
* | Merge from origin/emacs-29Stefan Kangas2023-03-061-0/+11
|\| | | | | | | | | | | | | | | | | | | | | | | | | 1c67e4f895f Fix c-ts-mode indentation d724d7d6785 Fix c-ts-mode indentation 7292b24c801 Fix c-ts-mode indentation 75cdc1afbe5 ; Change font-lock-variable-name-face to font-lock-variab... b1b3af5b90b Update to Org 9.6.1-40-g3d817c 80e1037df44 Add string-interpolation feature to bash-ts-mode 5b8e0b31548 Fix tramp-sh-handle-insert-directory 2258ed01f42 ; Minor fix of last change 9c18af0cfaf * Warn when certain primitives are redefined (bug#61880) 5af695c7479 ; * lib-src/etags.c (print_help): Fix indentation.
| * ; Minor fix of last changeEli Zaretskii2023-03-051-1/+1
| | | | | | | | | | * lisp/emacs-lisp/comp.el (comp-subr-trampoline-install): Fix wording. (Bug#61880)
| * * Warn when certain primitives are redefined (bug#61880)Andrea Corallo2023-03-051-0/+11
| | | | | | | | | | | | * lisp/emacs-lisp/comp.el (comp-warn-primitives): New constant. (comp-subr-trampoline-install): Warn when a sensitive primitive is being redefined.
* | Redirect eldoc messages to the mode-line when in edebug-modeDmitry Gutov2023-03-041-6/+9
| | | | | | | | | | | | * lisp/emacs-lisp/eldoc.el (eldoc-minibuffer-message): Redirect eldoc messages to the mode-line when in edebug-mode (bug#56459). (eldoc-minibuffer--cleanup): New function, used in above.