summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* | Use substitute-command-keys for literal key sequencesStefan Kangas2021-11-222-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/abbrev.el (expand-region-abbrevs): * lisp/calc/calc-graph.el (calc-graph-show-dumb): * lisp/calc/calc-help.el (calc-help-for-help): * lisp/calc/calc-mode.el (calc-auto-why): * lisp/calc/calc.el (calc-do): * lisp/calculator.el (calculator-mode): * lisp/dired-aux.el (dired-create-files) (dired-do-create-files-regexp, dired-create-files-non-directory): * lisp/dired-x.el (dired-virtual): * lisp/dired.el (dired-mark-region, dired-unmark-all-files): * lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): * lisp/emacs-lisp/re-builder.el (reb-enter-subexp-mode): * lisp/epa-ks.el (epa-ks--display-keys): * lisp/erc/erc.el (erc-toggle-debug-irc-protocol): * lisp/files.el (save-some-buffers): * lisp/gnus/gnus-dired.el (gnus-dired-find-file-mailcap) (gnus-dired-print): * lisp/gnus/gnus-group.el (gnus-keep-same-level): * lisp/gnus/gnus-score.el (gnus-score-find-trace): * lisp/gnus/gnus.el (to-list): * lisp/gnus/message.el (message--send-mail-maybe-partially): * lisp/mail/supercite.el (sc-set-variable): * lisp/minibuffer.el (minibuffer-inactive-mode): * lisp/progmodes/etags.el (select-tags-table): * lisp/progmodes/idlw-shell.el (idlwave-shell-mode) (idlwave-shell-char-mode-loop): * lisp/replace.el (query-replace-help): * lisp/simple.el (set-variable): * lisp/subr.el (read-char-from-minibuffer): * lisp/textmodes/ispell.el (ispell-help, ispell-message): * lisp/textmodes/reftex-global.el (reftex-find-duplicate-labels): * lisp/textmodes/reftex-vars.el (reftex-toc-include-file-boundaries) (reftex-toc-include-labels, reftex-toc-include-index-entries) (reftex-toc-include-context, reftex-toc-follow-mode) (reftex-index-include-context, reftex-index-follow-mode) (reftex-enable-partial-scans) (reftex-auto-update-selection-buffers) (reftex-highlight-selection): * lisp/time.el (display-time-update): * lisp/vc/ediff-help.el (ediff-help-for-quick-help): * lisp/vc/ediff-init.el (ediff-keep-variants): * lisp/vc/ediff-ptch.el (ediff-fixup-patch-map) (ediff-patch-file-internal): * lisp/windmove.el (windmove-delete-default-keybindings): Use 'substitute-command-keys' for literal key sequences. * lisp/userlock.el (userlock--fontify-key): Remove function. (ask-user-about-lock, ask-user-about-lock-help) (ask-user-about-supersession-threat) (ask-user-about-supersession-help): Use 'substitute-command-keys' for literal key sequences. * lisp/ibuffer.el (ibuffer-unmark-all): Use 'substitute-command-keys' for command.
* | Avoid false positives about wide docstrings for key sequencesStefan Kangas2021-11-221-1/+6
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile--wide-docstring-p): Ignore literal key sequence substitutions. * test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-ignore-substitutions.el: New file. * test/lisp/emacs-lisp/bytecomp-tests.el ("warn-wide-docstring-ignore-substitutions.el"): New test.
* | Add new function buffer-text-pixel-sizemartin rudalics2021-11-221-2/+1
| | | | | | | | | | | | | | | | | | | | | | * doc/lispref/display.texi (Size of Displayed Text): Document it. * lisp/emacs-lisp/subr-x.el (string-pixel-width): Use buffer-text-pixel-size (bug#51995). * src/xdisp.c (window_text_pixel_size): Factor out from Fwindow_text_pixel_size. (Fbuffer_text_pixel_size): New function.
* | Make UCS compose/decompose functions more understandableLars Ingebrigtsen2021-11-191-2/+7
| | | | | | | | | | | | | | | | | | * lisp/international/ucs-normalize.el () (ucs-normalize-NFD-region, ucs-normalize-NFD-string) (ucs-normalize-NFC-region, ucs-normalize-NFC-string) (ucs-normalize-NFKD-region, ucs-normalize-NFKD-string) (ucs-normalize-NFKC-region, ucs-normalize-NFKC-string): Make the doc strings say what they actually do.
* | Fixup for bug#51037Filipp Gunbin2021-11-181-15/+8
| | | | | | | | | | | | | | * lisp/emacs-lisp/ert.el (ert-batch-backtrace-line-length): Fix docstring. (ert-run-tests-batch): Remove redundand let-binding. (ert-run-tests-interactively): Fix interactive spec.
* | Signal an error for duplicated ERT tests (bug#51941)Mattias Engdegård2021-11-181-0/+7
| | | | | | | | | | | | | | | | | | Make `ert-deftest` fail with an error (in batch mode only) if an existing test is redefined, because that is an easy mistake to make and which leads to a test being discarded silently. lisp/emacs-lisp/ert.el (ert-set-test, ert-deftest): Add check. etc/NEWS: Announce.
* | Fix eldoc usage of newly introduced variableGreg Minshall2021-11-181-1/+2
| | | | | | | | | | | | * lisp/emacs-lisp/eldoc.el (eldoc-display-message-no-interference-p): Make this function work in older Emacs versions again (bug#51939).
* | Change the call signature to keymap-substituteLars Ingebrigtsen2021-11-172-2/+2
| | | | | | | | | | | | | | * lisp/keymap.el (keymap-substitute): Make the keymap the first parameter for symmetry with the other functions. * lisp/emacs-lisp/shortdoc.el (keymaps): * lisp/emacs-lisp/bytecomp.el (lambda): Adjust.