summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
* Fix invocation of File->Close from the menu barEli Zaretskii2023-02-191-13/+14
| | | | | | | | | | * lisp/simple.el (kill-buffer--possibly-save): Don't request LONG-FORM from 'read-multiple-choice' if GUI dialog should be used. * lisp/emacs-lisp/rmc.el (read-multiple-choice): Doc fix. (read-multiple-choice--short-answers): Don't append "?" to CHOICES and don't display the prompt in the echo area if GUI dialog is used. Use 'use-dialog-box-p'. (Bug#61553)
* * Fix `native-comp-enable-subr-trampolines' semanticAndrea Corallo2023-02-181-1/+2
| | | | | | * lisp/emacs-lisp/comp.el (comp--trampoline-abs-filename): Interpret `native-comp-enable-subr-trampolines' relative to `invocation-directory'.
* ; Fix typoStefan Kangas2023-02-181-1/+1
|
* ; Improve and update documentation of native compilationEli Zaretskii2023-02-171-3/+2
| | | | | | | | | | | | * src/comp.c (syms_of_comp) <native-comp-enable-subr-trampolines> <native-comp-eln-load-path>: Doc fixes. * lisp/emacs-lisp/comp.el (native-comp-never-optimize-functions): Doc fix. * doc/lispref/compile.texi (Native-Compilation Variables): Document 'native-comp-jit-compilation' and 'native-comp-enable-subr-trampolines'.
* Merge 'emacs-29' into 'feature/inhibit-native-comp-cleanup'Andrea Corallo2023-02-171-8/+31
|\
| * ; Avoid installing VC package dependencies multiple timesPhilip Kaludercic2023-02-161-2/+2
| | | | | | | | | | | | * lisp/emacs-lisp/package-vc.el (package-vc-install-dependencies): Check if two package names are eq, instead checking the structural equality of package-desc objects.
| * Attempt to recognise if a VC package has no Elisp filesPhilip Kaludercic2023-02-161-0/+15
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/package-vc.el (package-vc-non-code-file-names): Add new variable used to avoid false-positives. (package-vc--unpack): Recursively search for .el files excluding the ones listed in 'package-vc-non-code-file-names', offering to abort the installation if none are found.
| * Improve backward compatibility of save-restrictionGregory Heytings2023-02-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/editfns.c (save_restriction_save_1): Renamed from 'save_restrictions_save'. Make it static. (save_restriction_restore_1): Renamed from 'save_restriction_restore'. Make it static. (save_restriction_restore): New function, combining 'save_restriction_save_1' and 'narrowing_locks_save'. (save_restriction_save): New function, combining 'save_restriction_restore_1' and 'narrowing_locks_restore'. (Fsave_restriction): Restore the previous code. (narrowing_locks_save, narrowing_locks_restore): Make them static. * src/lisp.h: Remove two functions that are not externally visible anymore. * src/comp.c (helper_save_restriction): Restore the previous code. * src/bytecode.c (exec_byte_code): Restore the previous code. * lisp/emacs-lisp/bytecomp.el (byte-compile-save-restriction): Decrement unbinding count.
| * ; Raise an error if a VC package checkout is emptyPhilip Kaludercic2023-02-141-1/+4
| | | | | | | | | | * lisp/emacs-lisp/package-vc.el (package-vc--unpack): Check if PKG-DIR is empty before proceeding with the installation.
| * ; Fix the installation of dependencies for VC packagesPhilip Kaludercic2023-02-141-8/+13
| | | | | | | | | | | | * lisp/emacs-lisp/package-vc.el (package-vc-install-dependencies): Work with package-desc objects instead of (PACKAGE-NAME VERSION) pairs.
| * Merge branch 'scratch/fix-locked-narrowing'Gregory Heytings2023-02-131-1/+1
| |\
| | * Fix 'save-restriction' for narrowing locksGregory Heytings2023-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/editfns.c (narrowing_locks_save): (narrowing_locks_restore): Make them non-static. * src/lisp.h: Make them externally visible. * src/bytecode.c (exec_byte_code): Save and restore narrowing locks. * lisp/emacs-lisp/bytecomp.el (byte-compile-save-restriction): Increment unbinding count. * src/comp.c (helper_save_restriction): Save and restore narrowing locks.
* | | * Generate trampolines in a temporary directory if no other option is viableAndrea Corallo2023-02-141-8/+12
| | | | | | | | | | | | | | | * lisp/emacs-lisp/comp.el (comp--trampoline-abs-filename): Use temporary file if no other option is viable.
* | | * Fix previous changeAndrea Corallo2023-02-131-1/+1
| | | | | | | | | | | | | | | * lisp/emacs-lisp/generate-lisp-file.el (generate-lisp-file-trailer): Fix previous change b6e2799aa1c.
* | | Rename native-comp-deferred-compilation-deny-listAndrea Corallo2023-02-131-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/comp.el (native-comp-jit-compilation-deny-list) (native-compile-async-skip-p): Rename native-comp-deferred-compilation-deny-list into native-comp-jit-compilation-deny-list. (native-comp-deferred-compilation-deny-list): Mark it obsolete.
* | | Rename native-comp-deferred-compilation into native-comp-jit-compilationAndrea Corallo2023-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/comp.c (maybe_defer_native_compilation, syms_of_comp): Rename native-comp-deferred-compilation into native-comp-jit-compilation. * lisp/subr.el (native-comp-deferred-compilation): Mark native-comp-deferred-compilation as obsolete. * lisp/startup.el (native-comp-deferred-compilation) (normal-top-level): Rename native-comp-deferred-compilation into native-comp-jit-compilation. * lisp/progmodes/elisp-mode.el (emacs-lisp-native-compile-and-load): Likewise. * lisp/emacs-lisp/generate-lisp-file.el (generate-lisp-file-trailer): Likewise.
* | | Rename comp-enable-subr-trampolines into native-comp-enable-subr-trampolinesAndrea Corallo2023-02-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/data.c (Ffset): Rename comp-enable-subr-trampolines into native-comp-enable-subr-trampolines. * src/comp.c (syms_of_comp): Likewise. * lisp/subr.el (comp-enable-subr-trampolines): Make comp-enable-subr-trampolines obsolete. * lisp/startup.el (native-comp-enable-subr-trampolines) (normal-top-level): Rename comp-enable-subr-trampolines into native-comp-enable-subr-trampolines. * lisp/loadup.el (dump-mode): Likewise. * lisp/emacs-lisp/comp.el (comp-subr-trampoline-install) (comp--trampoline-abs-filename): Likewise.
* | | * lisp/emacs-lisp/comp.el (native-comp-never-optimize-functions): Improve docAndrea Corallo2023-02-131-1/+6
| | |
* | | Support `comp-enable-subr-trampolines' as string valueAndrea Corallo2023-02-131-16/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/comp.c (syms_of_comp): Update `comp-enable-subr-trampolines'. * lisp/emacs-lisp/comp.el (native-comp-never-optimize-functions) (comp--trampoline-abs-filename): Support `comp-enable-subr-trampolines' string value. * src/data.c (Ffset): Use Vcomp_enable_subr_trampolines now.
* | | * Some more `inhibit-native-compile' clean-upAndrea Corallo2023-02-132-4/+2
| | | | | | | | | | | | | | | * lisp/emacs-lisp/generate-lisp-file.el (generate-lisp-file-trailer): Use `native-comp-deferred-compilation'.
* | | Revert "Add new variable 'inhibit-native-compilation'"Andrea Corallo2023-02-131-19/+16
| | | | | | | | | | | | This reverts commit 5fec9182dbeffa88cef6651d8c798ef9665d6681.
* | | Revert "Rename to inhibit-automatic-native-compilation"Andrea Corallo2023-02-131-1/+1
|/ / | | | | | | This reverts commit f97993ee667f9be7589825f3a4fbc095d6944ec6.
* | ; Use the right name when specifying VC packagesPhilip Kaludercic2023-02-121-3/+4
| | | | | | | | | | | | | | * lisp/emacs-lisp/package-vc.el (package-vc-install-selected-packages): Generate dummy package descriptors in here, if necessary. (package-vc--unpack): Remove dummy-descriptor generation.
* | Tolerate missing elpa-packages.eld filesPhilip Kaludercic2023-02-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/package-vc.el (package-vc--download-and-read-archives): Replace 'condition-case-unless-debug' with a regular 'condition-case'. It appears a few people using third-party archives that don't serve package specifications have been having issues with package-vc, when toggle-on-error is enabled. In their case, package-vc would raise an error in its first invocation, but it would go on working normally afterwards. As this behaviour is confusing and the user can't do much about a missing elpa-packages.eld to begin with, we satisfy ourselves with printing out a message and continuing on.
* | ; Fix installation of dependencies for VC packagesPhilip Kaludercic2023-02-121-2/+2
| | | | | | | | | | | | * lisp/emacs-lisp/package-vc.el (package-vc-install-dependencies): Maintain a list of package-desc objects instead of package names to install.
* | lisp-mode: add docstring recognition for more common lisp symbolsNicolas Martyanoff2023-02-091-0/+3
|/ | | | | | * lisp/emacs-lisp/lisp-mode.el (define-compiler-macro) (define-setf-expander, deftype): Add the 'doc-string-elt' property for proper docstring highlighting in Common Lisp.
* Fix docstring fontification of CL's 'defstruct'Eli Zaretskii2023-02-021-0/+1
| | | | | | | * lisp/emacs-lisp/lisp-mode.el (defstruct): Set 'doc-string' property. Patch by Nicolas Martyanoff <nicolas@n16f.net>. Copyright-paperwork-exempt: yes
* Fix spurious errors on Windows when deleting temporary *.eln filesEli Zaretskii2023-01-291-2/+5
| | | | | * lisp/emacs-lisp/comp.el (comp--native-compile): On MS-Windows, ignore errors when deleting a temporary .eln file. (Bug#60996)
* ; Actually use dummy package descriptorPhilip Kaludercic2023-01-211-1/+1
| | | | | | | * lisp/emacs-lisp/package-vc.el (package-vc--unpack): Set pkg-desc if nil. This revises the changes from 70947da708c8e06e31a2930520b38bafe43dba39.
* Fix an oversight in advice.elMichael Heerdegen2023-01-191-1/+1
| | | | | | | | This fixes an oversight from 77c3c464a16: "* lisp/emacs-lisp/advice.el (ad-advised-functions): Make it a plain list" that caused an issue as reported in Bug#60893. * lisp/emacs-lisp/advice.el (ad-read-advised-function): Adjust to handle the new type of elements of `ad-advised-functions'.
* ; Fix minor mistakes in documentationIkumi Keita2023-01-181-1/+1
| | | | | | | | * lisp/emacs-lisp/cl-macs.el (cl-letf): Correct Info reference. * doc/lispref/strings.texi (String Conversion): Fix typo. (Bug#60926)
* Fix display of warnings on w32 consoleEli Zaretskii2023-01-171-2/+6
| | | | | * lisp/emacs-lisp/warnings.el (warnings-suppress): Use alternative symbol for TTY frames on MS-Windows.
* Fix minor issues with 'pp' and related commandsEli Zaretskii2023-01-131-4/+8
| | | | | | | | | * etc/NEWS: * lisp/emacs-lisp/pp.el (pp-use-max-width, pp-emacs-lisp-code): Mention in doc string that formatting via 'pp-emacs-lisp-code' could be slow. (pp-eval-expression, pp-macroexpand-expression): Honor 'pp-use-max-width'. (Bug#58687)
* ; Fix typo in ert-with-temp-fileStefan Kangas2023-01-131-1/+1
| | | | | * lisp/emacs-lisp/ert-x.el (ert-with-temp-file): Fix typo. Reported by F. Jason Park <jp@neverwas.me>. (Bug#60730)
* Ensure VC package names are not emptyPhilip Kaludercic2023-01-111-1/+5
| | | | | | | * lisp/emacs-lisp/package-vc.el (package-vc--unpack): Raise an error if the package name is empty. (package-vc-install): Avoid generating an empty file name, if a URL ends with a slash, and raise an error if the package name is empty.
* Handle missing package description when unpacking vc packagesPhilip Kaludercic2023-01-111-0/+2
| | | | | * lisp/emacs-lisp/package-vc.el (package-vc--unpack): Create a dummy descriptor if PKG-DESC is nil.
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-01101-101/+101
|
* ; Fix typosStefan Kangas2022-12-312-2/+2
|
* Fix misspelled functions in shortdoc groupsStefan Kangas2022-12-311-4/+4
| | | | | | | * lisp/emacs-lisp/shortdoc.el (file, list): Fix misspelled function names: 'file-writable-p' and 'seq-reduce'. * test/lisp/emacs-lisp/shortdoc-tests.el (subr-x): Require. (shortdoc-all-functions-fboundp): New test.
* ; Add "src" to the heuristic sub-directory heuristicPhilip Kaludercic2022-12-271-12/+15
| | | | | * lisp/emacs-lisp/package-vc.el (package-vc--unpack): Check for "src" directories, next to "lisp".
* loaddefs-gen: Group results by absolute file nameKyle Meyer2022-12-261-1/+2
| | | | | | | | | | | | | | | loaddefs-generate produced an incomplete output file if 1) it was called with a relative file name and 2) that same file was specified via a generated-autoload-file cookie in a subset of the input files. In that case, autoload entries were lost because loaddefs-generate writes the same output file twice: once for the relative name specified by the caller and once for the absolute name that loaddefs-generate--parse-file returns for the generated-autoload-file value. This has been fixed. (Bug#60318) * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Expand file names when grouping loaddef files.
* Remove remaining mentions of 'eval-current-buffer'Gregory Heytings2022-12-261-3/+3
| | | | | | | | * lisp/emacs-lisp/edebug.el (edebug-all-defs): * doc/lispref/eval.texi (Eval): * doc/lispref/edebug.texi (Instrumenting, Edebug Options): Remove remaining mentions of 'eval-current-buffer', obsoleted in Emacs 22 and removed in Emacs 26.
* ; Review and fix NEWS and related documentationEli Zaretskii2022-12-251-1/+4
| | | | | | | | | * etc/NEWS: Fix wording, punctuation, and markup. * lisp/emacs-lisp/subr-x.el (string-glyph-split): Doc fix. * doc/lispref/display.texi (Displaying Messages): Document 'set-message-functions'.
* ; Always consider :lisp-dir when locating main file of VC packagesPhilip Kaludercic2022-12-251-1/+3
| | | | | | * lisp/emacs-lisp/package-vc.el (package-vc--main-file): Check the :lisp-dir entry in the "extras" of a package description to find the directory with a main file.
* Add heuristic to locate lisp code in source packagesPhilip Kaludercic2022-12-251-0/+14
| | | | | | | * lisp/emacs-lisp/package-vc.el (package-vc--unpack): Check if a "lisp" directory exists and use that instead of PKG-DIR. (Bug#60155)
* Reorder optional arguments to 'package-vc-install'Philip Kaludercic2022-12-251-5/+9
| | | | | | * lisp/emacs-lisp/package-vc.el (package-vc-install-selected-packages): Update 'package-vc-install' invocation. (package-vc-install): Reorder and update documentation.
* Handle missing dependencies for source packagesPhilip Kaludercic2022-12-251-87/+144
| | | | | | | | | | | | * lisp/emacs-lisp/package-vc.el (package-vc-install-dependencies): Add new function. (package-vc--unpack-1): Call 'package-vc-install-dependencies' instead of 'package-compute-transaction' and 'package-download-transaction'. It is unreasonable to abort the installation, since we cannot expect all dependencies to be available in the regular archives. Instead we note which packages couldn't be found, and warn the user that these will be missing.
* ; Partial revert of f3e7820bPhilip Kaludercic2022-12-251-1/+1
| | | | | * lisp/emacs-lisp/package.el (package-install-from-archive): Check if a package is a directory package, not a VC package
* Add more functions to "string" shortdocXi Lu2022-12-241-0/+9
| | | | | * lisp/emacs-lisp/shortdoc.el: Add 'string-or-null-p', 'char-or-string-p', 'char-uppercase-p'. (Bug#60279)
* ert-x: Move window selection logic to its own macroRichard Hansen2022-12-241-10/+21
| | | | | | | | | | | | | | * lisp/emacs-lisp/ert-x.el (ert-with-buffer-selected): New macro to temporarily display a buffer in a selected window and evaluate a body. (ert-with-test-buffer-selected): Use the new macro. * test/lisp/whitespace-tests.el (ert-test-with-buffer-selected/current) (ert-test-with-buffer-selected/selected) (ert-test-with-buffer-selected/nil-buffer) (ert-test-with-buffer-selected/modification-hooks) (ert-test-with-buffer-selected/read-only) (ert-test-with-buffer-selected/return-value): Add tests. (Bug#60189)