From 6a7bb1ddbc9837b2d2af60236be58723114855ac Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Wed, 6 Jul 2022 19:29:51 +0200 Subject: Make some additional defcustom types more restrictive * lisp/desktop.el (desktop-lazy-idle-delay): * lisp/files.el (dired-kept-versions) (kept-old-versions, kept-new-versions): * lisp/filesets.el (filesets-max-submenu-length) (filesets-max-entry-length, filesets-tree-max-level) (filesets-query-user-limit): * lisp/hi-lock.el (hi-lock-file-patterns-range) (hi-lock-highlight-range): * lisp/ido.el (ido-max-work-directory-list): * lisp/image/gravatar.el (gravatar-cache-ttl): * lisp/imenu.el (imenu-auto-rescan-maxout, imenu-max-items): * lisp/informat.el (Info-split-threshold): * lisp/mail/hashcash.el (hashcash-default-payment) (hashcash-default-accept-payment): * lisp/mail/mail-hist.el (mail-hist-history-size): * lisp/mail/smtpmail.el (smtpmail-retries): * lisp/msb.el (msb-display-most-recently-used): * lisp/nxml/rng-valid.el (rng-state-cache-distance) (rng-validate-chunk-size): * lisp/progmodes/gdb-mi.el (gdb-max-source-window-count): * lisp/recentf.el (recentf-arrange-by-rules-min-items): * lisp/simple.el (kill-ring-max, mark-ring-max) (global-mark-ring-max): * lisp/tab-line.el (tab-line-tab-name-truncated-max): * lisp/term.el (term-buffer-maximum-size, term-input-chunk-size): * lisp/thumbs.el (thumbs-max-image-number) (thumbs-thumbsdir-max-size, thumbs-relief, thumbs-margin) (thumbs-image-resizing-step): * lisp/type-break.el (type-break-interval) (type-break-good-rest-interval, type-break-query-interval) (type-break-warning-repeat): * lisp/vc/compare-w.el (compare-windows-sync-string-size): * lisp/woman.el (woman-fill-column): Use defcustom :type natnum. * lisp/emacs-lisp/backtrace.el (backtrace-line-length): * lisp/doc-view.el (doc-view-conversion-refresh-interval): Use defcustom :type natnum and allow the nil value. * lisp/gnus/spam-stat.el (spam-stat-process-directory-age): Use defcustom :type integer. --- lisp/filesets.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lisp/filesets.el') diff --git a/lisp/filesets.el b/lisp/filesets.el index b97dda3cd61..b1829793f11 100644 --- a/lisp/filesets.el +++ b/lisp/filesets.el @@ -414,12 +414,12 @@ time to time or if the fileset cache causes troubles." Set this value to 0 to turn menu splitting off. BTW, parts of submenus will not be rewrapped if their length exceeds this value." :set #'filesets-set-default - :type 'integer) + :type 'natnum) (defcustom filesets-max-entry-length 50 "Truncate names of split submenus to this length." :set #'filesets-set-default - :type 'integer) + :type 'natnum) (defcustom filesets-browse-dir-function #'dired "A function or command used for browsing directories. @@ -518,7 +518,7 @@ i.e. how deep the menu should be. Try something like and it should become clear what this option is about. In any case, including directory trees to the menu can take a lot of memory." :set #'filesets-set-default - :type 'integer) + :type 'natnum) (defcustom filesets-commands '(("Isearch" @@ -1027,7 +1027,7 @@ defined in `filesets-ingroup-patterns'." (defcustom filesets-query-user-limit 15 "Query the user before opening a fileset with that many files." :set #'filesets-set-default - :type 'integer) + :type 'natnum) (defun filesets-filter-dir-names (lst &optional negative) -- cgit v1.2.3