emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 9d866a1f8d 1/3: Make some defcustom types more restrictive


From: Stefan Kangas
Subject: master 9d866a1f8d 1/3: Make some defcustom types more restrictive
Date: Tue, 5 Jul 2022 12:38:40 -0400 (EDT)

branch: master
commit 9d866a1f8da870dcf82f87d5ed9d5ca932d5477b
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    Make some defcustom types more restrictive
    
    * lisp/abbrev.el (abbrev-suggest-hint-threshold):
    * lisp/bookmark.el (bookmark-bmenu-file-column)
    (bookmark-menu-length):
    * lisp/buff-menu.el (Buffer-menu-size-width)
    (Buffer-menu-mode-width):
    * lisp/calendar/calendar.el (calendar-week-start-day)
    (calendar-intermonth-spacing, calendar-column-width)
    (calendar-day-digit-width):
    * lisp/calc/calc.el (calc-undo-length):
    * lisp/calendar/timeclock.el (timeclock-workday):
    * lisp/comint.el (comint-buffer-maximum-size)
    (comint-input-ring-size):
    * lisp/doc-view.el (doc-view-resolution, doc-view-image-width):
    * lisp/emacs-lisp/bytecomp.el (byte-compile-docstring-max-column):
    * lisp/emacs-lisp/comp.el (native-comp-debug)
    (native-comp-verbose, native-comp-async-jobs-number):
    * lisp/emacs-lisp/package.el (package-name-column-width)
    (package-version-column-width, package-status-column-width)
    (package-archive-column-width):
    * lisp/eshell/esh-mode.el (eshell-buffer-maximum-lines):
    * lisp/frame.el (blink-cursor-blinks):
    * lisp/info.el (Info-breadcrumbs-depth):
    * lisp/jit-lock.el (jit-lock-chunk-size):
    * lisp/kmacro.el (kmacro-ring-max):
    * lisp/menu-bar.el (yank-menu-length, yank-menu-max-items):
    * lisp/midnight.el (clean-buffer-list-delay-general)
    (clean-buffer-list-delay-special):
    * lisp/net/dictionary.el (dictionary-port)
    (dictionary-proxy-port):
    * lisp/net/ldap.el (ldap-default-port):
    * lisp/net/pop3.el (pop3-port, pop3-stream-length):
    * lisp/net/rcirc.el (rcirc-default-port):
    * lisp/net/sieve-manage.el (sieve-manage-default-port):
    * lisp/play/spook.el (spook-phrase-default-count):
    * lisp/play/tetris.el (tetris-buffer-width)
    (tetris-buffer-height, tetris-width, tetris-height)
    (tetris-top-left-x, tetris-top-left-y):
    * lisp/profiler.el (profiler-sampling-interval):
    * lisp/progmodes/sql.el (sql-port):
    * lisp/recentf.el (recentf-max-menu-items):
    * lisp/strokes.el (strokes-grid-resolution):
    * lisp/tab-bar.el (tab-bar-tab-name-truncated-max):
    * lisp/term/xterm.el (xterm-max-cut-length):
    * lisp/time.el (display-time-interval, world-clock-timer-second):
    * lisp/url/url-cache.el (url-cache-expire-time):
    * lisp/url/url-cookie.el (url-cookie-save-interval):
    * lisp/url/url-history.el (url-history-save-interval):
    * lisp/url/url-queue.el (url-queue-parallel-processes)
    (url-queue-timeout):
    * lisp/url/url-vars.el (url-max-password-attempts)
    (url-max-redirections):
    * lisp/vc/emerge.el (emerge-min-visible-lines):
    * lisp/vc/vc.el (vc-log-show-limit):
    * lisp/window.el (window-min-height, window-min-width):
    * lisp/winner.el (winner-ring-size): Use :type natnum.
    
    * lisp/savehist.el (savehist-file-modes): Fix setting to nil value and
    use :type natnum.
---
 lisp/abbrev.el              |  4 ++--
 lisp/bookmark.el            |  4 ++--
 lisp/buff-menu.el           |  4 ++--
 lisp/calc/calc.el           |  2 +-
 lisp/calendar/calendar.el   |  8 ++++----
 lisp/calendar/timeclock.el  |  2 +-
 lisp/comint.el              |  4 ++--
 lisp/doc-view.el            |  4 ++--
 lisp/emacs-lisp/bytecomp.el |  4 ++--
 lisp/emacs-lisp/comp.el     |  6 +++---
 lisp/emacs-lisp/package.el  |  8 ++++----
 lisp/eshell/esh-mode.el     |  2 +-
 lisp/frame.el               |  2 +-
 lisp/info.el                |  2 +-
 lisp/jit-lock.el            |  2 +-
 lisp/kmacro.el              |  2 +-
 lisp/menu-bar.el            |  4 ++--
 lisp/midnight.el            |  4 ++--
 lisp/net/dictionary.el      |  4 ++--
 lisp/net/ldap.el            |  2 +-
 lisp/net/pop3.el            |  4 ++--
 lisp/net/rcirc.el           |  2 +-
 lisp/net/sieve-manage.el    |  2 +-
 lisp/play/spook.el          |  2 +-
 lisp/play/tetris.el         | 12 ++++++------
 lisp/profiler.el            |  2 +-
 lisp/progmodes/sql.el       |  4 ++--
 lisp/recentf.el             |  2 +-
 lisp/savehist.el            |  3 ++-
 lisp/strokes.el             |  2 +-
 lisp/tab-bar.el             |  2 +-
 lisp/term/xterm.el          |  2 +-
 lisp/time.el                |  4 ++--
 lisp/url/url-cache.el       |  2 +-
 lisp/url/url-cookie.el      |  2 +-
 lisp/url/url-history.el     |  2 +-
 lisp/url/url-queue.el       |  4 ++--
 lisp/url/url-vars.el        |  4 ++--
 lisp/vc/emerge.el           |  2 +-
 lisp/vc/vc.el               |  2 +-
 lisp/window.el              |  4 ++--
 lisp/winner.el              |  2 +-
 42 files changed, 71 insertions(+), 70 deletions(-)

diff --git a/lisp/abbrev.el b/lisp/abbrev.el
index e875d77faa..21aa3311d6 100644
--- a/lisp/abbrev.el
+++ b/lisp/abbrev.el
@@ -885,8 +885,8 @@ longer than the abbrev, the benefit of informing the user 
is not
 significant.  If you always want to be informed about existing
 abbrevs for the text you type, set this value to zero or less.
 This setting only applies if `abbrev-suggest' is non-nil."
-    :type 'number
-    :version "28.1")
+  :type 'natnum
+  :version "28.1")
 
 (defun abbrev--suggest-get-active-tables-including-parents ()
   "Return a list of all active abbrev tables, including parent tables."
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index 7138822447..b2130557dc 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -160,7 +160,7 @@ This includes the annotations column.")
 (defcustom bookmark-bmenu-file-column 30
   "Column at which to display filenames in a buffer listing bookmarks.
 You can toggle whether files are shown with 
\\<bookmark-bmenu-mode-map>\\[bookmark-bmenu-toggle-filenames]."
-  :type 'integer)
+  :type 'natnum)
 
 
 (defcustom bookmark-bmenu-toggle-filenames t
@@ -174,7 +174,7 @@ A non-nil value may result in truncated bookmark names."
 
 (defcustom bookmark-menu-length 70
   "Maximum length of a bookmark name displayed on a popup menu."
-  :type 'integer)
+  :type 'natnum)
 
 ;; FIXME: Is it really worth a customization option?
 (defcustom bookmark-search-delay 0.2
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index 179cc5484c..539ef673f0 100644
--- a/lisp/buff-menu.el
+++ b/lisp/buff-menu.el
@@ -92,13 +92,13 @@ number."
 
 (defcustom Buffer-menu-size-width 7
   "Width of buffer size column in the Buffer Menu."
-  :type 'number
+  :type 'natnum
   :group 'Buffer-menu
   :version "24.3")
 
 (defcustom Buffer-menu-mode-width 16
   "Width of mode name column in the Buffer Menu."
-  :type 'number
+  :type 'natnum
   :group 'Buffer-menu)
 
 (defcustom Buffer-menu-use-frame-buffer-list t
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index b03dcfeb5b..254c703ee2 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -412,7 +412,7 @@ and deleted by `calc-pop'."
 
 (defcustom calc-undo-length 100
   "The number of undo steps that will be preserved when Calc is quit."
-  :type 'integer)
+  :type 'natnum)
 
 (defcustom calc-highlight-selections-with-faces nil
   "If non-nil, use a separate face to indicate selected sub-formulas.
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index 9a77ae72d0..0d9e697644 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -211,7 +211,7 @@ If you change this variable directly (without using 
customize)
 after starting `calendar', you should call `calendar-redraw' to
 update the calendar display to reflect the change, otherwise
 movement commands will not work correctly."
-  :type 'integer
+  :type 'natnum
   ;; Change the initialize so that if you reload calendar.el, it will not
   ;; cause a redraw.
   :initialize 'custom-initialize-default
@@ -511,7 +511,7 @@ Then redraw the calendar, if necessary."
   :initialize #'custom-initialize-default
   :set (lambda (sym val)
          (calendar-set-layout-variable sym val 1))
-  :type 'integer
+  :type 'natnum
   :version "23.1")
 
 ;; FIXME calendar-month-column-width?
@@ -520,7 +520,7 @@ Then redraw the calendar, if necessary."
   :initialize #'custom-initialize-default
   :set (lambda (sym val)
          (calendar-set-layout-variable sym val 3))
-  :type 'integer
+  :type 'natnum
   :version "23.1")
 
 (defun calendar-day-header-construct (&optional width)
@@ -553,7 +553,7 @@ Must be at least one less than `calendar-column-width'."
   :initialize #'custom-initialize-default
   :set (lambda (sym val)
          (calendar-set-layout-variable sym val 2))
-  :type 'integer
+  :type 'natnum
   :version "23.1")
 
 (defcustom calendar-intermonth-header nil
diff --git a/lisp/calendar/timeclock.el b/lisp/calendar/timeclock.el
index 1c6a557a0d..7bdaf7ceff 100644
--- a/lisp/calendar/timeclock.el
+++ b/lisp/calendar/timeclock.el
@@ -86,7 +86,7 @@
 
 (defcustom timeclock-workday (* 8 60 60)
   "The length of a work period in seconds."
-  :type 'integer)
+  :type 'natnum)
 
 (defvar timeclock--previous-workday nil)
 
diff --git a/lisp/comint.el b/lisp/comint.el
index 4fc1ffcf0c..7e22aa78fc 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -330,12 +330,12 @@ This variable is buffer-local in all Comint buffers."
   "The maximum size in lines for Comint buffers.
 Comint buffers are truncated from the top to be no greater than this number, if
 the function `comint-truncate-buffer' is on `comint-output-filter-functions'."
-  :type 'integer
+  :type 'natnum
   :group 'comint)
 
 (defcustom comint-input-ring-size 500
   "Size of the input history ring in `comint-mode'."
-  :type 'integer
+  :type 'natnum
   :group 'comint
   :version "23.2")
 
diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 63be1b16f3..25c476b99b 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -225,7 +225,7 @@ are available (see Info node `(emacs)Document View')"
 (defcustom doc-view-resolution 100
   "Dots per inch resolution used to render the documents.
 Higher values result in larger images."
-  :type 'number)
+  :type 'natnum)
 
 (defvar doc-view-doc-type nil
   "The type of document in the current buffer.
@@ -301,7 +301,7 @@ scaling."
 Has only an effect if `doc-view-scale-internally' is non-nil and support for
 scaling is compiled into Emacs."
   :version "24.1"
-  :type 'number)
+  :type 'natnum)
 
 (defcustom doc-view-dvipdfm-program "dvipdfm"
   "Program to convert DVI files to PDF.
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 6545c8d961..5ef517d7e3 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1725,8 +1725,8 @@ The byte-compiler will emit a warning for documentation 
strings
 containing lines wider than this.  If `fill-column' has a larger
 value, it will override this variable."
   :group 'bytecomp
-  :type 'integer
-  :safe #'integerp
+  :type 'natnum
+  :safe #'natnump
   :version "28.1")
 
 (define-obsolete-function-alias 'byte-compile-docstring-length-warn
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 2109aa9923..73285e0f24 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -63,7 +63,7 @@ This is intended for debugging the compiler itself.
   2 emit debug symbols and dump pseudo C code.
   3 emit debug symbols and dump: pseudo C code, GCC intermediate
   passes and libgccjit log file."
-  :type 'integer
+  :type 'natnum
   :safe #'natnump
   :version "28.1")
 
@@ -74,7 +74,7 @@ This is intended for debugging the compiler itself.
   1 final LIMPLE is logged.
   2 LAP, final LIMPLE, and some pass info are logged.
   3 max verbosity."
-  :type 'integer
+  :type 'natnum
   :risky t
   :version "28.1")
 
@@ -111,7 +111,7 @@ during bootstrap."
   "Default number of subprocesses used for async native compilation.
 Value of zero means to use half the number of the CPU's execution units,
 or one if there's just one execution unit."
-  :type 'integer
+  :type 'natnum
   :risky t
   :version "28.1")
 
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 2c43db9899..85a154a8e0 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -418,22 +418,22 @@ synchronously."
 
 (defcustom package-name-column-width 30
   "Column width for the Package name in the package menu."
-  :type 'number
+  :type 'natnum
   :version "28.1")
 
 (defcustom package-version-column-width 14
   "Column width for the Package version in the package menu."
-  :type 'number
+  :type 'natnum
   :version "28.1")
 
 (defcustom package-status-column-width 12
   "Column width for the Package status in the package menu."
-  :type 'number
+  :type 'natnum
   :version "28.1")
 
 (defcustom package-archive-column-width 8
   "Column width for the Package archive in the package menu."
-  :type 'number
+  :type 'natnum
   :version "28.1")
 
 
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el
index db36909fb8..972d4f9df0 100644
--- a/lisp/eshell/esh-mode.el
+++ b/lisp/eshell/esh-mode.el
@@ -146,7 +146,7 @@ See variable `eshell-scroll-to-bottom-on-output' and 
function
 Eshell buffers are truncated from the top to be no greater than this
 number, if the function `eshell-truncate-buffer' is on
 `eshell-output-filter-functions'."
-  :type 'integer)
+  :type 'natnum)
 
 (defcustom eshell-output-filter-functions
   '(eshell-postoutput-scroll-to-bottom
diff --git a/lisp/frame.el b/lisp/frame.el
index 6996bb2e9c..9476cb0ec4 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -2841,7 +2841,7 @@ Values smaller than 0.2 sec are treated as 0.2 sec."
   "How many times to blink before using a solid cursor on NS, X, and 
MS-Windows.
 Use 0 or negative value to blink forever."
   :version "24.4"
-  :type 'integer
+  :type 'natnum
   :group 'cursor)
 
 (defvar blink-cursor-blinks-done 1
diff --git a/lisp/info.el b/lisp/info.el
index f9d63b0f32..906385fdc7 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -260,7 +260,7 @@ This only has an effect if `Info-hide-note-references' is 
non-nil."
   "Depth of breadcrumbs to display.
 0 means do not display breadcrumbs."
   :version "23.1"
-  :type 'integer)
+  :type 'natnum)
 
 (defcustom Info-search-whitespace-regexp "\\s-+"
   "If non-nil, regular expression to match a sequence of whitespace chars.
diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el
index a3ada44370..be26ca55f0 100644
--- a/lisp/jit-lock.el
+++ b/lisp/jit-lock.el
@@ -51,7 +51,7 @@ This variable controls both `display-time' and stealth 
fontification.
 
 The optimum value is a little over the typical number of buffer
 characters which fit in a typical window."
-  :type 'integer)
+  :type 'natnum)
 
 
 (defcustom jit-lock-stealth-time nil
diff --git a/lisp/kmacro.el b/lisp/kmacro.el
index 14be909722..92118ad143 100644
--- a/lisp/kmacro.el
+++ b/lisp/kmacro.el
@@ -129,7 +129,7 @@ Set to nil if no mouse binding is desired."
 
 (defcustom kmacro-ring-max 8
   "Maximum number of keyboard macros to save in macro ring."
-  :type 'integer)
+  :type 'natnum)
 
 
 (defcustom kmacro-execute-before-append t
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 92989fcfb2..a134654a02 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -2194,12 +2194,12 @@ otherwise it could decide to silently do nothing."
 
 (defcustom yank-menu-length 20
   "Text of items in `yank-menu' longer than this will be truncated."
-  :type 'integer
+  :type 'natnum
   :group 'menu)
 
 (defcustom yank-menu-max-items 60
   "Maximum number of entries to display in the `yank-menu'."
-  :type 'integer
+  :type 'natnum
   :group 'menu
   :version "29.1")
 
diff --git a/lisp/midnight.el b/lisp/midnight.el
index 3e309a5c88..60d9b565ef 100644
--- a/lisp/midnight.el
+++ b/lisp/midnight.el
@@ -67,14 +67,14 @@ The autokilling is done by `clean-buffer-list' when it is 
in `midnight-hook'.
 Currently displayed and/or modified (unsaved) buffers, as well as buffers
 matching `clean-buffer-list-kill-never-buffer-names' and
 `clean-buffer-list-kill-never-regexps' are excluded."
-  :type 'integer)
+  :type 'natnum)
 
 (defcustom clean-buffer-list-delay-special 3600
   "The number of seconds before some buffers become eligible for autokilling.
 Buffers matched by `clean-buffer-list-kill-regexps' and
 `clean-buffer-list-kill-buffer-names' are killed if they were last
 displayed more than this many seconds ago."
-  :type 'integer)
+  :type 'natnum)
 
 (defcustom clean-buffer-list-kill-regexps '("\\`\\*Man ")
   "List of regexps saying which buffers will be killed at midnight.
diff --git a/lisp/net/dictionary.el b/lisp/net/dictionary.el
index e0824f3971..eec405373d 100644
--- a/lisp/net/dictionary.el
+++ b/lisp/net/dictionary.el
@@ -89,7 +89,7 @@ You can specify here:
 This port is probably always 2628 so there should be no need to modify it."
   :group 'dictionary
   :set #'dictionary-set-server-var
-  :type 'number
+  :type 'natnum
   :version "28.1")
 
 (defcustom dictionary-identification
@@ -206,7 +206,7 @@ where the current word was found."
   "The port of the proxy server, used only when `dictionary-use-http-proxy' is 
set."
   :group 'dictionary-proxy
   :set #'dictionary-set-server-var
-  :type 'number
+  :type 'natnum
   :version "28.1")
 
 (defcustom dictionary-use-single-buffer
diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el
index da45457891..0f2943cbb0 100644
--- a/lisp/net/ldap.el
+++ b/lisp/net/ldap.el
@@ -54,7 +54,7 @@ a separator."
 Initialized from the LDAP library at build time.
 Default value is 389."
   :type '(choice (const :tag "Use library default" nil)
-                (integer :tag "Port number")))
+                 (natnum :tag "Port number")))
 
 (defcustom ldap-default-base nil
   "Default base for LDAP searches.
diff --git a/lisp/net/pop3.el b/lisp/net/pop3.el
index 0f6dfb6ad4..de225d76dc 100644
--- a/lisp/net/pop3.el
+++ b/lisp/net/pop3.el
@@ -59,7 +59,7 @@
 (defcustom pop3-port 110
   "POP3 port."
   :version "22.1" ;; Oort Gnus
-  :type 'number
+  :type 'natnum
   :group 'pop3)
 
 (defcustom pop3-password-required t
@@ -88,7 +88,7 @@ valid value is `apop'."
 The lower the number, the more latency-sensitive the fetching
 will be.  If your pop3 server doesn't support streaming at all,
 set this to 1."
-  :type 'number
+  :type 'natnum
   :version "24.1"
   :group 'pop3)
 
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 36352a4673..dc0946fb09 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -130,7 +130,7 @@ be displayed instead."
 
 (defcustom rcirc-default-port 6667
   "The default port to connect to."
-  :type 'integer)
+  :type 'natnum)
 
 (defcustom rcirc-default-nick (user-login-name)
   "Your nick."
diff --git a/lisp/net/sieve-manage.el b/lisp/net/sieve-manage.el
index 50342b9105..a39e35a53a 100644
--- a/lisp/net/sieve-manage.el
+++ b/lisp/net/sieve-manage.el
@@ -131,7 +131,7 @@ for doing the actual authentication."
 
 (defcustom sieve-manage-default-port "sieve"
   "Default port number or service name for managesieve protocol."
-  :type '(choice integer string)
+  :type '(choice natnum string)
   :version "24.4")
 
 (defcustom sieve-manage-default-stream 'network
diff --git a/lisp/play/spook.el b/lisp/play/spook.el
index f2bdba1c2a..ccff2e75b0 100644
--- a/lisp/play/spook.el
+++ b/lisp/play/spook.el
@@ -49,7 +49,7 @@
 
 (defcustom spook-phrase-default-count 15
   "Default number of phrases to insert."
-  :type 'integer)
+  :type 'natnum)
 
 ;;;###autoload
 (defun spook ()
diff --git a/lisp/play/tetris.el b/lisp/play/tetris.el
index d9bc0dd020..a6bfea81ee 100644
--- a/lisp/play/tetris.el
+++ b/lisp/play/tetris.el
@@ -95,27 +95,27 @@ If the return value is a number, it is used as the timer 
period."
 
 (defcustom tetris-buffer-width 30
   "Width of used portion of buffer."
-  :type 'number)
+  :type 'natnum)
 
 (defcustom tetris-buffer-height 22
   "Height of used portion of buffer."
-  :type 'number)
+  :type 'natnum)
 
 (defcustom tetris-width 10
   "Width of playing area."
-  :type 'number)
+  :type 'natnum)
 
 (defcustom tetris-height 20
   "Height of playing area."
-  :type 'number)
+  :type 'natnum)
 
 (defcustom tetris-top-left-x 3
   "X position of top left of playing area."
-  :type 'number)
+  :type 'natnum)
 
 (defcustom tetris-top-left-y 1
   "Y position of top left of playing area."
-  :type 'number)
+  :type 'natnum)
 
 (defcustom tetris-allow-repetitions t
   "If non-nil, use a random selection for each shape.
diff --git a/lisp/profiler.el b/lisp/profiler.el
index 94c24c62aa..8670e5786a 100644
--- a/lisp/profiler.el
+++ b/lisp/profiler.el
@@ -38,7 +38,7 @@
 
 (defcustom profiler-sampling-interval 1000000
   "Default sampling interval in nanoseconds."
-  :type 'integer
+  :type 'natnum
   :group 'profiler)
 
 
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
index ef8375e859..b950f93f2a 100644
--- a/lisp/progmodes/sql.el
+++ b/lisp/progmodes/sql.el
@@ -274,8 +274,8 @@ file.  Since that is a plaintext file, this could be 
dangerous."
 (defcustom sql-port 0
   "Default port for connecting to a MySQL or Postgres server."
   :version "24.1"
-  :type 'number
-  :safe 'numberp)
+  :type 'natnum
+  :safe 'natnump)
 
 (defcustom sql-default-directory nil
   "Default directory for SQL processes."
diff --git a/lisp/recentf.el b/lisp/recentf.el
index 601b2642f7..4bc1ab5c21 100644
--- a/lisp/recentf.el
+++ b/lisp/recentf.el
@@ -178,7 +178,7 @@ The default is to call `find-file' to edit the selected 
file."
 (defcustom recentf-max-menu-items 10
   "Maximum number of items in the recentf menu."
   :group 'recentf
-  :type 'integer)
+  :type 'natnum)
 
 (defcustom recentf-menu-filter nil
   "Function used to filter files displayed in the recentf menu.
diff --git a/lisp/savehist.el b/lisp/savehist.el
index 172acaa4e8..8924c8dde2 100644
--- a/lisp/savehist.el
+++ b/lisp/savehist.el
@@ -97,7 +97,8 @@ This is decimal, not octal.  The default is 384 (0600 in 
octal).
 Set to nil to use the default permissions that Emacs uses, typically
 mandated by umask.  The default is a bit more restrictive to protect
 the user's privacy."
-  :type 'integer)
+  :type '(choice (natnum :tag "Specify")
+                 (const :tag "Use default" :value nil)))
 
 (defcustom savehist-autosave-interval (* 5 60)
   "The interval between autosaves of minibuffer history.
diff --git a/lisp/strokes.el b/lisp/strokes.el
index 5402ebf1e1..376cbc0cfe 100644
--- a/lisp/strokes.el
+++ b/lisp/strokes.el
@@ -252,7 +252,7 @@ WARNING: Changing the value of this variable will gravely 
affect the
          figure out what it should be based on your needs and on how
          quick the particular platform(s) you're operating on, and
          only then start programming in your custom strokes."
-  :type 'integer)
+  :type 'natnum)
 
 (defcustom strokes-file (locate-user-emacs-file "strokes" ".strokes")
   "File containing saved strokes for Strokes mode."
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 4ca177f73b..fdfbe207b5 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -618,7 +618,7 @@ Also add the number of windows in the window configuration."
   "Maximum length of the tab name from the current buffer.
 Effective when `tab-bar-tab-name-function' is customized
 to `tab-bar-tab-name-truncated'."
-  :type 'integer
+  :type 'natnum
   :group 'tab-bar
   :version "27.1")
 
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index a7e257f41c..08e38c9a05 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -66,7 +66,7 @@ If you select a region larger than this size, it won't be 
copied to your system
 clipboard.  Since clipboard data is base 64 encoded, the actual number of
 string bytes that can be copied is 3/4 of this value."
   :version "25.1"
-  :type 'integer)
+  :type 'natnum)
 
 (defcustom xterm-set-window-title nil
   "Whether Emacs should set window titles to an Emacs frame in an XTerm."
diff --git a/lisp/time.el b/lisp/time.el
index cd985bfb28..e7066cae7a 100644
--- a/lisp/time.el
+++ b/lisp/time.el
@@ -93,7 +93,7 @@ Non-nil means \\[display-time] should display day and date as 
well as time."
 
 (defcustom display-time-interval 60
   "Seconds between updates of time in the mode line."
-  :type 'integer)
+  :type 'natnum)
 
 (defcustom display-time-24hr-format nil
   "Non-nil indicates time should be displayed as hh:mm, 0 <= hh <= 23.
@@ -519,7 +519,7 @@ If the value is t instead of an alist, use the value of
 
 (defcustom world-clock-timer-second 60
   "Interval in seconds for updating the `world-clock' buffer."
-  :type 'integer
+  :type 'natnum
   :version "28.1")
 
 (defface world-clock-label
diff --git a/lisp/url/url-cache.el b/lisp/url/url-cache.el
index 3e69227124..db8c121cf0 100644
--- a/lisp/url/url-cache.el
+++ b/lisp/url/url-cache.el
@@ -37,7 +37,7 @@
   "Default maximum time in seconds before cache files expire.
 Used by the function `url-cache-expired'."
   :version "24.1"
-  :type 'integer
+  :type 'natnum
   :group 'url-cache)
 
 ;; Cache manager
diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el
index 15c78512c6..0709cdd3fa 100644
--- a/lisp/url/url-cookie.el
+++ b/lisp/url/url-cookie.el
@@ -360,7 +360,7 @@ to run the `url-cookie-setup-save-timer' function manually."
          (set-default var val)
          (if (bound-and-true-p url-setup-done)
              (url-cookie-setup-save-timer)))
-  :type 'integer
+  :type 'natnum
   :group 'url-cookie)
 
 (defun url-cookie-setup-save-timer ()
diff --git a/lisp/url/url-history.el b/lisp/url/url-history.el
index cb4814afca..058e601301 100644
--- a/lisp/url/url-history.el
+++ b/lisp/url/url-history.el
@@ -63,7 +63,7 @@ to run the `url-history-setup-save-timer' function manually."
          (set-default var val)
          (if (bound-and-true-p url-setup-done)
              (url-history-setup-save-timer)))
-  :type 'integer
+  :type 'natnum
   :group 'url-history)
 
 (defvar url-history-timer nil)
diff --git a/lisp/url/url-queue.el b/lisp/url/url-queue.el
index b2e24607e1..cf45a7f681 100644
--- a/lisp/url/url-queue.el
+++ b/lisp/url/url-queue.el
@@ -36,13 +36,13 @@
 (defcustom url-queue-parallel-processes 6
   "The number of concurrent processes."
   :version "24.1"
-  :type 'integer
+  :type 'natnum
   :group 'url)
 
 (defcustom url-queue-timeout 5
   "How long to let a job live once it's started (in seconds)."
   :version "24.1"
-  :type 'integer
+  :type 'natnum
   :group 'url)
 
 ;;; Internal variables.
diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el
index 1012525568..de42599e0d 100644
--- a/lisp/url/url-vars.el
+++ b/lisp/url/url-vars.el
@@ -297,7 +297,7 @@ get the first available language (as opposed to the 
default)."
 (defcustom url-max-password-attempts 5
   "Maximum number of times a password will be prompted for.
 Applies when a protected document is denied by the server."
-  :type 'integer
+  :type 'natnum
   :group 'url)
 
 (defcustom url-show-status t
@@ -330,7 +330,7 @@ undefined."
 (defcustom url-max-redirections 30
   "The maximum number of redirection requests to honor in a HTTP connection.
 A negative number means to honor an unlimited number of redirection requests."
-  :type 'integer
+  :type 'natnum
   :group 'url)
 
 (defcustom url-confirmation-func 'y-or-n-p
diff --git a/lisp/vc/emerge.el b/lisp/vc/emerge.el
index 6e94ea0715..422ed5c0a4 100644
--- a/lisp/vc/emerge.el
+++ b/lisp/vc/emerge.el
@@ -221,7 +221,7 @@ depend on the flags."
 
 (defcustom emerge-min-visible-lines 3
   "Number of lines to show above and below the flags when displaying a 
difference."
-  :type 'integer)
+  :type 'natnum)
 
 (defcustom emerge-temp-file-prefix
   (expand-file-name "emerge" temporary-file-directory)
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index d6f0f4a497..d3e53858c1 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -824,7 +824,7 @@ for the backend you use."
   "Limit the number of items shown by the VC log commands.
 Zero means unlimited.
 Not all VC backends are able to support this feature."
-  :type 'integer)
+  :type 'natnum)
 
 (defcustom vc-allow-async-revert nil
   "Specifies whether the diff during \\[vc-revert] may be asynchronous.
diff --git a/lisp/window.el b/lisp/window.el
index eba888a89d..a3ef2521bb 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -451,7 +451,7 @@ window to a height less than the one specified here, an
 application should instead call `window-resize' with a non-nil
 IGNORE argument.  In order to have `split-window' make a window
 shorter, explicitly specify the SIZE argument of that function."
-  :type 'integer
+  :type 'natnum
   :version "24.1"
   :group 'windows)
 
@@ -483,7 +483,7 @@ window to a width less than the one specified here, an
 application should instead call `window-resize' with a non-nil
 IGNORE argument.  In order to have `split-window' make a window
 narrower, explicitly specify the SIZE argument of that function."
-  :type 'integer
+  :type 'natnum
   :version "24.1"
   :group 'windows)
 
diff --git a/lisp/winner.el b/lisp/winner.el
index 9b2433b492..38ab5f5101 100644
--- a/lisp/winner.el
+++ b/lisp/winner.el
@@ -50,7 +50,7 @@
 
 (defcustom winner-ring-size 200
   "Maximum number of stored window configurations per frame."
-  :type 'integer)
+  :type 'natnum)
 
 (defcustom winner-boring-buffers '("*Completions*")
   "List of buffer names whose windows `winner-undo' will not restore.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]