summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
...
* Change how thread-first/thread-last indent the first argumentLars Ingebrigtsen2021-09-221-3/+3
| | | | | | | | | | | | | | * lisp/doc-view.el (doc-view--current-cache-dir): Reindent. * lisp/emacs-lisp/subr-x.el (thread-first): (thread-last): Change indentation to match examples. (internal--build-binding): Reindent. * test/lisp/emacs-lisp/subr-x-tests.el (subr-x-test-thread-first-function-names-are-threaded): (subr-x-test-thread-first-examples): (subr-x-test-thread-last-function-names-are-threaded): (subr-x-test-thread-last-examples): Reindent.
* ; * etc/NEWS: Improve wording of an item.Stefan Kangas2021-09-211-2/+3
| | | | * lisp/emacs-lisp/hierarchy.el: Improve wording of package description.
* Don't quote nil and t in doc strings and commentsLars Ingebrigtsen2021-09-217-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/src/minibuf-tests.el (test-try-completion-ignore-case): * test/lisp/url/url-auth-tests.el (url-auth-test-digest-auth-retrieve-cache): * test/lisp/subr-tests.el (subr-tests-add-hook-depth): * test/lisp/so-long-tests/so-long-tests.el (so-long-tests-invisible-buffer-function): * test/lisp/emacs-lisp/tabulated-list-test.el (tabulated-list-sort): * src/xfaces.c: * src/process.c (Finterrupt_process): (syms_of_process): * src/minibuf.c (Fread_from_minibuffer): (Fcompleting_read): (syms_of_minibuf): * src/dispnew.c (syms_of_display): * src/data.c: * lisp/so-long.el (so-long--hack-local-variables): * lisp/progmodes/elisp-mode.el (elisp--xref-find-definitions): (elisp--xref-find-definitions): * lisp/org/ox-html.el (org-html-htmlize-output-type): * lisp/org/org-agenda.el (org-agenda-do-in-region): * lisp/net/tramp.el: * lisp/minibuffer.el (set-minibuffer-message): * lisp/isearch.el (isearch-wrap-pause): (isearch-repeat-on-direction-change): * lisp/emacs-lisp/timer.el (timer): * lisp/emacs-lisp/package.el (package-read-archive-contents): * lisp/emacs-lisp/faceup.el (faceup-next-property-change): * lisp/emacs-lisp/comp.el (comp-func): * lisp/emacs-lisp/comp-cstr.el (comp-cstr-empty-p): * lisp/emacs-lisp/cl-macs.el (cl-do): (cl-do*): (cl--self-tco): * lisp/emacs-lisp/bytecomp.el (byte-compile-unresolved-functions): (byte-compile-cond-jump-table): Don't quote t and nil.
* Add new function `ensure-list'Lars Ingebrigtsen2021-09-211-0/+3
| | | | | | | | * doc/lispref/lists.texi (Building Lists): Document it. * lisp/subr.el (ensure-list): New function. * lisp/emacs-lisp/shortdoc.el (list): Mention it.
* ; * lisp/emacs-lisp/checkdoc.el: Fix warnings.Stefan Kangas2021-09-211-4/+5
|
* Minor clean-up and fixes in checkdocStefan Kangas2021-09-211-44/+44
| | | | | | | | * lisp/emacs-lisp/checkdoc.el: Minor doc fixes. Remove unnecessary space at the end of 'y-or-n-p' prompts. Move obsolete definitions to the end of the file. (checkdoc-symbol-words, checkdoc-common-verbs-wrong-voice): Add some more common words.
* checkdoc: New defvars to disable some warningsStefan Kangas2021-09-211-10/+42
| | | | | | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc--argument-missing-flag) (checkdoc--disambiguate-symbol-flag) (checkdoc--interactive-docstring-flag): New defvars to disable some warnings. These are intended for use with Emacs itself rather than with third-party libraries. (checkdoc-this-string-valid, checkdoc-this-string-valid-engine): Respect above new variables.
* Add new command 'checkdoc-dired'Stefan Kangas2021-09-211-0/+33
| | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-dired): New command. (checkdoc--dired-skip-lines-re): New constant.
* Consistently test alist keys with equal in map.elBasil L. Contovounesios2021-09-211-7/+11
| | | | | | | | | | | | | | | | | * etc/NEWS: Announce new default behavior of map-elt and map-delete on alists. * lisp/emacs-lisp/map.el: Bump to version 3.2. (map-elt): Test alist keys with equal by default. Betray a little bit more information in the docstring on which functions are used for which map types. (Bug#47368) (map-put): Update docstring accordingly. (map--plist-delete): Consistently test plist keys with eq. (map-delete): Consistently test alist keys with equal. * test/lisp/emacs-lisp/map-tests.el (test-map-elt-testfn): Update for new map-elt behavior. (test-map-put!-alist, test-map-delete-alist): New tests.
* Revert "Flag checkdoc-symbol-words as a :safe variable"Stefan Kangas2021-09-191-1/+0
| | | | | | | There was no need for this change, as this variable was already marked as :safe. This reverts commit 222a7a1a8afdf6921e5981133c605c2d695e9281.
* ; Fix typo in package.el doc string王滋涵 Zephyr Wang2021-09-191-1/+1
| | | | | | | * lisp/emacs-lisp/package.el (package-archive-column-width): Fix copy-paste in doc string (bug#50678). Copyright-paperwork-exempt: yes
* Clarify docstring of pcase-exhaustiveStefan Kangas2021-09-191-1/+5
| | | | | * lisp/emacs-lisp/pcase.el (pcase-exhaustive): Clarify docstring by contrasting with pcase. (Bug#44166)
* checkdoc: Verify format of yes-or-no-p and format-messageStefan Kangas2021-09-191-5/+13
| | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-message-text-next-string): Check also for "yes-or-no-p" and "format-message". Convert regexps to use rx.
* Flag checkdoc-symbol-words as a :safe variableStefan Kangas2021-09-191-0/+1
| | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-symbol-words): Flag as a safe file local variable.
* Use command substitution in checkdoc-recursive-editStefan Kangas2021-09-181-18/+21
| | | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-recursive-edit): Use command substitution. (checkdoc--help-buffer): New variable. Use it instead of hard-coded string.
* Use command substitution for exit-recursive-editStefan Kangas2021-09-181-1/+2
| | | | | | * lisp/bindings.el (mode-line-modes): * lisp/emacs-lisp/checkdoc.el (checkdoc-recursive-edit): Use command substitution for 'exit-recursive-edit'.
* Improve doc strings of a recent commitEli Zaretskii2021-09-184-6/+9
| | | | | | | | * lisp/emacs-lisp/generator.el (iter-defun): * lisp/emacs-lisp/comp.el (comp-clean-up-stale-eln): * lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode): * lisp/emacs-lisp/autoload.el (autoload-insert-section-header): Include description of arguments in the doc string's first line.
* ; More stylistic docfixes in emacs-lisp/*.el found by checkdocStefan Kangas2021-09-1820-37/+37
|
* * lisp/emacs-lisp/checkdoc.el: Doc fix; mention flymake.Stefan Kangas2021-09-181-3/+4
|
* Do interactive mode tagging for checkdoc.elStefan Kangas2021-09-181-9/+9
|
* checkdoc: Only look for commonly used modifier keysStefan Kangas2021-09-181-1/+3
| | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine): Search for the modifier key "s-", but not the modifier key "A-". The latter is very uncommon and leads to false positives.
* checkdoc: 'y-or-n-p' no longer needs spaceStefan Kangas2021-09-171-50/+32
| | | | | | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-message-text-engine): Change 'y-or-n-p' check to accept prompt ending with both "? " or "?", that is, it no longer needs the space. (Bug#50621) (checkdoc--fix-y-or-n-p): New helper function. * test/lisp/emacs-lisp/checkdoc-tests.el (checkdoc-tests-fix-y-or-n-p) (checkdoc-tests-fix-y-or-n-p/no-change) (checkdoc-tests-fix-y-or-n-p/with-space): New tests.
* Improve performance of seq-unionStefan Kangas2021-09-171-7/+7
| | | | | * lisp/emacs-lisp/seq.el (seq-union): Improve performance by using nreverse instead of seq-reverse.
* Make ediff-union into obsolete alias for seq-unionStefan Kangas2021-09-171-0/+1
| | | | | | | | * lisp/emacs-lisp/seq.el (seq-union): Autoload. * lisp/vc/ediff-util.el (ediff-union): Make into obsolete function alias for 'seq-union'. * lisp/vc/ediff-mult.el (ediff-intersect-directories): Update single caller.
* Add new sequence function 'seq-union'Stefan Kangas2021-09-172-0/+13
| | | | | | | | * lisp/emacs-lisp/seq.el (seq-union): New function. * doc/lispref/sequences.texi (Sequence Functions): * lisp/emacs-lisp/shortdoc.el (sequence): Document above new function. * test/lisp/emacs-lisp/seq-tests.el (test-seq-union): New test.
* ; Minor stylistic fixes found by checkdocStefan Kangas2021-09-161-3/+3
|
* Support '...' quoting in Lisp filesEli Zaretskii2021-09-161-2/+2
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2): Support quoting 'like this'.
* Prefer "website" to "homepage"Stefan Kangas2021-09-162-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These days, a "home page" is understood to be only "the main web page of a website" or "landing page", whereas a "website" is "a collection of web pages and related content" (Wikipedia). * doc/emacs/emacs.texi (Top): * doc/emacs/package.texi (Package Menu): * doc/lispintro/emacs-lisp-intro.texi (Top): * doc/lispref/elisp.texi (Top): * doc/lispref/tips.texi (Documentation Tips): * doc/misc/ede.texi (ede-project): * doc/misc/efaq-w32.texi (More information): * doc/misc/gnus-faq.texi (FAQ 5-7): * doc/misc/gnus.texi (About mairix): * doc/misc/mairix-el.texi (About): * doc/misc/reftex.texi (AUCTeX, Imprint): * lisp/cedet/ede/base.el (ede-project): * lisp/cedet/ede/system.el (ede-web-browse-home): * lisp/emacs-lisp/package.el (package-menu-mode-menu) (package-browse-url): * lisp/erc/erc-button.el (erc-emacswiki-url): * lisp/filesets.el (filesets-goto-homepage): * lisp/net/mairix.el: * lisp/net/webjump.el (webjump-sample-sites): * lisp/obsolete/vc-arch.el: * lisp/progmodes/idlw-shell.el (idlwave-shell-mode): * lisp/progmodes/idlwave.el (idlwave, idlwave-mode): * lisp/textmodes/reftex-vars.el (reftex): Prefer "website" to "home page". * doc/lispref/tips.texi (Documentation Tips): Sort the "URL" header comment before "Homepage". * lisp/emacs-lisp/lisp-mnt.el (lm-website): Rename from 'lm-homepage'. (lm-homepage): Make into alias for 'lm-website'.
* Various minor checkdoc tweaksStefan Kangas2021-09-161-5/+15
| | | | | | | | | | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-symbol-words): Add more "good" words that are used a lot in practice, and where using them doesn't really hurt the quality of the documentation. (checkdoc-proper-noun-list): Add "dired", remove "ispell"; the latter should not always be capitalized. (checkdoc-common-verbs-wrong-voice): Add some more common words. Don't check for "matches" as it leads to too many false positives and almost no fixes in practice. (checkdoc-this-string-valid-engine): Clarify comment. (checkdoc-in-abbreviation-p): Ignore some less common or non-standard abbreviations.
* checkdoc: Don't warn about command substitutions by defaultStefan Kangas2021-09-151-15/+20
| | | | | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-max-keyref-before-warn): Add new valid value nil meaning to never warn about too many command substitutions, and use this value as the default. This is no longer a performance problem on modern machines. (Bug#50599) (checkdoc-this-string-valid-engine): Respect above new valid value nil.
* * lisp/emacs-lisp/checkdoc.el (checkdoc-symbol-words): Fix type.Glenn Morris2021-09-141-1/+1
|
* Make `find-function-source-path' into obsolete aliasLars Ingebrigtsen2021-09-141-30/+20
| | | | | | | | | | | * lisp/finder.el (finder-commentary): Adjust usage. * lisp/emacs-lisp/find-func.el (find-function-source-path): Made into obsolete alias (bug#50508). (find-library-source-path): New name. (find-library-name, find-library, find-function-noselect) (find-variable-noselect, find-definition-noselect): Adjust usage and update doc strings.
* ; * lisp/emacs-lisp/checkdoc.el: Fix typo in previous commit.Stefan Kangas2021-09-141-1/+1
|
* ; More minor docfixes found by checkdocStefan Kangas2021-09-1424-117/+119
|
* Add user option to avoid checkdoc warning for unescaped left parenStefan Kangas2021-09-141-10/+19
| | | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-column-zero-backslash-before-paren): New user option to avoid warning on unescaped left parenthesis in column zero. (checkdoc-this-string-valid-engine): Respect above new option.
* Minor improvements to checkdocStefan Kangas2021-09-141-7/+9
| | | | | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-symbol-words): Add ignored values. (checkdoc-proper-noun-list): Remove XEmacs from list of words to capitalize; there is little need to insist on consistency here. (checkdoc-in-abbreviation-p): Add abbreviation "etc." and sort entries alphabetically.
* package-menu-execute doc string clarificationLars Ingebrigtsen2021-09-131-2/+4
| | | | | * lisp/emacs-lisp/package.el (package-menu-execute): Say what happens to upgrade-marked packages (bug#50551).
* Mention get-byte in shortdocLars Ingebrigtsen2021-09-131-0/+3
| | | | * lisp/emacs-lisp/shortdoc.el (buffer): Mention `get-byte' here.
* Improve checkdoc abbreviation handlingStefan Kangas2021-09-131-10/+26
| | | | | | | | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-in-abbreviation-p): New helper function. (checkdoc-sentencespace-region-engine): Fix handling abbreviations after escaped parenthesis. * test/lisp/emacs-lisp/checkdoc-tests.el (checkdoc-tests-in-abbrevation-p) (checkdoc-tests-in-abbrevation-p/with-parens) (checkdoc-tests-in-abbrevation-p/with-escaped-parens): New tests.
* Fix quoting style in Lisp commentsEli Zaretskii2021-09-121-1/+1
| | | | | | | | | | | * lisp/textmodes/rst.el: * lisp/progmodes/elisp-mode.el (elisp--xref-find-definitions): * lisp/org/org.el: * lisp/org/org-list.el (org-list-to-generic): * lisp/org/org-compat.el: * lisp/hexl.el (hexl-ascii-region): * lisp/emacs-lisp/lisp-mode.el: * lisp/calendar/calendar.el: In comments, quote 'like this'.
* ; Fix symbol quoting typosStefan Kangas2021-09-122-2/+2
|
* Remove obsolete variableMattias Engdegård2021-09-111-59/+32
| | | | | | * lisp/emacs-lisp/byte-opt.el (byte-optimize--vars-outside-condition): Remove. (byte-optimize-form-code-walker): Remove bindings.
* Propagate aliased lexical variables in byte compilerMattias Engdegård2021-09-111-17/+140
| | | | | | | | | | | | | | | | | | | | | | Replace uses of a variable aliasing another variable with that aliased variable, to allow for variable removal when possible. This also enables opportunities for other optimisations. Example: (let ((y x)) (f y)) => (f x) The optimisation is only performed if both aliased and aliasing variables are lexically bound. Shadowing bindings are α-renamed when necessary for correctness. Example: (let* ((b a) (a EXPR)) (f a b)) => (let* ((a{new} EXPR)) (f a{new} a)) * lisp/emacs-lisp/byte-opt.el (byte-optimize--aliased-vars): New. (byte-optimize-form-code-walker): Cancel aliasing upon mutation. (byte-optimize--rename-var-body, byte-optimize--rename-var): New. (byte-optimize-let-form): Add the optimisation. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases): Add relevant test cases.
* ; * lisp/emacs-lisp/comp.el (native-comp-compiler-options): Doc fix.Eli Zaretskii2021-09-111-1/+1
|
* Add support for GCC compiler command-line optionsArthur Miller2021-09-102-0/+21
| | | | | | | | | * lisp/emacs-lisp/comp.el ('native-comp-compiler-options): New option. * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Add support for new 'native-comp-compiler-options'. * src/comp.c (Fcomp_native_compiler_options_effective_p): New function. (add_compiler_options): New function. (Fcomp__compile_ctxt_to_file): Call 'add_compiler_options'.
* Normalise nested `progn` forms in byte-code optimiserMattias Engdegård2021-09-061-2/+6
| | | | | | * lisp/emacs-lisp/byte-opt.el (byte-optimize-body): Flatten body. This simplifies the source tree and reduces the number of different cases that other optimisations need to take into account.
* More robust optimisation of `ignore`Mattias Engdegård2021-09-062-8/+9
| | | | | | | | | | | | | | Treat `ignore` as any other function during source-level optimisation, to avoid having its warning-suppression effects cancelled by repeated passes. Instead, define a custom code generation function. * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Don't treat `ignore' specially here. (side-effect-free-fns): Don't mark `ignore` as side-effect-free or error-free (although it is), since that would allow the optimiser to elide calls. * lisp/emacs-lisp/bytecomp.el (ignore, byte-compile-ignore): Define and register a code-gen function.
* Optimise `member` and `assoc` (etc) with constant empty listMattias Engdegård2021-09-061-25/+41
| | | | | | | | | * lisp/emacs-lisp/byte-opt.el (byte-optimize-assq): New. (byte-optimize-member, byte-optimize-assoc, byte-optimize-memq): When the list argument is constant nil, the result is always nil. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases): Add test cases.
* Restore the debugging window size more reliablymartin rudalics2021-09-061-10/+9
| | | | | * lisp/emacs-lisp/debug.el (debug): Restore the debugging window size more reliably (bug#12921).
* Autoload cl-struct-slot-infoLars Ingebrigtsen2021-09-051-0/+1
| | | | | | | * lisp/emacs-lisp/cl-macs.el (cl-struct-slot-info): Autoload (bug#50301). * test/lisp/emacs-lisp/memory-report-tests.el: Don't require cl-macs.