summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
* 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
| |
* | Fix previous macroexp--warn-wrap changeLars Ingebrigtsen2021-12-021-5/+6
| | | | | | | | | | * lisp/emacs-lisp/macroexp.el (macroexp--warn-wrap): Don't call byte-compile-warning-enabled-p with zero parameters.
* | Add `cl-constantly' functionLars Ingebrigtsen2021-12-021-0/+5
| | | | | | | | | | * lisp/emacs-lisp/cl-lib.el (cl-constantly): Add Common Lisp function missing (bug#21584).
* | * lisp/emacs-lisp/macroexp.el: Improve last changeStefan Monnier2021-12-011-7/+8
| | | | | | | | | | | | | | | | | | Don't burp when `byte-compile-warning-enabled-p` is not yet defined. And use the call that we had already instead of adding a new one. (macroexp--warn-wrap): Allow `category` to be a list to pass to `byte-compile-warning-enabled-p`. (macroexp-macroexpand): Simplify accordingly.
* | Make use of `comp-cstr-shallow-copy'Andrea Corallo2021-12-012-50/+18
| | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/comp.el (comp-mvar-propagate): Remove. (comp-fwprop-call, comp-fwprop-insn): Use `comp-cstr-shallow-copy'. * lisp/emacs-lisp/comp-cstr.el (comp-cstr-set-cmp-range) (comp-cstr-union-1-no-mem, comp-cstr-union-1) (comp-cstr-intersection-no-mem, comp-cstr-intersection) (comp-cstr-negation): Use `comp-cstr-shallow-copy'.
* | * Redefine `comp-cstr-shallow-copy'Andrea Corallo2021-12-011-2/+10
| | | | | | | | | | | | | | * lisp/emacs-lisp/comp-cstr.el (comp-cstr): Don't synthesize copier function. (comp-cstr-shallow-copy): New function. (comp-cstr-=): Use `copy-sequence'.
* | * lisp/emacs-lisp/cl-macs.el (cl-defstruct): Decl struct predicates as pureAndrea Corallo2021-12-011-1/+1
| |
* | * lisp/emacs-lisp/cconv.el (cconv--lifted-arg): SimplifyStefan Monnier2021-12-011-3/+3
| |
* | Fix closure-conversion of shadowed captured lambda-lifted varsMattias Engdegård2021-12-011-6/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lambda-lifted variables (ones passed explicitly to lambda-lifted functions) that are also captured in an outer closure and shadowed were renamed incorrectly (bug#51982). Reported by Paul Pogonyshev. * lisp/emacs-lisp/cconv.el (cconv--lifted-arg): New. (cconv-convert): Provide correct definiens for the closed-over variable. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases): * test/lisp/emacs-lisp/cconv-tests.el (cconv-tests--intern-all) (cconv-closure-convert-remap-var): Add tests.
* | Autoload byte-compile-warning-enabled-pLars Ingebrigtsen2021-12-011-0/+1
| | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-warning-enabled-p): Autoloads (for easier use in macroexp etc).
* | Make "make force-autoloads" produce the correct resultLars Ingebrigtsen2021-12-011-1/+1
| | | | | | | | | | * lisp/emacs-lisp/autoload.el (cl-lib): We need the cl-macs at runtime to expand cl-defmacros to find declare indent forms.
* | Don't include the other loaddef files in the no-autoloads sectionLars Ingebrigtsen2021-12-011-3/+11
| | | | | | | | | | * lisp/emacs-lisp/autoload.el (make-directory-autoloads): Don't include the other loaddef files in the no-autoloads section.
* | Generalise CPS-conversion let optimisationMattias Engdegård2021-11-301-7/+6
| | | | | | | | | | | | * lisp/emacs-lisp/generator.el (cps--transform-1): Eliminate a temporary for the last of any `let` form, not just for single-binding ones. Suggested by Stefan Monnier.
* | Allow inhibiting warnings about obsolete macros againLars Ingebrigtsen2021-11-301-4/+5
| | | | | | | | | | * lisp/emacs-lisp/macroexp.el (macroexp-macroexpand): Inhibit warning if requested (bug#50984).
* | Better CPS conversion of multi-binding `let`Mattias Engdegård2021-11-301-5/+9
| | | | | | | | | | | | * lisp/emacs-lisp/generator.el (cps--transform-1): Don't translate single-binding `let` into `let*` with an extra temporary variable; it just adds two more useless states.
* | Fix up generation of help text for ldefs-boot.elLars Ingebrigtsen2021-11-291-1/+1
| | | | | | | | | | * lisp/emacs-lisp/autoload.el (autoload-rubric): Don't put the help text into cedet/*/loaddefs.el (bug#51744).
* | Signal a better error in tabulated-list-sortLars Ingebrigtsen2021-11-291-0/+4
| | | | | | | | | | * lisp/emacs-lisp/tabulated-list.el (tabulated-list-sort): Signal error earlier on invalid column numbers (bug#52154).
* | ; Don't use remq (breaks bootstrapping)Mattias Engdegård2021-11-281-1/+1
| |
* | Use compiler macros for the key syntax checksMattias Engdegård2021-11-281-63/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compile-time key string syntax checks are better written using compiler macros than with byte-hunk-handlers inside the compiler proper. * lisp/emacs-lisp/bytecomp.el (byte-compile-define-keymap) (byte-compile-define-keymap--define): Remove. * lisp/keymap.el (keymap--compile-check): New. (keymap-set, keymap-global-set, keymap-local-set, keymap-global-unset) (keymap-local-unset, keymap-unset, keymap-substitute) (keymap-set-after, key-translate, keymap-lookup, keymap-local-lookup) (keymap-global-lookup): Use compiler-macro for argument checks. * lisp/subr.el (define-keymap--compile): New. (define-keymap--define): Fold into define-keymap. (define-keymap): Use compiler-macro. (defvar-keymap): Use define-keymap.
* | Avoid unused argument warnings in lambda compiler macrosMattias Engdegård2021-11-281-0/+1
| | | | | | | | | | | | | | * lisp/emacs-lisp/byte-run.el (byte-run--set-compiler-macro): Don't warn when a compiler macro with lambda-form expander does not use all the arguments of the function. Nobody expected any warning since the arguments look like free variables inside the lambda form.
* | Indent `closure' forms betterLars Ingebrigtsen2021-11-251-0/+1
| | | | | | | | | | * lisp/emacs-lisp/lisp-mode.el (closure): Indent `closure' forms better (bug#52063).
* | Remove APPEND argument from add-display-text-propertyLars Ingebrigtsen2021-11-241-8/+5
| | | | | | | | | | | | * doc/lispref/display.texi (Display Property): Update doc. * lisp/emacs-lisp/subr-x.el (add-display-text-property): Remove the append argument -- it's nonsensical.
* | Add new function 'add-display-text-property'Lars Ingebrigtsen2021-11-241-0/+45
| | | | | | | | | | * doc/lispref/display.texi (Display Property): Document it. * lisp/emacs-lisp/subr-x.el (add-display-text-property): New function.
* | Fix string-glyph-split infloopLars Ingebrigtsen2021-11-241-1/+6
| | | | | | | | | | * lisp/emacs-lisp/subr-x.el (string-glyph-split): Fix infloop when applied to (string-glyph-split "✈️🌍") (bug#52067).
* | ; Further minor simplification of rx form in bytecomp.elStefan Kangas2021-11-221-2/+2
| | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile--wide-docstring-p): Simplify even more. Thanks to Mattias Engdegård <mattiase@acm.org>.
* | ; Fix typoStefan Kangas2021-11-221-1/+1
| | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile--wide-docstring-p): Fix typo.
* | ; Very minor simplification in bytecomp.elStefan Kangas2021-11-221-1/+1
| | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile--wide-docstring-p): Very minor simplification of 'rx' form.