summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
* Consider built-in packages to be installedMatt Armstrong2022-08-021-1/+4
| | | | | * lisp/emacs-lisp/package.el (package-installed-p): Check for built-in packages before initialization. (bug#56877).
* Don't disable eldoc when doing edebugLars Ingebrigtsen2022-08-021-1/+0
| | | | | | | | * lisp/emacs-lisp/eldoc.el (eldoc-display-message-no-interference-p): Don't disable eldoc when edebugging (bug#56459). There should be no interference in that case, because edebug messaging is done after stepping, and eldoc messaging is done after other movements.
* Fix the bytecode incompatibility due to the change to 'narrow-to-region'.Gregory Heytings2022-08-012-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | * src/editfns.c (narrow_to_region_internal): New function, which contains the body previously in 'Fnarrow_to_region' but accepts a third argument. (Fnarrow_to_region): Use the new function. Update the docstring. (Fwiden): Update the docstring. * src/lisp.h: Prototype of the new function. * src/xdisp.c (handle_fontified_prop): Use the new function instead of 'Fnarrow_to_region'. * src/process.c (Finternal_default_process_filter): * src/lread.c (readevalloop): Remove the third argument to 'Fnarrow_to_region'. * src/bytecode.c (exec_byte_code): * lisp/emacs-lisp/comp.el (comp-limplify-lap-inst): * lisp/emacs-lisp/bytecomp.el: Restore the statu quo ante. * etc/NEWS: Remove the entry about the new optional argument. * doc/lispref/positions.texi (Narrowing): Update the documentation.
* Omit some (current-time) callsPaul Eggert2022-08-012-2/+2
| | | | | | | | | | * lisp/emacs-lisp/ert.el (ert-write-junit-test-summary-report): * lisp/emacs-lisp/shortdoc.el (file): * lisp/find-lisp.el (find-lisp-find-dired-insert-file): * lisp/progmodes/hideif.el (hide-ifdefs): * lisp/tar-mode.el (tar-subfile-save-buffer): Prefer nil or omitted arg to (current-time) where this is better or more-efficient.
* Allow specifying that loaddefs files shouldn't not be compiledLars Ingebrigtsen2022-07-311-2/+5
| | | | | | * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--rubric): Allow specifying that we shouldn't include a no-compile cookie (bug#53024).
* Reduce internal rx autoloadsMattias Engdegård2022-07-311-4/+6
| | | | | | | * lisp/emacs-lisp/rx.el (rx--to-expr, rx--pcase-transform): Don't autoload. (rx--pcase-macroexpander): Extract body into... (rx--pcase-expand): ...a separate function, which is autoloaded.
* * lisp/emacs-lisp/eieio-base.el (eieio-persistent-read): Simplify.Stefan Kangas2022-07-311-26/+20
|
* Fix ede byte-compile warnings in loaddefs.elLars Ingebrigtsen2022-07-311-0/+1
| | | | | | * lisp/emacs-lisp/eieio.el (make-instance): * lisp/cedet/ede/auto.el (ede-add-project-autoload): Autoload functions referred to by ede/loaddefs.el.
* Remove loaddefs debug codeLars Ingebrigtsen2022-07-311-1/+0
| | | | | * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--rubric): Remove code inadvertantly checked in.
* Fix cl byte-compile warning in cl-loaddefs.elLars Ingebrigtsen2022-07-312-0/+4
| | | | | | * lisp/emacs-lisp/cl-macs.el (cl--optimize) (cl-struct-sequence-type, cl-struct-slot-offset): Autoload since they are referred to by code in cl-loaddefs.el.
* Fix remaining byte-compile warnings in loaddefs.elLars Ingebrigtsen2022-07-311-0/+1
| | | | | | | * lisp/progmodes/compile.el (compilation--default-buffer-name): * lisp/kmacro.el (kmacro-name-last-macro): * lisp/emacs-lisp/package.el (package--activate-all): Autoload to avoid byte-compilation warnings when byte-compiling loaddefs.el.
* Fix rx.el byte-compile warning in loaddefs.elLars Ingebrigtsen2022-07-311-0/+4
| | | | | * lisp/emacs-lisp/rx.el (rx--to-expr, rx--pcase-transform): Autoload to avoid warning when byte-compiling loaddefs.el.
* Fix further package.el loaddefs byte-compile warningsLars Ingebrigtsen2022-07-311-0/+3
| | | | | | | | * lisp/emacs-lisp/package.el (package-directory-list) (package-quickstart-file): Specify group to avoid warning when byte-compiling loaddefs.el. (package-activated-list): Autoload since we're assigning the variable from a function completely autoloaded.
* Fix loaddefs byte-compile warning from package.elLars Ingebrigtsen2022-07-311-0/+1
| | | | | * lisp/emacs-lisp/package.el (package-user-dir): :group has to be explicit for autoloaded defcustoms.
* Delete redisplay-end-trigger-functions and related defunsStefan Kangas2022-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This variable and related functions have been obsolete since 23.1. The last things to depend on this (fast-lock.el and lazy-lock.el) were recently removed. * src/dispextern.h (struct it): Delete field 'redisplay_end_trigger_charpos'. * src/window.c (Fwindow_redisplay_end_trigger) (Fset_window_redisplay_end_trigger): Delete defuns and corresponding defsubrs for functions obsolete since 23.1. * src/window.h (wset_redisplay_end_trigger): Delete function. (GCALIGNED_STRUCT): Delete 'redisplay_end_trigger'. * src/xdisp.c (run_redisplay_end_trigger_hook): Delete function. (syms_of_xdisp) <redisplay_end_trigger_functions>: Delete variable obsolete since 23.1. (init_iterator, next_element_from_buffer): Don't run or set above deleted hook variable. * lisp/subr.el: Delete obsoletion definitions for above deleted defuns and variable. * doc/lispref/hooks.texi (Standard Hooks): * lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): * lisp/loadhist.el (unload-feature-special-hooks): Don't mention above deleted variable. * admin/coccinelle/window.cocci: Adjust for above changes.
* Fix native compiler handling of narrow-to-regionGerd Möllmann2022-07-301-5/+1
| | | | | * lisp/emacs-lisp/comp.el (comp-limplify-lap-inst): Use auto for byte-narrow-to-region.
* Tweak icons.el emoji detectionLars Ingebrigtsen2022-07-301-1/+1
| | | | | | * lisp/emacs-lisp/icons.el (icons--create): Choose another character that's unlikely to appear in non-Emoji fonts. (Comment left in place since this should be fixed in a less breakable way.)
* ; * lisp/emacs-lisp/icons.el (icon-preference): repair typeMattias Engdegård2022-07-301-4/+4
|
* Handle the optional argument of 'narrow-to-region' in byte-compiled code.Gregory Heytings2022-07-301-2/+2
| | | | | | * lisp/emacs-lisp/bytecomp.el: Adapt the specifications. * src/bytecode.c (exec_byte_code): Get the optional argument.
* ; * lisp/emacs-lisp/regi.el: Delete incorrect "last modified" comment.Stefan Kangas2022-07-301-1/+0
|
* Adapt native compiler to change in narrow-to-regionGerd Möllmann2022-07-291-1/+2
| | | | | * lisp/emacs-lisp/comp.el (comp-limplify-lap-inst): Add third argument nil for narrow-to-region.
* Cleanup `string-equal-ignore-case' declarations.Sam Steingold2022-07-281-4/+3
| | | | | | | | | | | | | | Also, a minor declaration cleanup for other `compare-strings' thin wrappers. * lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Remove `string-equal-ignore-case', `string-prefix-p', `string-suffix-p'. (side-effect-and-error-free-fns): Add `proper-list-p' (it already was in `pure-fns'). (pure-fns): Remove `string-prefix-p', `string-suffix-p' (`string-equal-ignore-case' was missing here). * lisp/subr.el (proper-list-p): Remove partially duplicate `put's from here. (string-equal-ignore-case, string-prefix-p, string-suffix-p): Add `pure' and `side-effect-free' declarations. (string-equal-ignore-case): Make inline.
* Comment fixes for recent icon codeLars Ingebrigtsen2022-07-281-2/+0
| | | | | | * lisp/cus-edit.el (custom-icon-state): Add comment. * lisp/emacs-lisp/icons.el: Remove comment.
* ; Minor fixes to the "icons" featureEli Zaretskii2022-07-281-1/+3
| | | | | | | | * lisp/emacs-lisp/icons.el (icons--create): Use 'display-images-p' to test for image capability. * doc/lispref/display.texi (Icons): Improve indexing, cross-references, and wording.
* ; Delete LCD Archive entriesStefan Kangas2022-07-282-14/+2
| | | | | | | * lisp/emacs-lisp/advice.el: * lisp/emacs-lisp/trace.el: * lisp/mail/feedmail.el: * lisp/mail/supercite.el: Delete entries for the defunct LCD Archive.
* Use icons in warnings buffersLars Ingebrigtsen2022-07-281-25/+30
| | | | | | | | * lisp/emacs-lisp/warnings.el (warning-suppress-action) (warning-suppress-log-action): Removed. New icon. (warnings-suppress): New helper function. (display-warning): Use it (bug#46025).
* Add support for user-customizable iconsLars Ingebrigtsen2022-07-281-0/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/custom.texi (Specific Customization): Mention it. * doc/emacs/display.texi (Icons): New node. * doc/lispref/display.texi (Icons): New node. * lisp/button.el (buttonize): (button--properties, buttonize-region): Allow not overriding faces. * lisp/cus-edit.el (custom-save-all): Save icons. (custom-icon): New widget. (custom-icon-value-create, custom-toggle-hide-icon) (custom--icons-widget-value, custom-icon-set): Helper functions for the widget. (customize-icon): Main command. (custom-icon-state-set, custom-icon-state): Helper functions. (custom-theme-set-icons): Function to be used by theme writers. (custom-set-icons): Function to be used in .emacs. (custom-save-icons): New function. * lisp/custom.el (custom-push-theme): Add icons. * lisp/emacs-lisp/icons.el: New file. * test/lisp/emacs-lisp/icons-tests.el: Add some tests.
* string-equal-ignore-case: new functionSam Steingold2022-07-264-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/cedet/semantic/complete.el (semantic-collector-calculate-completions): Use `string-prefix-p' instead of explicit `compare-strings'. * lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Add `string-equal-ignore-case'. * lisp/emacs-lisp/cl-extra.el (cl-equalp): Use `string-equal-ignore-case'. * lisp/emacs-lisp/shadow.el (load-path-shadows-find): Likewise. * lisp/emacs-lisp/shortdoc.el (string): Add `string-equal-ignore-case'. * lisp/files.el (file-truename): Use `string-equal-ignore-case'. (file-relative-name): Likewise. * lisp/gnus/gnus-art.el (article-hide-boring-headers): Use `string-equal-ignore-case' instead of `gnus-string-equal'. * lisp/gnus/gnus-util.el (gnus-string-equal): Remove, use `string-equal-ignore-case' instead. * lisp/international/mule-cmds.el (describe-language-environment): Use `string-equal-ignore-case'. (locale-charset-match-p): Likewise. * lisp/man.el (Man-softhyphen-to-minus): Use `string-prefix-p'. * lisp/minibuffer.el (completion--string-equal-p): Remove, use `string-equal-ignore-case' instead. (completion--twq-all): Use `string-equal-ignore-case'. (completion--do-completion): Likewise. * lisp/net/browse-url.el (browse-url-default-windows-browser): Use `string-prefix-p' instead of explicit `compare-strings'. * lisp/org/ob-core.el (org-babel-results-keyword): Use `string-equal-ignore-case' instead of explicit `compare-strings'. (org-babel-insert-result): Likewise. * lisp/org/org-compat.el (string-equal-ignore-case): Define unless defined already. (org-mode-flyspell-verify): Use `string-equal-ignore-case'. * lisp/org/org-lint.el (org-lint-duplicate-custom-id): Likewise. * lisp/org/ox.el (org-export-resolve-radio-link): Use `string-equal-ignore-case' and `string-clean-whitespace'. * lisp/progmodes/flymake-proc.el (flymake-proc--check-patch-master-file-buffer): Use `string-prefix-p' instead of explicit `compare-strings'. * lisp/progmodes/idlwave.el (idlwave-class-or-superclass-with-tag): Use `string-equal-ignore-case' instead of explicit `compare-strings'. * lisp/subr.el (member-ignore-case): Use `string-equal-ignore-case'. (string-equal-ignore-case): Compare strings ignoring case. * lisp/textmodes/bibtex.el (bibtex-string=): Remove. (bibtex-format-entry, bibtex-font-lock-url, bibtex-autofill-entry) (bibtex-print-help-message, bibtex-validate, bibtex-validate-globally) (bibtex-clean-entry, bibtex-completion-at-point-function, (bibtex-url): Use `string-equal-ignore-case' instead of `bibtex-string='. * lisp/textmodes/sgml-mode.el (sgml-get-context): Use `string-equal-ignore-case' instead of explicit `compare-strings'. (sgml-calculate-indent): Likewise * test/lisp/subr-tests.el (string-comparison-test): Add tests for `string-equal-ignore-case'.
* Make package-archives URL treatment slighty laxerRobert Pluim2022-07-251-1/+1
| | | | | | | | 'package-archives' URLs are expected to end in '/', but we can cater for people typoing that by using 'url-expand-file-name'. * lisp/emacs-lisp/package.el (package--with-response-buffer-1): Use 'url-expand-file-name' instead of 'concat'.
* Don't exclude current dir in `package--reload-previously-loaded'Paul Pogonyshev2022-07-241-6/+21
| | | | | * lisp/emacs-lisp/package.el (package--reload-previously-loaded): Don't exclude the current directory (bug#56614).
* Fix `lsh` warning shortcomings (bug#56641)Mattias Engdegård2022-07-231-1/+1
| | | | | | | | | | | | | Reported by Basil Contovounesios. * etc/NEWS: Mention how to suppress the warning. * lisp/emacs-lisp/byte-run.el (with-suppressed-warnings): Amend doc string. * lisp/subr.el: Use `macroexp-warn-and-return` to delay the warning until codegen time (which makes it suppressible) and to prevent repeated warnings. * test/lisp/international/ccl-tests.el (shift): * test/src/data-tests.el (data-tests-ash-lsh): Suppress warning in tests of `lsh` itself.
* ; * lisp/emacs-lisp/bytecomp.el: comment cleanupMattias Engdegård2022-07-231-8/+2
|
* Use special-mode in eldoc--doc-bufferLars Ingebrigtsen2022-07-231-2/+2
| | | | | | * lisp/emacs-lisp/eldoc.el (eldoc--format-doc-buffer): Use `special-mode' to allow normal customizations of the buffer (bug#56659).
* Fix off-by-one error in string-truncate-leftLars Ingebrigtsen2022-07-231-2/+6
| | | | | * lisp/emacs-lisp/subr-x.el (string-truncate-left): Fix off-by-one error (bug#56685).
* Fix typo in error message in native-compile-prune-cacheLars Ingebrigtsen2022-07-231-1/+1
| | | | | * lisp/emacs-lisp/comp.el (native-compile-prune-cache): Fix typo (bug#56713).
* Give a better error message in native-compile-prune-cacheLars Ingebrigtsen2022-07-221-0/+2
| | | | | * lisp/emacs-lisp/comp.el (native-compile-prune-cache): Give a better error message in non-nativecomp builds.
* ; * lisp/emacs-lisp/byte-opt.el (byte-optimize--fixnump): Optimise.Mattias Engdegård2022-07-211-1/+1
|
* ; Normalize some "Author" headersStefan Kangas2022-07-201-3/+2
|
* Gently discourage use of `lsh` (bug#56641)Mattias Engdegård2022-07-201-3/+0
| | | | | | | | * lisp/subr.el (lsh): Note the general preference for `ash`. * lisp/emacs-lisp/shortdoc.el (number): Remove entry for `lsh`. It was identical to that for `ash` which is misleading. Shortdoc is very helpful for finding the right function to use, and `lsh` is just for compatibility at this point.
* Prefer defvar-keymap in some trivial casesStefan Kangas2022-07-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/calendar/diary-lib.el (diary-fancy-overriding-map): * lisp/emacs-lisp/chart.el (chart-mode-map): * lisp/emulation/cua-base.el (cua-global-keymap) (cua--cua-keys-keymap, cua--prefix-override-keymap) (cua--prefix-repeat-keymap, cua--global-mark-keymap) (cua--rectangle-keymap, cua--region-keymap): * lisp/emulation/viper-keym.el (viper-vi-intercept-map) (viper-insert-intercept-map, viper-emacs-intercept-map) (viper-vi-global-user-map, viper-vi-basic-map, viper-vi-kbd-map) (viper-vi-diehard-map, viper-insert-global-user-map) (viper-insert-basic-map, viper-insert-diehard-map) (viper-insert-kbd-map, viper-replace-map) (viper-emacs-global-user-map, viper-emacs-kbd-map) (viper-empty-keymap, viper-mode-map, viper-minibuffer-map) (viper-ex-cmd-map, ex-read-filename-map) (viper-slash-and-colon-map, viper-comint-mode-modifier-map) (viper-dired-modifier-map, viper-gnus-modifier-map): * lisp/gnus/gnus-sum.el (gnus-summary-generic-mark-map): * lisp/menu-bar.el (global-buffers-menu-map) (menu-bar-preferences-menu): * lisp/mh-e/mh-e.el (mh-folder-mode-map, mh-inc-spool-map) (mh-search-mode-map, mh-show-mode-map): * lisp/play/dunnet.el (dungeon-batch-map): * lisp/progmodes/autoconf.el (autoconf-mode-map): * lisp/tool-bar.el (tool-bar-map): * lisp/vc/ediff-help.el (ediff-help-region-map): * lisp/vc/ediff-hook.el (menu-bar-epatch-menu) (menu-bar-ediff-merge-menu, menu-bar-ediff-menu): * lisp/windmove.el (windmove-mode-map): * lisp/xwidget.el (xwidget-webkit-isearch-mode-map) (xwidget-webkit-edit-mode-map): Prefer defvar-keymap.
* Make eldoc-echo-area-prefer-doc-buffer consider all framesJoão Távora2022-07-201-2/+3
| | | | | | | | | | | | Previously, it considered only windows on 'visible' frames (according to get-buffer-window). This seemed correct at first, but it's not much use for multiple TTY frames and not particularly reliable on GUI frames either. There's no reliable way to tell what is actually visible, so it's best to assume that users setup frames that are indeed visible when using this parameter. * lisp/emacs-lisp/eldoc.el (eldoc--echo-area-prefer-doc-buffer-p): Consider all frames.
* Ensure Eldoc buffer displays on interactive M-x eldocJoão Távora2022-07-201-3/+2
| | | | | | * lisp/emacs-lisp/eldoc.el (eldoc-display-in-buffer): Call eldoc-doc-buffer with interactive set to t. (Version): Bump to 1.13.0.
* Speed up `seq-subseq` for lists (bug#56521)Mattias Engdegård2022-07-181-8/+12
| | | | | | | | * lisp/emacs-lisp/seq.el (seq-subseq): Make faster by using `take` instead of a lisp loop, and more importantly by not front-loading the error text formatting. * test/lisp/emacs-lisp/seq-tests.el (seq-tests--list-subseq-ref) (test-seq-subseq): Test `seq-subseq` for lists more thoroughly.
* Use `take` where clearly safe to do so (bug#56521)Mattias Engdegård2022-07-181-5/+7
| | | | | | | | | | | | | * lisp/emacs-lisp/seq.el (seq-take): * lisp/auth-source.el (auth-source-secrets-search) (auth-source-plstore-search): * lisp/gnus/message.el (message-insert-formatted-citation-line): * lisp/net/dbus.el (dbus-unregister-object): * lisp/replace.el (occur-context-lines): * test/src/print-tests.el (print-circular): Replace hand-written loop or `butlast` call with `take` for clarity, performance and validation. We have the equivalence (take N LIST) = (butlast LIST (- (length LIST) N)).
* Add `take` and `ntake` (bug#56521)Mattias Engdegård2022-07-172-2/+6
| | | | | | | | | | | | | | These are useful list primitives, complementary to `nthcdr`. * src/fns.c (Ftake, Fntake): New. (syms_of_fns): Defsubr them. * doc/lispref/lists.texi (List Elements): * lisp/emacs-lisp/shortdoc.el (list): Document. * lisp/emacs-lisp/byte-opt.el (side-effect-free-fns, pure-fns): Declare `take` pure and side-effect-free. * test/src/fns-tests.el (fns-tests--take-ref, fns--take-ntake): New test. * etc/NEWS: Announce.
* Allow ;;;###autoloading transient-define-prefixLars Ingebrigtsen2022-07-161-1/+2
| | | | | | | | * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--make-autoload): Allow ;;;###autoloading transient-define-prefix (bug#48694). * lisp/transient.el (transient-define-prefix): Autoload.
* Optimise `append` callsMattias Engdegård2022-07-161-0/+78
| | | | | | | | | | | | | | | | | | | | | Add the transforms (append) -> nil (append X) -> X (append '(X) Y) -> (cons 'X Y) (append (list X) Y) -> (cons X Y) (append (list X...) nil) -> (list X...) and the argument transforms: (list X...) (list Y...) -> (list X... Y...) nil -> ;nothing CONST1 CONST2 -> CONST1++CONST2 (list CONSTANTS...) -> '(CONSTANTS...) (the last three for non-tail arguments only) * lisp/emacs-lisp/byte-opt.el: New.
* Improved cons optimisationMattias Engdegård2022-07-161-5/+8
| | | | | | | * lisp/emacs-lisp/byte-opt.el (byte-optimize-cons): Add the transform (cons X (list Y...)) -> (list X Y...)
* Transform (list) -> nil in source optimiserMattias Engdegård2022-07-161-0/+5
| | | | | | | | This optimisation is already done in the code generator but performing it at this earlier stage is a useful normalising step that uncovers more opportunities. * lisp/emacs-lisp/byte-opt.el (byte-optimize-list): New.
* ; Fix typosStefan Kangas2022-07-141-2/+2
|