summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/checkdoc.el
Commit message (Collapse)AuthorAgeFilesLines
* ; Delete not-useful comments referring to Emacs 19.Stefan Kangas2022-08-191-1/+0
|
* Delete dead code in checkdoc.elStefan Kangas2022-08-101-20/+1
| | | | | * lisp/emacs-lisp/checkdoc.el: Delete code commented out since 1997.
* Minor checkdoc.el clean upLars Ingebrigtsen2022-08-041-2/+0
| | | | | * lisp/emacs-lisp/checkdoc.el (generate-autoload-cookie): This is no longer used, so remove reference.
* Remove some spurious references to XEmacsStefan Kangas2022-08-031-1/+1
| | | | | | * lisp/desktop.el (desktop--emacs-pid-running-p): * lisp/emacs-lisp/checkdoc.el (checkdoc-ispell-lisp-words): Don't mention XEmacs.
* Prefer defvar-keymap in emacs-lisp/*.elStefan Kangas2022-07-041-32/+24
| | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/backtrace.el (backtrace-mode-map): * lisp/emacs-lisp/bytecomp.el (emacs-lisp-compilation-mode-map): * lisp/emacs-lisp/checkdoc.el (checkdoc-minor-mode-map): * lisp/emacs-lisp/crm.el (crm-local-completion-map) (crm-local-must-match-map): * lisp/emacs-lisp/debug.el (debugger-mode-map): * lisp/emacs-lisp/edebug.el (edebug-mode-map, edebug-global-map) (edebug-eval-mode-map): * lisp/emacs-lisp/eieio-custom.el (eieio-custom-mode-map): * lisp/emacs-lisp/elp.el (elp-results-symname-map): * lisp/emacs-lisp/lisp-mode.el (lisp-mode-shared-map): * lisp/emacs-lisp/re-builder.el (reb-mode-map) (reb-lisp-mode-map, reb-subexp-mode-map): * lisp/emacs-lisp/tabulated-list.el (tabulated-list-mode-map) (tabulated-list-sort-button-map): * lisp/emacs-lisp/timer-list.el (timer-list-mode-map):
* Replace lisp-mode-symbol-regexp with (rx lisp-mode-symbol)Mattias EngdegÄrd2022-07-041-3/+3
| | | | | | | | | | | | | This is shorter, simplifies use inside rx expressions, and removes need for eval-when-compile elsewhere (for later exploitation). * lisp/emacs-lisp/lisp-mode.el (lisp-mode-symbol): New rx-define. (lisp-mode-symbol-regexp): Redefine using lisp-mode-symbol. (lisp-imenu-generic-expression, lisp--el-match-keyword) (lisp-fdefs, lisp-string-in-doc-position-p): * lisp/emacs-lisp/checkdoc.el (checkdoc--error-bad-format-p): * lisp/emacs-lisp/shorthands.el (shorthands-font-lock-shorthands): Use lisp-mode-symbol instead of lisp-mode-symbol-regexp.
* Make checkdoc-defun-info parsing slightly less wrongLars Ingebrigtsen2022-06-191-5/+12
| | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-defun-info): Disregard `interactive' in nested parts of the defun (bug#56052).
* Fix checkdoc--fix-y-or-n-p queryLars Ingebrigtsen2022-06-181-1/+1
| | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc--fix-y-or-n-p): Fix the query to match what's done (bug#56053).
* Make checkdoc-file-comments-engine match more ;;;### formsLars Ingebrigtsen2022-06-021-4/+2
| | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-file-comments-engine): Use the more general lisp-mode-autoload-regexp instead of generate-autoload-cookie (i.e., also match ;;;###tramp-autoload).
* Further audits of single quotes in Lisp doc stringsLars Ingebrigtsen2022-05-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/manual/etags/el-src/emacs/lisp/progmodes/etags.el (tags-apropos-additional-actions): * lisp/window.el (delete-window-choose-selected): * lisp/vc/ediff-merg.el (ediff-combination-pattern): * lisp/vc/diff.el (diff-no-select): * lisp/tab-bar.el (tab-bar-new-tab-choice): * lisp/simple.el (next-error-message-highlight): (backward-delete-char-untabify): * lisp/ses.el (ses-jump-cell-name-function): * lisp/org/org.el (org-latex-to-html-convert-command): * lisp/org/org-agenda.el (org-agenda-sorting-strategy): * lisp/net/tramp.el (tramp-default-file-modes): * lisp/net/newst-treeview.el (newsticker-treeview-use-feed-name-from-url-list-in-treeview): * lisp/net/eww.el (eww-auto-rename-buffer): * lisp/mwheel.el (mouse-wheel-scroll-amount): * lisp/mail/rmail.el (rmail-re-abbrevs): * lisp/info.el (Info-history-forward-menu): * lisp/gnus/nnselect.el (nnselect-retrieve-headers-override-function): * lisp/gnus/gnus-start.el (gnus-subscribe-hierarchical-interactive): * lisp/fringe.el (fboundp): * lisp/eshell/esh-var.el (eshell-variable-aliases-list): * lisp/emacs-lisp/checkdoc.el (checkdoc-column-zero-backslash-before-paren): * lisp/dired-aux.el (dired-confirm-shell-command): * lisp/calendar/calendar.el (calendar-time-zone-style): * lisp/ansi-color.el (ansi-color-faces-vector): (ansi-color-names-vector): Audit use of various single quotes in Lisp doc strings.
* ; Fix mistakes in 'declare function' formsEli Zaretskii2022-05-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/gdb-mi.el (tooltip-show): * lisp/vc/vc-git.el (grep-expand-template): * lisp/cedet/semantic/imenu.el (pulse-momentary-highlight-one-line): * lisp/mail/feedmail.el (smtpmail-via-smtp): * lisp/mail/rmail.el (rmail-mime-entity-truncated): * lisp/mail/rmailsum.el (rmail-cease-edit): * lisp/progmodes/gud.el (speedbar-toggle-line-expansion) (speedbar-edit-line): * lisp/autoinsert.el (sgml-tag): * lisp/comint.el (url-host, url-type, url-filename): * lisp/progmodes/elisp-mode.el (xref-make, xref-item-location): * lisp/vc/vc-hooks.el (vc-responsible-backend): * lisp/cedet/semantic/complete.el (tooltip-show): * lisp/doc-view.el (tooltip-show): * lisp/follow.el (mwheel-scroll): * lisp/term/pgtk-win.el (pgtk-set-resource): * lisp/progmodes/cperl-mode.el (Info-find-node): * lisp/lpr.el (print-region-function): * lisp/w32-fns.el (w32-version, w32-read-registry): * lisp/emacs-lisp/checkdoc.el (ispell-correct-p, checkdoc-dired): * lisp/progmodes/xref.el (apropos-parse-pattern): * lisp/cus-edit.el (apropos-parse-pattern): * lisp/obsolete/gs.el (x-change-window-property): * lisp/x-dnd.el (x-change-window-property): * lisp/xwidget.el (make-xwidget): * lisp/transient.el (info, Man-find-section, Man-next-section) (Man-getpage-in-background): * lisp/frame.el (x-device-class, pgtk-device-class): * lisp/textmodes/texinfo.el (flymake--log-1): * lisp/term/x-win.el (x-internal-focus-input-context): Fix 'declare function' errors uncovered by 'check-declare'.
* lisp-mnt, checkdoc: Reduce run-time dependenciesStefan Monnier2022-02-071-26/+34
| | | | | | | | * lisp/emacs-lisp/lisp-mnt.el: Don't require `mail-parse` at top-level. (lm-crack-address): Require it here instead. * lisp/emacs-lisp/checkdoc.el (dired): Don't load at run-time. (checkdoc-dired): Add corresponding `declare-function`.
* Merge from origin/emacs-28Stefan Kangas2022-01-051-0/+1
|\ | | | | | | | | | | | | | | e7aa3ece52 Fix vc-git with old Git over Tramp and cygwin-mount.el c0cfbca311 * lisp/emacs-lisp/checkdoc.el (bytecomp): Add missing require # Conflicts: # etc/NEWS
| * * lisp/emacs-lisp/checkdoc.el (bytecomp): Add missing requirePhilipp Stephani2022-01-051-0/+1
| |
* | Merge from origin/emacs-28Eli Zaretskii2022-01-011-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
| |
* | * lisp/emacs-lisp/checkdoc.el (checkdoc-dired): Autoload.Stefan Kangas2021-11-121-0/+1
| |
* | Add "N.B." abbreviation to checkdocStefan Kangas2021-11-051-4/+2
| | | | | | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-in-abbreviation-p): Add abbreviation "N.B.".
* | Don't hardcode "Commentary" section in checkdocStefan Kangas2021-11-051-1/+5
|/ | | | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-commentary-header-string): New defvar. (checkdoc-file-comments-engine): Insert value of above new variable instead of hardcoding what is inserted for the "Commentary" section.
* Make checkdoc's docstring substitution consistent with other docsNikolay Kudryavtsev2021-09-301-3/+3
| | | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine): In error text, say "mapvar" instead of "keymap", and "command" instead of "function", to be consistent with the ELisp manual. (Bug#50903)
* checkdoc: Allow Lisp symbols to start a messageStefan Kangas2021-09-281-7/+30
| | | | | | | | | | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-message-text-engine): Allow Lisp symbols to start a message. (checkdoc--error-bad-format-p): New helper function. * test/lisp/emacs-lisp/checkdoc-tests.el (checkdoc-test-error-format-is-good) (checkdoc-test-error-format-is-bad): New helper functions. (checkdoc-tests-error-message-bad-format-p) (checkdoc-tests-error-message-bad-format-p/defined-symbols) (checkdoc-tests-error-message-bad-format-p/not-capitalized): New tests.
* checkdoc: Don't add "Commentary" header to test filesStefan Kangas2021-09-261-2/+7
| | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-file-comments-engine): Don't add "Commentary:" header if it looks like a test file.
* checkdoc: Library footer must match package.el requirementStefan Kangas2021-09-261-4/+3
| | | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-file-comments-engine): Don't accept footer format unless it matches the requirement in package.el.
* 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.
* ; * 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.
* ; * 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.
* 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.
* 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'.
* ; More stylistic docfixes in emacs-lisp/*.el found by checkdocStefan Kangas2021-09-181-1/+1
|
* * 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.
* 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
|
* ; * lisp/emacs-lisp/checkdoc.el: Fix typo in previous commit.Stefan Kangas2021-09-141-1/+1
|
* 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.
* 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.