diff options
| author | Aaron L. Zeng <me@bcc32.com> | 2024-03-14 15:31:30 -0400 |
|---|---|---|
| committer | Vedang Manerikar <ved.manerikar@gmail.com> | 2024-04-11 22:33:21 +0530 |
| commit | 94e9f20a78f64a83daf641891923681a52d03919 (patch) | |
| tree | a78a2fc56fc749a1e3439cbfc558bed313e64619 /lisp | |
| parent | a1048bceb2bd3f635437b0f2bfac27cae8c2dabc (diff) | |
Fix defcustom :type arguments
These variables' default values should match the :type given in their
definitions, or else M-x customize will display a warning or may even
fail to initialize properly.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/pdf-tools.el | 6 | ||||
| -rw-r--r-- | lisp/pdf-util.el | 12 |
2 files changed, 11 insertions, 7 deletions
diff --git a/lisp/pdf-tools.el b/lisp/pdf-tools.el index 6211369..670792c 100644 --- a/lisp/pdf-tools.el +++ b/lisp/pdf-tools.el @@ -212,11 +212,13 @@ PDF buffers." (defcustom pdf-tools-installer-os nil "Specifies which installer to use. -If nil the installer is chosen automatically. This variable is +If nil, the installer is chosen automatically. This variable is useful if you have multiple installers present on your system (e.g. nix on arch linux)" :group 'pdf-tools - :type 'string) + :type '(choice + (const :tag "Choose automatically" nil) + string)) (defun pdf-tools-identify-build-directory (directory) "Return non-nil, if DIRECTORY appears to contain the epdfinfo source. diff --git a/lisp/pdf-util.el b/lisp/pdf-util.el index 070e4a5..d0a123c 100644 --- a/lisp/pdf-util.el +++ b/lisp/pdf-util.el @@ -907,21 +907,23 @@ frame's PPI is larger than 180. Otherwise, return 1." (executable-find "convert")) "Absolute path to the convert program." :group 'pdf-tools - :type 'executable) + :type '(choice (const :tag "Unset" nil) file)) (defcustom pdf-util-fast-image-format nil "An image format appropriate for fast displaying. -This should be a cons \(TYPE . EXT\) where type is the Emacs -image-type and EXT the appropriate file extension starting with a -dot. If nil, the value is determined automatically. +This should be a cons (TYPE . EXT) where type is the Emacs +`image-type' and EXT the appropriate file extension starting with +a dot. If nil, the value is determined automatically. Different formats have different properties, with respect to Emacs loading time, convert creation time and the file-size. In general, uncompressed formats are faster, but may need a fair amount of (temporary) disk space." :group 'pdf-tools - :type '(cons symbol string)) + :type '(choice + (const :tag "Determine automatically" nil) + (cons symbol string))) (defun pdf-util-assert-convert-program () (unless (and pdf-util-convert-program |
