summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
* * lisp/emacs-list/eieio-compat.el: Really move to obsoleteStefan Monnier2021-12-271-278/+0
|
* read-multiple-choice: Display "SPC" instead of " "Stefan Kangas2021-12-261-11/+13
| | | | | | | | | | * lisp/emacs-lisp/rmc.el (rmc--add-key-description): Improve display of the keys TAB, RET, SPC, DEL, and ESC. This fixes a bug where " " was highlighted in the description in a confusing way. * test/lisp/emacs-lisp/rmc-tests.el (test-rmc--add-key-description) (test-rmc--add-key-description/with-attributes): Update tests for the above change.
* read-multiple-choice: Add optional argument show-helpStefan Kangas2021-12-261-54/+68
| | | | | | | | * lisp/emacs-lisp/rmc.el (rmc--show-help): Factor out new function from read-multiple-choice. (read-multiple-choice): Add new optional argument show-help. * doc/lispref/commands.texi (Reading One Event): Document above new optional argument.
* read-multiple-choice: Add face when key not in name stringStefan Kangas2021-12-261-3/+10
| | | | | | | | * lisp/emacs-lisp/rmc.el (rmc--add-key-description): Add face property also when key is not in the name string. * test/lisp/emacs-lisp/rmc-tests.el (test-rmc--add-key-description/with-attributes) (test-rmc--add-key-description/non-graphical-display): Update tests.
* Factor out new function rmc--add-key-descriptionStefan Kangas2021-12-261-32/+30
| | | | | | | | | | * lisp/emacs-lisp/rmc.el (rmc--add-key-description): Factor out new function from... (read-multiple-choice): ...here. * test/lisp/emacs-lisp/rmc-tests.el (test-rmc--add-key-description) (test-rmc--add-key-description/with-attributes) (test-rmc--add-key-description/non-graphical-display): New tests.
* ; Fix last change: use 'utf-8-emacs-unix' encoding.Eli Zaretskii2021-12-261-3/+3
|
* Minor improvements in multisession.elEli Zaretskii2021-12-261-6/+9
| | | | | | | * lisp/emacs-lisp/multisession.el (multisession--read-file-value): Handle 'file-missing' error when reading values from files. (multisession--backend-values, multisession--backend-set-value) (multisession--read-file-value): Use 'utf-8-emacs' encoding.
* Use the new `permission-denied' error to catch multisession errorsLars Ingebrigtsen2021-12-211-1/+1
| | | | | * lisp/emacs-lisp/multisession.el (multisession--read-file-value): Use the new `permission-denied' error to catch file errors on Windows.
* Fix bug#28557Stefan Monnier2021-12-205-25/+33
| | | | | | | | | | | | | | | * test/lisp/emacs-lisp/cconv-tests.el: Remove `:expected-result :failed` from the bug#28557 tests. (cconv-tests-cl-function-:documentation): Account for the presence of the arglist (aka "usage") in the docstring. * lisp/emacs-lisp/cl-macs.el (cl--transform-lambda): * lisp/emacs-lisp/cl-generic.el (cl-defgeneric): Handle non-constant `:documentation`. * lisp/emacs-lisp/generator.el (iter-lambda): * lisp/emacs-lisp/cconv.el (cconv--convert-funcbody): Use `macroexp-parse-body`.
* ; * lisp/emacs-lisp/cl-macs.el (cl--self-tco): fix bootstrappingMattias Engdegård2021-12-201-2/+2
|
* Body of dynamic let-bindings is not in tail positionMattias Engdegård2021-12-201-3/+8
| | | | | | | | This fixes a known bug in `named-let`. * lisp/emacs-lisp/cl-macs.el (cl--self-tco): Prevent TCO from inside dynamic variable bindings. * test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs--labels): Add test.
* Add `macroexp--dynamic-variable-p`Mattias Engdegård2021-12-202-20/+42
| | | | | | | | | | | | | | | | | | | | | | | | | This predicate can be used for discriminating between lexically and dynamically bound variables during macro-expansion (only). It is restricted to internal use for the time being. * lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment): Use macroexpand--all-toplevel. * lisp/emacs-lisp/macroexp.el (macroexp-dynamic-variable-p): New. (macroexp--expand-all): Maintain macroexp--dynvars. (macroexpand-all): Rebind macroexp--dynvars. (macroexpand--all-toplevel): New. (internal-macroexpand-for-load): Use macroexpand--all-toplevel. * src/eval.c (eval_sub): Transfer defvar declarations from Vinternal_interpreter_environment into macroexp--dynvars during lazy macro-expansion. * src/lread.c (readevalloop): Rebind macroexp--dynvars around read-and-evaluate operations. (syms_of_lread): Define macroexp--dynvars. * test/lisp/emacs-lisp/macroexp-resources/vk.el: New file. * test/lisp/emacs-lisp/macroexp-tests.el (macroexp-tests--run-emacs) (macroexp-tests--eval-in-subprocess) (macroexp-tests--byte-compile-in-subprocess) (macroexp--tests-dynamic-variable-p): Add tests.
* Treat base64 string encode/decode as pure functionsMattias Engdegård2021-12-201-0/+2
| | | | | | * lisp/emacs-lisp/byte-opt.el (side-effect-free-fns, pure-fns): Mark base64-decode-string, base64-encode-string and base64url-encode-string as pure and side-effect-free.
* Add a new elp-restore-package commandDaniel Mendler2021-12-191-0/+8
| | | | | * lisp/emacs-lisp/elp.el (elp-restore-package): New command (bug#52457).
* Fix elp-*-list interactive specsLars Ingebrigtsen2021-12-191-2/+2
| | | | | * lisp/emacs-lisp/elp.el (elp-reset-list): (elp-restore-list): Fix the interactive specs (bug#52457).
* Remove incorrect byte-hunk-handler for `eval`Mattias Engdegård2021-12-181-9/+0
| | | | | | | | This optimisation is of very limited utility and miscompiles top-level code having the form (eval 'CODE t) by replacing it with CODE which will then, as things currently stand, be evaluated with dynamic binding. * lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-eval): Remove.
* Make generation of JUnit test reports more robust.Michael Albinus2021-12-181-13/+28
| | | | | | | | | | | | | | | | | * lisp/emacs-lisp/ert.el (ert-load-file-name): New defvar. (ert-write-junit-test-report): Use it. Make detection of selector more robust. Protect calls of `xml-escape-string' with 'noerror. * test/infra/Makefile.in (subdir_template): Use "make -k ...". * test/infra/gitlab-ci.yml (test-filenotify-gio): Adapt make_params in order to get a JUnit test report. (test-native-comp-speed0): Use "make -k ...". * test/infra/test-jobs.yml: Regenerate. * test/lisp/progmodes/perl-mode-tests.el (top): Set `ert-load-file-name'.
* Make multisession file reading more resilient on WindowsLars Ingebrigtsen2021-12-181-19/+26
| | | | | * lisp/emacs-lisp/multisession.el (multisession--read-file-value): Rename and try harder on file errors on Windows.
* Handle missing JUnit test reportsMichael Albinus2021-12-171-114/+118
| | | | | * lisp/emacs-lisp/ert.el (ert-write-junit-test-report) (ert-write-junit-test-summary-report): Handle missing JUnit test reports.
* multisession.el: Avoid old specializer syntaxStefan Monnier2021-12-171-8/+8
| | | | | | | | | | | Avoid the use of the old (eql VAL) specializer, preferring the new (eql EXP) form. * lisp/emacs-lisp/multisession.el (multisession-backend-value) multisession--backend-set-value, multisession--backend-values) multisession--backend-delete, multisession-backend-value) multisession--backend-set-value, multisession--backend-values) multisession--backend-delete): Quote the symbol passed to `eql` specializer.
* Improve multisession test results on MS-WindowsEli Zaretskii2021-12-171-1/+2
| | | | | | * lisp/emacs-lisp/multisession.el (multisession--backend-set-value): Force 'fsync'ing the temporary file.
* Fix parallel build with multisession.elLars Ingebrigtsen2021-12-171-1/+0
| | | | | | * lisp/emacs-lisp/multisession.el: Don't require url -- this pulls in gnus-util, which requires rmail, which depends on rmail-loaddefs being generated, which our Makefiles doesn't guarantee.
* Update files times in multisesssion properlyLars Ingebrigtsen2021-12-161-0/+1
| | | | | | * lisp/emacs-lisp/multisession.el (multisession--backend-set-value): Make cached/external files times match up.
* Make the multisession files value read more resilientLars Ingebrigtsen2021-12-161-9/+16
| | | | | * lisp/emacs-lisp/multisession.el (multisession--update-file-value): Make more resilient towards errors.
* Declare a couple more functions in multisession.elLars Ingebrigtsen2021-12-161-0/+2
| | | | * lisp/emacs-lisp/multisession.el: New file.
* Add support for multisession variablesLars Ingebrigtsen2021-12-161-0/+429
| | | | | | | | | * doc/lispref/elisp.texi (Top): Add to menu. (Top): * doc/lispref/variables.texi (Variables): Ditto. (Multisession Variables): Document multisession variables. * lisp/emacs-lisp/multisession.el: New file.
* Add errors in ert JUnit test reportsMichael Albinus2021-12-151-49/+85
| | | | | * lisp/emacs-lisp/ert.el (ert-write-junit-test-report) (ert-write-junit-test-summary-report): Handle errors.
* eieio-compat.el: Move to lisp/obsoleteStefan Monnier2021-12-141-0/+1
| | | | | | | | | | | The file only contains obsolete definitions, so it really belongs in `lisp/obsolete`. Moving it there will also signal a warning for those people who run old `.elc` files using EIEIO and generated with Emacs<25 and who otherwise might not know about the obsolescence of some of the functions they use. * lisp/emacs-lisp/eieio-compat.el: Move to ... * lisp/obsolete/eieio-compat.el: ... here.
* ERT can generate JUnit test reportsMichael Albinus2021-12-131-5/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * .gitignore: Add test/**/*.xml. * admin/notes/emba: Mention JUnit test report. * etc/NEWS: ERT can generate JUnit test reports. * lisp/emacs-lisp/ert.el (xml-escape-string): Autoload. (ert-write-junit-test-report) (ert-write-junit-test-summary-report): New defuns. (ert-run-tests-batch, ert-summarize-tests-batch-and-exit): Call them. * test/Makefile.in (clean): Remove *.xml. * test/README: Mention $EMACS_TEST_JUNIT_REPORT environment variable. * test/infra/Makefile.in ($(FILE)): Generate header commentary. (clean): Remove. * test/infra/gitlab-ci.yml (variables): Set EMACS_TEST_JUNIT_REPORT. (.job-template): Use it in script and after_script. (.build-template, .gnustep-template, .filenotify-gio-template) (.native-comp-template): Adapt rules. (.test-template): Trigger JUnit test report. * test/infra/test-jobs.yml: Regenerate.
* * lisp/emacs-lisp/generator.el (iter-yield): SimplifyStefan Monnier2021-12-131-4/+2
|
* ; * lisp/emacs-lisp/shortdoc.el (keymaps): Fix typo.Stefan Kangas2021-12-121-1/+1
|
* Constant-propagate access to captured variablesMattias Engdegård2021-12-111-2/+6
| | | | | | | | | | * lisp/emacs-lisp/byte-opt.el (byte-optimize--substitutable-p): Treat (internal-get-closed-var N) as constants for propagation purposes, because that is effectively what such forms will be compiled to. This allows for the elimination of some lexical variables. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases): Add test case.
* Use defvar-keymap for package-menu-mode-mapStefan Kangas2021-12-101-29/+27
| | | | | * lisp/emacs-lisp/package.el (package-menu-mode-map): Use defvar-keymap.
* Convert shortdoc-mode-map to defvar-keymapStefan Kangas2021-12-081-8/+6
| | | | | * lisp/emacs-lisp/shortdoc.el (shortdoc-mode-map): Convert to defvar-keymap.
* Remove some unnecessary references to Emacs 22Stefan Kangas2021-12-071-2/+1
| | | | | | | | | * lisp/cedet/semantic/fw.el: * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): * lisp/emulation/viper-util.el (viper-frame-value): * lisp/mail/rmail.el (rmail-delete-headers): * lisp/mh-e/mh-e.el (mh-inc-spool-list): Remove some unnecessary references to Emacs 22.
* Remove spurious space in byte-compiler warningStefan Kangas2021-12-061-2/+2
| | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-docstring-length-warn): Remove spurious space in byte-compiler warning. * test/lisp/emacs-lisp/bytecomp-tests.el ("warn-wide-docstring-defun.el"): Update test.
* Prefer nil to (current-time) when either will doPaul Eggert2021-12-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/timer.el (timer-event-handler, run-at-time): * lisp/gnus/gnus-score.el (gnus-score-date): * lisp/gnus/gnus-search.el (gnus-search-query-parse-date) (gnus-search-imap-handle-date): * lisp/gnus/gnus-sum.el (gnus-user-date) (gnus-summary-create-article): * lisp/image-dired.el (image-dired-create-thumb-1): * lisp/image/gravatar.el (gravatar-retrieve) (gravatar--prune-cache): * lisp/net/dbus.el (dbus-monitor-handler): * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-times): * lisp/net/tramp-sh.el (tramp-sh-handle-set-file-times): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-times): * test/lisp/autorevert-tests.el (auto-revert--wait-for-revert) (auto-revert-tests--write-file, auto-revert-test--wait-for): * test/lisp/net/tramp-tests.el (tramp--test-print-duration): Prefer nil to (current-time) when either will do, as this avoids some consing. Similarly, prefer omitting (current-time) arg when this is equivalent.
* ; Small doc fix in recent eieio-opt.el changeStefan Kangas2021-12-061-1/+1
| | | | | * lisp/emacs-lisp/eieio-opt.el (eieio-help-constructor): Quote functions to make links work in help-mode.
* EIEIO: Remove redundant type info in helpStefan Monnier2021-12-052-5/+1
| | | | | | | | | `C-h o` returned redundant info when used on EIEIO classes, listing the same thing both for the type name and for the constructor name. * lisp/emacs-lisp/eieio.el (help-fns-describe-function-functions): Remove special case for defclass constructors. * lisp/emacs-lisp/eieio-opt.el (eieio-help-constructor): Declare it obsolete.
* Don't fill byte-compilation warnings in batch modeLars Ingebrigtsen2021-12-061-1/+3
| | | | | | * lisp/emacs-lisp/warnings.el (display-warning): Don't break up byte-compilation into several lines when in batch mode, because that makes it difficult for some tools to parse them (bug#52281).
* Merge from origin/emacs-28Stefan Kangas2021-12-051-1/+1
|\ | | | | | | | | | | | | | | c086358574 Update to Org 9.5.1-15-gdb4805 fef3e60061 * lisp/emacs-lisp/edebug.el (edebug-eval-defun): Minor doc... a1e30e4106 ; Fix most remaining AUTHORS warnings f3e6a432c5 ; * doc/misc/efaq.texi (New in Emacs 28): Add more news. 00236cc802 Fix the enumeration values returned by 'try_scrolling'
| * * lisp/emacs-lisp/edebug.el (edebug-eval-defun): Minor doc fix.Stefan Kangas2021-12-041-1/+1
| |
* | Make package-dir-info more resilientLars Ingebrigtsen2021-12-051-7/+11
| | | | | | | | | | * lisp/emacs-lisp/package.el (package-dir-info): Check that the file exists before using it (bug#41489).
* | eieio-core.el: Allow assignment to cl-structs through `slot-value`Stefan Monnier2021-12-041-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/eieio-core.el (eieio--validate-slot-value): Obey the `:read-only` property of the slot. (eieio-oset): Allow use on cl-structs as well. (eieio-read-only): New error. * test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (eieio-test--struct): Make the last field read-only. (eieio-test-defstruct-slot-value): Test that cl-struct slots can be assigned via `slot-value`.
* | Remove some more items obsolete since Emacs 23Stefan Kangas2021-12-031-3/+0
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/shadow.el (find-emacs-lisp-shadows): * lisp/net/newst-backend.el (newsticker-cache-filename) (newsticker--cache-save-version1, newsticker--cache-update) (newsticker--cache-read-version1): * lisp/obsolete/vc-arch.el (vc-arch-command): Remove items obsolete since Emacs 23.
* | Clarify the run-at-time documentation about "integral multiple"Lars Ingebrigtsen2021-12-031-2/+10
| | | | | | | | | | | | * lisp/emacs-lisp/timer.el (run-at-time): * doc/lispref/os.texi (Timers): Explain what "integral multiple" really means.
* | ; Minor cleanup in re-builder after my last commitStefan Kangas2021-12-031-5/+5
| | | | | | | | | | * lisp/emacs-lisp/re-builder.el (reb-lisp-mode, reb-cook-regexp): Very minor cleanup (by popular demand).
* | Don't support obsolete sregex syntax in re-builderStefan Kangas2021-12-031-7/+7
| | | | | | | | | | | | * lisp/emacs-lisp/re-builder.el (reb-lisp-mode) (reb-lisp-syntax-p, reb-change-syntax, reb-cook-regexp): Remove final remaining references to the long obsolete sregex syntax.
* | * lisp/emacs-lisp/cl-macs.el (natnum): Fix typoStefan Monnier2021-12-031-1/+1
| |
* | * lisp/emacs-lisp/cl-macs.el (natnum): Define it as a typeStefan Monnier2021-12-031-0/+1
| |