summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
...
* Indent bodies of local function definitions properly in elisp-modeakater2021-09-251-10/+35
| | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-indent-function): Check for local defforms (`cl-flet' and `cl-labels'). (lisp--local-defform-body): New auxiliary function (bug#9622).
* Fix alignment on font size change in tabulated-list-modeStefan Kangas2021-09-251-1/+2
| | | | | | * lisp/emacs-lisp/tabulated-list.el (tabulated-list-print-col): Fix bug where the columns didn't align correctly when using 'text-scale-mode' to decrease the font size. (Bug#48639)
* Doc fix; cl-random is only pseudo-randomStefan Kangas2021-09-251-1/+1
| | | | | * lisp/emacs-lisp/cl-extra.el (cl-random): Doc fix; say it's only pseudo-random.
* checkdoc: Don't ask to disambiguate mode namesStefan Kangas2021-09-241-1/+4
| | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine): Don't ask to disambiguate mode names. (Bug#4110)
* Fix recently introduced bug in checkdocStefan Kangas2021-09-241-2/+3
| | | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-in-abbreviation-p): Fix recently introduced bug where some abbreviations weren't recognized. * test/lisp/emacs-lisp/checkdoc-tests.el (checkdoc-tests-in-abbrevation-p/basic-case): Extend test.
* checkdoc: Improve wide line warning to decrease false positivesStefan Kangas2021-09-241-6/+14
| | | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine): Respect 'byte-compile-docstring-max-column' if it is set. Allow the first line to be three characters longer than the others to account for indentation and the opening string character.
* Use command substitution instead of raw keys in more placesStefan Kangas2021-09-241-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | * admin/authors.el (authors): * lisp/abbrev.el (abbrev-suggest-show-report): * lisp/calc/calc.el (calc-display-trail, calc): * lisp/completion.el (completion-locate-db-error): * lisp/dired-x.el (dired-extra-startup): * lisp/emacs-lisp/package.el (package-install-selected-packages): * lisp/emulation/viper.el (viper-mode): * lisp/facemenu.el (list-colors-display): * lisp/mail/emacsbug.el (report-emacs-bug-hook): * lisp/mail/sendmail.el (mail): * lisp/menu-bar.el (menu-bar-mode): * lisp/org/org.el (org-revert-all-org-buffers): * lisp/progmodes/antlr-mode.el (antlr-help-rules-intro) (antlr-insert-makefile-rules): * lisp/progmodes/gdb-mi.el (gdb--check-interpreter): * lisp/progmodes/xscheme.el (xscheme-process-sentinel): * lisp/ps-print.el (ps-font-info-database): * lisp/recentf.el (recentf-edit-list, recentf-open-files): * lisp/vc/ediff-util.el (ediff-suspend): * lisp/vc/pcvs.el (cvs-mode): * lisp/vc/vc-bzr.el (vc-bzr-dir-extra-headers): Use command substitution.
* Prefer seq-random-elt to nth+randomStefan Kangas2021-09-241-0/+1
| | | | | | | | | | | | | | | | | * lisp/emacs-lisp/seq.el (seq-random-elt): Autoload. * lisp/avoid.el (mouse-avoidance-random-shape): * lisp/epa-ks.el (epa-ks--query-url): * lisp/erc/erc-networks.el (erc-server-select): * lisp/gnus/gnus-fun.el (gnus--random-face-with-type) (gnus-fun-ppm-change-string): * lisp/net/soap-inspect.el (soap-sample-value-for-xs-simple-type): * lisp/obsolete/landmark.el (landmark-random-move): * lisp/play/mpuz.el (mpuz-build-random-perm): * lisp/play/zone.el (zone-pgm-stress): * lisp/vc/add-log.el (add-change-log-entry): * test/lisp/net/tramp-tests.el (tramp-test44-asynchronous-requests): Prefer seq-random-elt to nth+random.
* ; * lisp/emacs-lisp/checkdoc.el (checkdoc-in-abbreviation-p): Doc fix.Stefan Kangas2021-09-241-2/+2
|
* checkdoc: Add abbreviation and simplifyStefan Kangas2021-09-231-5/+6
| | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-in-abbreviation-p): Add abbreviation "a.k.a.". Simplify.
* Avoid jumping too far in checkdoc-in-abbreviation-pStefan Kangas2021-09-231-19/+23
| | | | | | | | | | | | | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-in-abbreviation-p): Use 'forward-ward' instead of 'forward-sexp' to avoid jumping too far in some situations. (Bug#50731) * test/lisp/emacs-lisp/checkdoc-tests.el (checkdoc-tests--abbrev-test): New helper function. (checkdoc-tests-in-abbrevation-p/basic-case): Rename from 'checkdoc-tests-in-abbrevation-p'. (checkdoc-tests-in-abbrevation-p/with-parens) (checkdoc-tests-in-abbrevation-p/with-escaped-parens): Use above new helper function. (checkdoc-tests-in-abbrevation-p/single-char) (checkdoc-tests-in-abbrevation-p/with-em-dash) (checkdoc-tests-in-abbrevation-p/incorrect-abbreviation): New tests.
* Improve error messaging from byte-compiling dotted listsLars Ingebrigtsen2021-09-221-0/+2
| | | | | | | | | | | | | * lisp/emacs-lisp/cconv.el (cconv-analyze-form): Improve error messaging when byte-compiling dotted lists (bug#35186). Test case -- byte-compile the following file: ;;; -*- lexical-binding: t -*- (defun foo () (+ 1 2) (a . b))
* 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.