branch: elpa/dirvish
commit 0fbd5697fab956f450a76d03fff9554361ff4406
Author: Jonas Bernoulli <jo...@bernoul.li>
Commit: GitHub <nore...@github.com>

    chore: fix custom type specifications (#239)
    
    * fix(yank): silence byte-compiler
    
    * fix(core): fix typo in custom type declaration
    
    * chore: fix typo in name of let-bound variable
    
    * chore: fix typos URLs
    
    * chore: fix typos in documentation
    
    * fix(custom): fix custom type specifications
    
    * dirvish-yank--rsync-transient-init-value: Shorten docstring line length
    
    ---------
    
    Co-authored-by: Alex Lu <hellosimon1...@hotmail.com>
---
 dirvish.el                  | 4 ++--
 extensions/dirvish-icons.el | 8 ++++----
 extensions/dirvish-peek.el  | 4 ++--
 extensions/dirvish-vc.el    | 2 +-
 extensions/dirvish-yank.el  | 8 +++++---
 5 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/dirvish.el b/dirvish.el
index 64a4f85b7b..4a8f739511 100644
--- a/dirvish.el
+++ b/dirvish.el
@@ -187,8 +187,8 @@ and its ARGS is issued to open the file externally.  The 
special
 placeholder \"%f\" in the ARGS is replaced by the FILENAME at
 runtime.  Set it to nil disables this feature."
   :group 'dirvish
-  :type '(alist :key-type ((repeat string) :tag "File extensions")
-                :value-type ((repeat string) :tag "External command and 
args")))
+  :type '(alist :key-type (repeat :tag "File extensions" string)
+                :value-type (repeat :tag "External command and args" string)))
 
 (defcustom dirvish-reuse-session t
   "Whether to reuse the hidden sessions.
diff --git a/extensions/dirvish-icons.el b/extensions/dirvish-icons.el
index c228750567..ce18cb6d26 100644
--- a/extensions/dirvish-icons.el
+++ b/extensions/dirvish-icons.el
@@ -53,18 +53,18 @@ Values are interpreted as follows:
 - all-the-icons, meaning let `all-the-icons.el' to do the coloring.
 - A face that is used for all the icons.
 - nil, inherit face at point."
-  :group 'dirvish :type '(choice face symbol nil))
+  :group 'dirvish :type '(choice face symbol (const nil)))
 
 (defcustom dirvish-nerd-icons-offset 0.00
   "Icon's vertical offset used for `nerd-icons' backend.
 Set it to nil to use the default offset from `nerd-icons'."
-  :group 'dirvish :type '(choice (float nil)))
+  :group 'dirvish :type '(choice float (const nil)))
 
 (defcustom dirvish-nerd-icons-height nil
   "Icon height used for `nerd-icons' backend.
 The height of the icon is scaled to this value (try 0.8).
 Set it to nil to use the default height from `nerd-icons'."
-  :group 'dirvish :type '(choice (float nil)))
+  :group 'dirvish :type '(choice float (const nil)))
 
 (defcustom dirvish-nerd-icons-palette 'nerd-icons
   "Coloring style used for file `nerd-icons' backend.
@@ -72,7 +72,7 @@ Values are interpreted as follows:
 - nerd-icons, meaning let `nerd-icons.el' to do the coloring.
 - A face that is used for all the icons.
 - nil, inherit face at point."
-  :group 'dirvish :type '(choice face symbol nil))
+  :group 'dirvish :type '(choice face symbol (const nil)))
 
 (defcustom dirvish-vscode-icon-size 32
   "Icon (image pixel) size used for `vscode-icon' backend.
diff --git a/extensions/dirvish-peek.el b/extensions/dirvish-peek.el
index a4ea423c71..61716aee3a 100644
--- a/extensions/dirvish-peek.el
+++ b/extensions/dirvish-peek.el
@@ -27,11 +27,11 @@
 If this value is nil, a candidate fetcher function is
 automatically choosed according to your completion framework
 being used at runtime."
-  :group 'dirvish :type '(choice function nil))
+  :group 'dirvish :type '(choice function (const nil)))
 
 (defcustom dirvish-peek-categories '(file project-file library)
   "Minibuffer metadata categories to show file preview."
-  :group 'dirvish :type 'list)
+  :group 'dirvish :type '(repeat symbol))
 
 (defvar dirvish-peek--cand-fetcher nil)
 (defun dirvish-peek--prepare-cand-fetcher ()
diff --git a/extensions/dirvish-vc.el b/extensions/dirvish-vc.el
index 82d066142b..a288d33850 100644
--- a/extensions/dirvish-vc.el
+++ b/extensions/dirvish-vc.el
@@ -37,7 +37,7 @@ This value is consumed by `vc-state' attribute in Dirvish.  
FACE
 is the face used for that VC-STATE.  See `vc-state' in (in
 vc-hooks.el) for detail explanation of these states."
   :group 'dirvish
-  :type '(alist :key-type symbol :value-type '(symbol :tag "Face")))
+  :type '(alist :key-type symbol :value-type (symbol :tag "Face")))
 
 (defface dirvish-vc-needs-merge-face
   '((((background dark)) (:background "#500f29"))
diff --git a/extensions/dirvish-yank.el b/extensions/dirvish-yank.el
index 6e9e88f26b..016432cf40 100644
--- a/extensions/dirvish-yank.el
+++ b/extensions/dirvish-yank.el
@@ -65,7 +65,7 @@ The value can be a symbol or a function that returns a 
fileset."
 
 (defcustom dirvish-yank-rsync-args '("--archive" "--verbose" "--compress" 
"--info=progress2")
   "The default options for the rsync command."
-  :type 'list :group 'dirvish)
+  :type '(repeat string) :group 'dirvish)
 
 (defcustom dirvish-yank-keep-success-log t
   "If non-nil then keep logs of all completed yanks.
@@ -616,8 +616,10 @@ unexpected errors."
      ;; either shost, dhost or both are localhost
      (t (dirvish-yank-l2fr-handler srcs dest)))))
 
-(defun dirvish-yank--rsync-transient-init-value (obj default-value)
-  "Select init values from the local session or emacs session or saved 
transient values."
+(defun dirvish-yank--rsync-transient-init-value (obj)
+  "Select initial values for transient suffixes.
+Use values from the local session or emacs session or saved transient
+values."
   ;; dont touch if it is alreday set
   (if (and (slot-boundp obj 'value) (oref obj value))
       (oref obj value)

Reply via email to