Various checkdoc fixes

This commit is contained in:
Stefan Kangas 2022-11-14 02:15:19 +01:00
parent 971634e3f9
commit ff30d22909
8 changed files with 47 additions and 46 deletions

View file

@ -29,7 +29,7 @@
;; If you have lots of keybindings set in your .emacs file, it can be hard to ;; If you have lots of keybindings set in your .emacs file, it can be hard to
;; know which ones you haven't set yet, and which may now be overriding some ;; know which ones you haven't set yet, and which may now be overriding some
;; new default in a new emacs version. This module aims to solve that ;; new default in a new Emacs version. This module aims to solve that
;; problem. ;; problem.
;; ;;
;; Bind keys as follows in your .emacs: ;; Bind keys as follows in your .emacs:
@ -104,7 +104,7 @@
(require 'easy-mmode) (require 'easy-mmode)
(defgroup bind-key nil (defgroup bind-key nil
"A simple way to manage personal keybindings" "A simple way to manage personal keybindings."
:group 'emacs) :group 'emacs)
(defcustom bind-key-column-widths '(18 . 40) (defcustom bind-key-column-widths '(18 . 40)
@ -127,7 +127,7 @@
;; Create override-global-mode to force key remappings ;; Create override-global-mode to force key remappings
(defvar override-global-map (make-keymap) (defvar override-global-map (make-keymap)
"override-global-mode keymap") "Keymap for `override-global-mode'.")
(define-minor-mode override-global-mode (define-minor-mode override-global-mode
"A minor mode so that keymap settings override other modes." "A minor mode so that keymap settings override other modes."
@ -150,7 +150,7 @@ Elements have the form ((KEY . [MAP]) CMD ORIGINAL-CMD)")
KEY-NAME may be a vector, in which case it is passed straight to KEY-NAME may be a vector, in which case it is passed straight to
`define-key'. Or it may be a string to be interpreted as `define-key'. Or it may be a string to be interpreted as
spelled-out keystrokes, e.g., \"C-c C-z\". See documentation of spelled-out keystrokes, e.g., `C-c C-z'. See documentation of
`edmacro-mode' for details. `edmacro-mode' for details.
COMMAND must be an interactive function or lambda form. COMMAND must be an interactive function or lambda form.

View file

@ -63,11 +63,11 @@
(require 'regexp-opt)) (require 'regexp-opt))
(defgroup use-package nil (defgroup use-package nil
"A use-package declaration for simplifying your `.emacs'." "A `use-package' declaration for simplifying your `.emacs'."
:group 'startup) :group 'startup)
(defconst use-package-version "2.4.4" (defconst use-package-version "2.4.4"
"This version of use-package.") "This version of `use-package'.")
(defcustom use-package-keywords (defcustom use-package-keywords
'(:disabled '(:disabled
@ -108,11 +108,11 @@ The order of this list is *very important*, so it is only
advisable to insert new keywords, never to delete or reorder advisable to insert new keywords, never to delete or reorder
them. Further, attention should be paid to the NEWS.md if the them. Further, attention should be paid to the NEWS.md if the
default order ever changes, as they may have subtle effects on default order ever changes, as they may have subtle effects on
the semantics of use-package declarations and may necessitate the semantics of `use-package' declarations and may necessitate
changing where you had inserted a new keyword earlier. changing where you had inserted a new keyword earlier.
Note that `:disabled' is special in this list, as it causes Note that `:disabled' is special in this list, as it causes
nothing at all to happen, even if the rest of the use-package nothing at all to happen, even if the rest of the `use-package'
declaration is incorrect." declaration is incorrect."
:type '(repeat symbol) :type '(repeat symbol)
:group 'use-package) :group 'use-package)
@ -132,9 +132,9 @@ otherwise requested."
:group 'use-package) :group 'use-package)
(defcustom use-package-ignore-unknown-keywords nil (defcustom use-package-ignore-unknown-keywords nil
"If non-nil, issue warning instead of error when unknown "If non-nil, warn instead of signaling error for unknown keywords.
keyword is encountered. The unknown keyword and its associated The unknown keyword and its associated arguments will be ignored
arguments will be ignored in the `use-package' expansion." in the `use-package' expansion."
:type 'boolean :type 'boolean
:group 'use-package) :group 'use-package)
@ -197,7 +197,7 @@ The first element is the `use-package' keyword.
The second is a form that can be evaluated to get the default The second is a form that can be evaluated to get the default
value. It can also be a function that will receive the name of value. It can also be a function that will receive the name of
the use-package declaration and the keyword plist given to the `use-package' declaration and the keyword plist given to
`use-package', in normalized form. The value it returns should `use-package', in normalized form. The value it returns should
also be in normalized form (which is sometimes *not* what one also be in normalized form (which is sometimes *not* what one
would normally write in a `use-package' declaration, so use would normally write in a `use-package' declaration, so use
@ -305,7 +305,7 @@ definitions, to understand the main intent of what's happening."
"\\s-+\\(")) "\\s-+\\("))
(or (bound-and-true-p lisp-mode-symbol-regexp) (or (bound-and-true-p lisp-mode-symbol-regexp)
"\\(?:\\sw\\|\\s_\\|\\\\.\\)+") "\\)") "\\(?:\\sw\\|\\s_\\|\\\\.\\)+") "\\)")
"Sexp providing regexp for finding use-package forms in user files. "Sexp providing regexp for finding `use-package' forms in user files.
This is used by `use-package-jump-to-package-form' and This is used by `use-package-jump-to-package-form' and
`use-package-enable-imenu-support'." `use-package-enable-imenu-support'."
:type 'sexp :type 'sexp
@ -316,7 +316,7 @@ This is used by `use-package-jump-to-package-form' and
This is done by adjusting `lisp-imenu-generic-expression' to This is done by adjusting `lisp-imenu-generic-expression' to
include support for finding `use-package' and `require' forms. include support for finding `use-package' and `require' forms.
Must be set before loading use-package." Must be set before loading `use-package'."
:type 'boolean :type 'boolean
:set :set
#'(lambda (sym value) #'(lambda (sym value)
@ -338,7 +338,7 @@ Must be set before loading use-package."
(font-lock-add-keywords 'emacs-lisp-mode use-package-font-lock-keywords) (font-lock-add-keywords 'emacs-lisp-mode use-package-font-lock-keywords)
(defcustom use-package-compute-statistics nil (defcustom use-package-compute-statistics nil
"If non-nil, compute statistics concerned use-package declarations. "If non-nil, compute statistics concerned `use-package' declarations.
View the statistical report using `use-package-report'. Note that View the statistical report using `use-package-report'. Note that
if this option is enabled, you must require `use-package' in your if this option is enabled, you must require `use-package' in your
user init file at loadup time, or you will see errors concerning user init file at loadup time, or you will see errors concerning
@ -365,14 +365,14 @@ undefined variables."
(and sym (symbolp sym))) (and sym (symbolp sym)))
(defsubst use-package-as-symbol (string-or-symbol) (defsubst use-package-as-symbol (string-or-symbol)
"If STRING-OR-SYMBOL is already a symbol, return it. Otherwise "If STRING-OR-SYMBOL is already a symbol, return it.
convert it to a symbol and return that." Otherwise convert it to a symbol and return that."
(if (symbolp string-or-symbol) string-or-symbol (if (symbolp string-or-symbol) string-or-symbol
(intern string-or-symbol))) (intern string-or-symbol)))
(defsubst use-package-as-string (string-or-symbol) (defsubst use-package-as-string (string-or-symbol)
"If STRING-OR-SYMBOL is already a string, return it. Otherwise "If STRING-OR-SYMBOL is already a string, return it.
convert it to a string and return that." Otherwise convert it to a string and return that."
(if (stringp string-or-symbol) string-or-symbol (if (stringp string-or-symbol) string-or-symbol
(symbol-name string-or-symbol))) (symbol-name string-or-symbol)))
@ -989,6 +989,8 @@ If RECURSED is non-nil, recurse into sublists."
;; ;;
(defun use-package-reset-statistics () (defun use-package-reset-statistics ()
"Reset statistics for `use-package'.
See also `use-package-statistics'."
(interactive) (interactive)
(setq use-package-statistics (make-hash-table))) (setq use-package-statistics (make-hash-table)))
@ -1031,7 +1033,7 @@ The information is formatted in a way suitable for
(format "%.2f" (use-package-statistics-time statistics)))))) (format "%.2f" (use-package-statistics-time statistics))))))
(defun use-package-report () (defun use-package-report ()
"Show current statistics gathered about use-package declarations. "Show current statistics gathered about `use-package' declarations.
In the table that's generated, the status field has the following In the table that's generated, the status field has the following
meaning: meaning:
Configured :config has been processed (the package is loaded!) Configured :config has been processed (the package is loaded!)
@ -1055,7 +1057,7 @@ meaning:
(define-derived-mode use-package-statistics-mode tabulated-list-mode (define-derived-mode use-package-statistics-mode tabulated-list-mode
"use-package statistics" "use-package statistics"
"Show current statistics gathered about use-package declarations." "Show current statistics gathered about `use-package' declarations."
(setq tabulated-list-format (setq tabulated-list-format
;; The sum of column width is 80 characters: ;; The sum of column width is 80 characters:
[("Package" 25 t) [("Package" 25 t)

View file

@ -29,7 +29,7 @@
"List of custom packages installed.") "List of custom packages installed.")
(defun use-package-ensure-system-package-consify (arg) (defun use-package-ensure-system-package-consify (arg)
"Turn `arg' into a cons of (`package-name' . `install-command')." "Turn ARG into a cons of (`package-name' . `install-command')."
(cond (cond
((stringp arg) ((stringp arg)
(cons arg `(system-packages-install ,arg))) (cons arg `(system-packages-install ,arg)))
@ -54,7 +54,7 @@
;;;###autoload ;;;###autoload
(defun use-package-normalize/:ensure-system-package (_name-symbol keyword args) (defun use-package-normalize/:ensure-system-package (_name-symbol keyword args)
"Turn `arg' into a list of cons-es of (`package-name' . `install-command')." "Turn ARGS into a list of conses of (`package-name' . `install-command')."
(use-package-as-one (symbol-name keyword) args (use-package-as-one (symbol-name keyword) args
(lambda (_label arg) (lambda (_label arg)
(cond (cond

View file

@ -37,7 +37,7 @@
(require 'use-package-core) (require 'use-package-core)
(defgroup use-package-ensure nil (defgroup use-package-ensure nil
"Support for :ensure and :pin keywords in use-package declarations." "Support for :ensure and :pin keywords in `use-package' declarations."
:group 'use-package) :group 'use-package)
(eval-when-compile (eval-when-compile
@ -111,7 +111,7 @@ manually updated package."
(archive-name (if (stringp archive) archive (symbol-name archive)))) (archive-name (if (stringp archive) archive (symbol-name archive))))
(if (use-package-archive-exists-p archive-symbol) (if (use-package-archive-exists-p archive-symbol)
(add-to-list 'package-pinned-packages (cons package archive-name)) (add-to-list 'package-pinned-packages (cons package archive-name))
(error "Archive '%s' requested for package '%s' is not available." (error "Archive '%s' requested for package '%s' is not available"
archive-name package)) archive-name package))
(unless (bound-and-true-p package--initialized) (unless (bound-and-true-p package--initialized)
(package-initialize t)))) (package-initialize t))))

View file

@ -30,8 +30,8 @@
;; Provides the command `M-x use-package-jump-to-package-form', however it ;; Provides the command `M-x use-package-jump-to-package-form', however it
;; only works if the package being jumped to was required during ;; only works if the package being jumped to was required during
;; initialization. If it was delay-loaded, it will not work. Improvements are ;; initialization. If it was delay-loaded, it will not work.
;; needed. ;; Improvements are needed.
;;; Code: ;;; Code:
@ -48,11 +48,10 @@ Returns an absolute file path or nil if none is found."
;;;###autoload ;;;###autoload
(defun use-package-jump-to-package-form (package) (defun use-package-jump-to-package-form (package)
"Attempt to find and jump to the `use-package' form that loaded "Attempt to find and jump to the `use-package' form that loaded PACKAGE.
PACKAGE. This will only find the form if that form actually This will only find the form if that form actually required
required PACKAGE. If PACKAGE was previously required then this PACKAGE. If PACKAGE was previously required then this function
function will jump to the file that originally required PACKAGE will jump to the file that originally required PACKAGE instead."
instead."
(interactive (list (completing-read "Package: " features))) (interactive (list (completing-read "Package: " features)))
(let* ((package (if (stringp package) (intern package) package)) (let* ((package (if (stringp package) (intern package) package))
(requiring-file (use-package-find-require package)) (requiring-file (use-package-find-require package))

View file

@ -63,7 +63,7 @@
;;;###autoload ;;;###autoload
(defun use-package-lint () (defun use-package-lint ()
"Check for errors in use-package declarations. "Check for errors in `use-package' declarations.
For example, if the module's `:if' condition is met, but even For example, if the module's `:if' condition is met, but even
with the specified `:load-path' the module cannot be found." with the specified `:load-path' the module cannot be found."
(interactive) (interactive)

View file

@ -158,4 +158,4 @@
;; no-update-autoloads: t ;; no-update-autoloads: t
;; End: ;; End:
;;; use-package-tests.el ends here ;;; use-package-chords-tests.el ends here