Commit 0fac75fe authored by Glenn Morris's avatar Glenn Morris

Improve the custom type of some user options.

* lisp/desktop.el (desktop-minor-mode-table):
* lisp/man.el (Man-frame-parameters):
* lisp/midnight.el (midnight-delay):
* lisp/speedbar.el (speedbar-select-frame-method):
* lisp/tooltip.el (tooltip-frame-parameters):
* lisp/tree-widget.el (tree-widget-space-width):
* lisp/type-break.el (type-break-keystroke-threshold):
* lisp/woman.el (woman-imenu-generic-expression):
* lisp/cedet/ede.el (ede-debug-program-function):
* lisp/cedet/ede/project-am.el (project-am-debug-target-function):
* lisp/emulation/viper-keym.el (viper-toggle-key):
* lisp/erc/erc-networks.el (erc-server-alist):
* lisp/gnus/message.el (message-deletable-headers, message-signature):
* lisp/mail/mailalias.el (mail-directory-stream):
* lisp/play/tetris.el (tetris-x-colors):
* lisp/progmodes/gud.el (gud-tooltip-modes): Improve custom type.
parent 2df0e042
......@@ -96,7 +96,7 @@ target willing to take the file. `never' means never perform the check."
(defcustom ede-debug-program-function 'gdb
"Default Emacs command used to debug a target."
:group 'ede
:type 'sexp) ; make this be a list of options some day
:type 'function) ; make this be a list of options some day
(defcustom ede-project-directories nil
"Directories in which EDE may search for project files.
......@@ -65,7 +65,7 @@
(defcustom project-am-debug-target-function 'gdb
"*Default Emacs command used to debug a target."
:group 'project-am
:type 'sexp) ; make this be a list some day
:type 'function) ; make this be a list some day
(defconst project-am-type-alist
'(("bin" project-am-program "bin_PROGRAMS" t)
......@@ -554,7 +554,9 @@ RESTORE-FUNCTION nil means don't try to restore the minor mode.
Only minor modes for which the name of the buffer-local variable
and the name of the minor mode function are different have to be added to
this table. See also `desktop-minor-mode-handlers'."
:type 'sexp
:type '(alist :key-type (symbol :tag "Minor mode")
:value-type (list :tag "Restore function"
(choice (const nil) function)))
:group 'desktop)
......@@ -154,10 +154,8 @@ viper-insert-basic-map. Not recommended, except for novice users.")
;; Some important keys used in viper
(defcustom viper-toggle-key [(control ?z)] ; "\C-z"
"The key used to change states from Emacs to Vi and back.
In insert mode, this key also functions as Meta.
Enter as a sexp. Examples: \"\\C-z\", [(control ?z)]."
:type 'sexp
In insert mode, this key also functions as Meta."
:type 'key-sequence
:group 'viper
:set (lambda (symbol value)
(let ((old-value (if (boundp 'viper-toggle-key)
......@@ -443,7 +443,15 @@ NET is a symbol indicating to which network from `erc-networks-alist' this
HOST is the servers hostname and
PORTS is either a number, a list of numbers, or a list of port ranges."
:group 'erc-networks
:type 'sexp)
:type '(alist :key-type (string :tag "Name")
(group symbol (string :tag "Hostname")
(choice :tag "Ports"
(integer :tag "Port number")
(repeat :tag "List of ports or ranges"
(choice (integer :tag "Port number")
(list :tag "Port range"
integer integer)))))))
(defcustom erc-networks-alist
'((4-irc "")
......@@ -256,10 +256,10 @@ This is a list of regexps and regexp matches."
:type '(repeat regexp))
(defcustom message-deletable-headers '(Message-ID Date Lines)
"Headers to be deleted if they already exist and were generated by message previously."
"Headers to delete if present and previously generated by message."
:group 'message-headers
:link '(custom-manual "(message)Message Headers")
:type 'sexp)
:type '(repeat (symbol :tag "Header")))
(defcustom message-ignored-news-headers
......@@ -1072,7 +1072,9 @@ If t, the `message-signature-file' file will be inserted instead.
If a function, the result from the function will be used instead.
If a form, the result from the form will be used instead."
:version "23.2"
:type 'sexp
:type '(choice string (const :tag "Contents of signature file" t)
:risky t
:link '(custom-manual "(message)Insertion Variables")
:group 'message-insertion)
......@@ -130,7 +130,12 @@ or like this:
(defcustom mail-directory-stream nil
"List of (HOST SERVICE) for stream connection to mail directory."
:type 'sexp
:type '(choice (const nil)
(list (string :tag "Host name or ip address")
(choice (integer :tag "Service port number")
(string :tag "Service name"))
(plist :inline t
:tag "Additional open-network-stream parameters")))
:group 'mailalias)
(put 'mail-directory-stream 'risky-local-variable t)
......@@ -184,7 +184,9 @@ The value also can be a positive integer for a fixed width."
(defcustom Man-frame-parameters nil
"Frame parameter list for creating a new frame for a manual page."
:type 'sexp
:type '(repeat (cons :format "%v"
(symbol :tag "Parameter")
(sexp :tag "Value")))
:group 'man)
(defcustom Man-downcase-section-letters-flag t
......@@ -217,7 +217,7 @@ You should set this variable before loading midnight.el, or
set it by calling `midnight-delay-set', or use `custom'.
If you wish, you can use a string instead, it will be passed as the
first argument to `run-at-time'."
:type 'sexp
:type '(choice integer string)
:set #'midnight-delay-set)
(provide 'midnight)
......@@ -87,9 +87,15 @@ If the return value is a number, it is used as the timer period."
(defcustom tetris-x-colors
[[0 0 1] [0.7 0 1] [1 1 0] [1 0 1] [0 1 1] [0 1 0] [1 0 0]]
"Vector of colors of the various shapes."
"Vector of RGB colors of the various shapes."
:group 'tetris
:type 'sexp)
:type '(vector (vector :tag "Shape 1" number number number)
(vector :tag "Shape 2" number number number)
(vector :tag "Shape 3" number number number)
(vector :tag "Shape 4" number number number)
(vector :tag "Shape 5" number number number)
(vector :tag "Shape 6" number number number)
(vector :tag "Shape 7" number number number)))
(defcustom tetris-buffer-name "*Tetris*"
"Name used for Tetris buffer."
......@@ -3406,7 +3406,7 @@ it if ARG is omitted or nil."
(defcustom gud-tooltip-modes '(gud-mode c-mode c++-mode fortran-mode
"List of modes for which to enable GUD tooltips."
:type 'sexp
:type '(repeat (symbol :tag "Major mode"))
:group 'gud
:group 'tooltip)
......@@ -3469,11 +3469,11 @@ TOKEN will be the list, and INDENT is the current indentation level."
(defcustom speedbar-select-frame-method 'attached
"Specify how to select a frame for displaying a file.
A value of `attached' means to use the attached frame (the frame
that speedbar was started from.) A number such as 1 or -1 means to
pass that number to `other-frame' while selecting a frame from speedbar."
A number such as 1 or -1 means to pass that number to `other-frame'
while selecting a frame from speedbar. Any other value means to use
the attached frame (the frame that speedbar was started from)."
:group 'speedbar
:type 'sexp)
:type '(choice integer (other :tag "attached" attached)))
(defun speedbar-find-file-in-frame (file)
"This will load FILE into the speedbar attached frame.
......@@ -127,7 +127,9 @@ position to pop up the tooltip.
Note that font and color parameters are ignored, and the attributes
of the `tooltip' face are used instead."
:type 'sexp
:type '(repeat (cons :format "%v"
(symbol :tag "Parameter")
(sexp :tag "Value")))
:group 'tooltip)
(defface tooltip
......@@ -208,9 +208,11 @@ icon widgets used to draw the tree. By default these images are used:
(defcustom tree-widget-space-width 0.5
"Amount of space between an icon image and a node widget.
Must be a valid space :width display property."
Must be a valid space :width display property.
See Info node `(elisp)Specified Space'."
:group 'tree-widget
:type 'sexp)
:type '(choice (number :tag "Multiple of normal character width")
;;; Image support
......@@ -133,7 +133,7 @@ keystroke even though they really require multiple keys to generate them.
The command `type-break-guesstimate-keystroke-threshold' can be used to
guess a reasonably good pair of values for this variable."
:set-after '(type-break-interval)
:type 'sexp
:type '(cons (choice integer (const nil)) (choice integer (const nil)))
:group 'type-break)
(defcustom type-break-query-function 'yes-or-no-p
......@@ -752,7 +752,10 @@ Default is t."
"Imenu support for Sections and Subsections.
An alist with elements of the form (MENU-TITLE REGEXP INDEX) --
see the documentation for `imenu-generic-expression'."
:type 'sexp
:type '(alist :key-type (choice :tag "Title" (const nil) string)
:value-type (group (choice (string :tag "Regexp")
:group 'woman-interface)
(defcustom woman-imenu nil
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment