Commit 78f3273a authored by Chong Yidong's avatar Chong Yidong

Convert more defvars to defcustoms.

* dos-w32.el (file-name-buffer-file-type-alist)
(direct-print-region-use-command-dot-com):
* ffap.el (ffap-menu-regexp):
* follow.el (follow-debug):
* forms.el (forms--debug):
* iswitchb.el (iswitchb-all-frames):
* ido.el (ido-all-frames):
* mail/feedmail.el (feedmail-mail-send-hook)
(feedmail-mail-send-hook-queued):
* mail/footnote.el (footnote-signature-separator):
* mail/mailabbrev.el (mail-alias-separator-string)
(mail-abbrev-mode-regexp):
* mail/rmail.el (rmail-speedbar-match-folder-regexp):
* progmodes/idlwave.el (idlwave-libinfo-file)
(idlwave-default-completion-case-is-down)
(idlwave-library-routines): Convert defvars to defcustoms.

* mail/rmail.el (rmail-decode-mime-charset):
* progmodes/idlw-shell.el (idlwave-shell-print-expression-function)
(idlwave-shell-fix-inserted-breaks)
(idlwave-shell-activate-alt-keybindings)
(idlwave-shell-use-breakpoint-glyph):
* facemenu.el (facemenu-unlisted-faces): Delete obsolete vars.

* doc/lispref/os.texi (Timers): Use defopt for timer-max-repeats.
parent ab0fa4e4
2012-05-04 Chong Yidong <cyd@gnu.org>
* os.texi (Timers): Use defopt for timer-max-repeats.
2012-05-03 Paul Eggert <eggert@cs.ucla.edu>
* os.texi (Time of Day): Do not limit current-time-string
......
......@@ -1735,11 +1735,11 @@ between them). If you want a timer to run again no less than @var{n}
seconds after the last invocation, don't use the @var{repeat} argument.
Instead, the timer function should explicitly reschedule the timer.
@defvar timer-max-repeats
@defopt timer-max-repeats
This variable's value specifies the maximum number of times to repeat
calling a timer function in a row, when many previously scheduled
calls were unavoidably delayed.
@end defvar
@end defopt
@defmac with-timeout (seconds timeout-forms@dots{}) body@dots{}
Execute @var{body}, but give up after @var{seconds} seconds. If
......
......@@ -187,6 +187,11 @@ third argument is a frame (that usage was obsolete since Emacs 22.2).
but keywords or keyword-string pairs. The old argument list will
still be supported for Emacs 24.x.
** The following obsolete variables and varaliases have been removed:
*** `facemenu-unlisted-faces'
*** `rmail-decode-mime-charset'
* Lisp changes in Emacs 24.2
......
2012-05-04 Chong Yidong <cyd@gnu.org>
* dos-w32.el (file-name-buffer-file-type-alist)
(direct-print-region-use-command-dot-com):
* ffap.el (ffap-menu-regexp):
* find-file.el (ff-special-constructs):
* follow.el (follow-debug):
* forms.el (forms--debug):
* iswitchb.el (iswitchb-all-frames):
* ido.el (ido-all-frames):
* emacs-lisp/timer.el (timer-max-repeats):
* mail/feedmail.el (feedmail-mail-send-hook)
(feedmail-mail-send-hook-queued):
* mail/footnote.el (footnote-signature-separator):
* mail/mailabbrev.el (mail-alias-separator-string)
(mail-abbrev-mode-regexp):
* mail/rmail.el (rmail-speedbar-match-folder-regexp):
* progmodes/idlwave.el (idlwave-libinfo-file)
(idlwave-default-completion-case-is-down)
(idlwave-library-routines): Convert defvars to defcustoms.
* mail/rmail.el (rmail-decode-mime-charset):
* progmodes/idlw-shell.el (idlwave-shell-print-expression-function)
(idlwave-shell-fix-inserted-breaks)
(idlwave-shell-activate-alt-keybindings)
(idlwave-shell-use-breakpoint-glyph):
* facemenu.el (facemenu-unlisted-faces): Delete obsolete vars.
2012-05-03 Stefan Monnier <monnier@iro.umontreal.ca>
* minibuffer.el (completion--twq-all): Beware completion-ignore-case.
......
......@@ -38,9 +38,8 @@
(setq null-device "NUL")
;; For distinguishing file types based upon suffixes.
(defvar file-name-buffer-file-type-alist
'(
("[:/].*config.sys$" . nil) ; config.sys text
(defcustom file-name-buffer-file-type-alist
'(("[:/].*config.sys$" . nil) ; config.sys text
("\\.\\(obj\\|exe\\|com\\|lib\\|sys\\|bin\\|ico\\|pif\\|class\\)$" . t)
; MS-Dos stuff
("\\.\\(dll\\|drv\\|386\\|vxd\\|fon\\|fnt\\|fot\\|ttf\\|grp\\)$" . t)
......@@ -57,7 +56,10 @@
)
"Alist for distinguishing text files from binary files.
Each element has the form (REGEXP . TYPE), where REGEXP is matched
against the file name, and TYPE is nil for text, t for binary.")
against the file name, and TYPE is nil for text, t for binary."
:type '(repeat (cons regexp boolean))
:group 'dos-fns
:group 'w32)
;; Return the pair matching filename on file-name-buffer-file-type-alist,
;; or nil otherwise.
......@@ -282,8 +284,11 @@ filesystem mounted on drive Z:, FILESYSTEM could be \"Z:\"."
;;; Support for printing under DOS/Windows, see lpr.el and ps-print.el.
(defvar direct-print-region-use-command-dot-com t
"Control whether command.com is used to print on Windows 9x.")
(defcustom direct-print-region-use-command-dot-com t
"If non-nil, use command.com to print on Windows 9x."
:type 'boolean
:group 'dos-fns
:group 'w32)
;; Function to actually send data to the printer port.
;; Supports writing directly, and using various programs.
......
......@@ -240,12 +240,14 @@ and idle timers such as are scheduled by `run-with-idle-timer'."
(defvar timer-event-last-2 nil
"Third-to-last timer that was run.")
(defvar timer-max-repeats 10
(defcustom timer-max-repeats 10
"Maximum number of times to repeat a timer, if many repeats are delayed.
Timer invocations can be delayed because Emacs is suspended or busy,
or because the system's time changes. If such an occurrence makes it
appear that many invocations are overdue, this variable controls
how many will really happen.")
how many will really happen."
:type 'integer
:group 'internal)
(defun timer-until (timer time)
"Calculate number of seconds from when TIMER will run, until TIME.
......
......@@ -127,15 +127,6 @@ just before \"Other\" at the end."
:type 'boolean
:group 'facemenu)
(defvar facemenu-unlisted-faces
`(modeline region secondary-selection highlight scratch-face
,(purecopy "^font-lock-") ,(purecopy "^gnus-") ,(purecopy "^message-")
,(purecopy "^ediff-") ,(purecopy "^term-") ,(purecopy "^vc-")
,(purecopy "^widget-") ,(purecopy "^custom-") ,(purecopy "^vm-"))
"List of faces that are of no interest to the user.")
(make-obsolete-variable 'facemenu-unlisted-faces 'facemenu-listed-faces
"22.1,\n and has no effect on the Face menu")
(defcustom facemenu-listed-faces nil
"List of faces to include in the Face menu.
Each element should be a symbol, the name of a face.
......
......@@ -1457,10 +1457,12 @@ and the functions `ffap-file-at-point' and `ffap-url-at-point'."
;;; Menu support (`ffap-menu'):
(defvar ffap-menu-regexp nil
"If non-nil, overrides `ffap-next-regexp' during `ffap-menu'.
(defcustom ffap-menu-regexp nil
"If non-nil, regexp overriding `ffap-next-regexp' in `ffap-menu'.
Make this more restrictive for faster menu building.
For example, try \":/\" for URL (and some ftp) references.")
For example, try \":/\" for URL (and some ftp) references."
:type '(choice (const nil) regexp)
:group 'ffap)
(defvar ffap-menu-alist nil
"Buffer local cache of menu presented by `ffap-menu'.")
......
......@@ -181,21 +181,21 @@ To override this, give an argument to `ff-find-other-file'."
:group 'ff)
;;;###autoload
(defvar ff-special-constructs
`(
;; C/C++ include, for NeXTstep too
(,(purecopy "^\#\\s *\\(include\\|import\\)\\s +[<\"]\\(.*\\)[>\"]") .
(defcustom ff-special-constructs
;; C/C++ include, for NeXTstep too
`((,(purecopy "^\#\\s *\\(include\\|import\\)\\s +[<\"]\\(.*\\)[>\"]") .
(lambda ()
(buffer-substring (match-beginning 2) (match-end 2))))
)
(buffer-substring (match-beginning 2) (match-end 2)))))
;; We include `ff-treat-as-special' documentation here so that autoload
;; can make it available to be read prior to loading this file.
"List of special constructs for `ff-treat-as-special' to recognize.
"List of special constructs recognized by `ff-treat-as-special'.
Each element, tried in order, has the form (REGEXP . EXTRACT).
If REGEXP matches the current line (from the beginning of the line),
`ff-treat-as-special' calls function EXTRACT with no args.
If EXTRACT returns nil, keep trying. Otherwise, return the
filename that EXTRACT returned.")
filename that EXTRACT returned."
:type '(repeat (cons regexp function))
:group 'ff)
(defvaralias 'ff-related-file-alist 'ff-other-file-alist)
(defcustom ff-other-file-alist 'cc-other-file-alist
......
......@@ -321,9 +321,10 @@ The commands in this list are checked at load time.
To mark other commands as suitable for caching, set the symbol
property `follow-mode-use-cache' to non-nil.")
(defvar follow-debug nil
"Non-nil when debugging Follow mode.")
(defcustom follow-debug nil
"If non-nil, emit Follow mode debugging messages."
:type 'boolean
:group 'follow)
;; Internal variables:
......
......@@ -2030,8 +2030,10 @@ Usage: (setq forms-number-of-fields
;;; Debugging
(defvar forms--debug nil
"Enables forms-mode debugging if not nil.")
(defcustom forms--debug nil
"If non-nil, enable Forms mode debugging."
:type 'boolean
:group 'forms)
(defun forms--debug (&rest args)
"Internal debugging routine."
......
......@@ -893,9 +893,14 @@ Otherwise, only the current list of matches is shown."
:type 'boolean
:group 'ido)
(defvar ido-all-frames 'visible
"Argument to pass to `walk-windows' when finding visible files.
See documentation of `walk-windows' for useful values.")
(defcustom ido-all-frames 'visible
"Argument to pass to `walk-windows' when Ido is finding buffers.
See documentation of `walk-windows' for useful values."
:type '(choice (const :tag "Selected frame only" nil)
(const :tag "All existing frames" t)
(const :tag "All visible frames" visible)
(const :tag "All frames on this terminal" 0))
:group 'ido)
(defcustom ido-minibuffer-setup-hook nil
"Ido-specific customization of minibuffer setup.
......
......@@ -373,8 +373,13 @@ See also `iswitchb-newbuffer'."
:group 'iswitchb)
(defvar iswitchb-all-frames 'visible
"Argument to pass to `walk-windows' when finding visible buffers.
See documentation of `walk-windows' for useful values.")
"Argument to pass to `walk-windows' when iswitchb is finding buffers.
See documentation of `walk-windows' for useful values."
:type '(choice (const :tag "Selected frame only" nil)
(const :tag "All existing frames" t)
(const :tag "All visible frames" visible)
(const :tag "All frames on this terminal" 0))
:group 'iswitchb)
(defcustom iswitchb-minibuffer-setup-hook nil
"Iswitchb-specific customization of minibuffer setup.
......
......@@ -1366,17 +1366,19 @@ call to `feedmail-run-the-queue'."
(feedmail-say-debug ">in-> feedmail-mail-send-hook-splitter %s" feedmail-queue-runner-is-active)
(if feedmail-queue-runner-is-active
(run-hooks 'feedmail-mail-send-hook-queued)
(run-hooks 'feedmail-mail-send-hook))
)
(defvar feedmail-mail-send-hook nil
"See documentation for `feedmail-mail-send-hook-splitter'.")
(run-hooks 'feedmail-mail-send-hook)))
(defcustom feedmail-mail-send-hook nil
"Hook run by `feedmail-mail-send-hook-splitter' for immediate mail.
See documentation of `feedmail-mail-send-hook-splitter' for details."
:type 'hook
:group 'feedmail)
(defvar feedmail-mail-send-hook-queued nil
"See documentation for `feedmail-mail-send-hook-splitter'.")
(defcustom feedmail-mail-send-hook-queued nil
"Hook run by `feedmail-mail-send-hook-splitter' for queued mail.
See documentation of `feedmail-mail-send-hook-splitter' for details."
:type 'hook
:group 'feedmail)
(defun feedmail-confirm-addresses-hook-example ()
"An example of a `feedmail-last-chance-hook'.
......@@ -1387,9 +1389,7 @@ It shows the simple addresses and gets a confirmation. Use as:
(erase-buffer)
(insert (mapconcat 'identity feedmail-address-list " "))
(if (not (y-or-n-p "How do you like them apples? "))
(error "FQM: Sending...gave up in last chance hook")
)))
(error "FQM: Sending...gave up in last chance hook"))))
(defcustom feedmail-last-chance-hook nil
"User's last opportunity to modify the message on its way out.
......@@ -2027,12 +2027,6 @@ backup file names and the like)."
(if (looking-at ".*\r\n.*\r\n")
(while (search-forward "\r\n" nil t)
(replace-match "\n" nil t)))
;; ;; work around text-vs-binary weirdness
;; ;; if we don't find the normal M-H-S, try reading the file a different way
;; (if (not (feedmail-find-eoh t))
;; (let ((file-name-buffer-file-type-alist nil) (default-buffer-file-type nil))
;; (erase-buffer)
;; (insert-file-contents maybe-file)))
(funcall feedmail-queue-runner-mode-setter arg)
(condition-case signal-stuff ; don't give up the loop if user skips some
(let ((feedmail-enable-queue nil)
......
......@@ -126,10 +126,12 @@ has no effect on buffers already displaying footnotes."
:type 'string
:group 'footnote)
(defvar footnote-signature-separator (if (boundp 'message-signature-separator)
message-signature-separator
"^-- $")
"String used to recognize .signatures.")
(defcustom footnote-signature-separator (if (boundp 'message-signature-separator)
message-signature-separator
"^-- $")
"Regexp used by Footnote mode to recognize signatures."
:type 'regexp
:group 'footnote)
;;; Private variables
......
......@@ -254,10 +254,12 @@ By default this is the file specified by `mail-personal-alias-file'."
mail-abbrevs)
(message "Parsing %s... done" file))
(defvar mail-alias-separator-string ", "
"A string inserted between addresses in multi-address mail aliases.
(defcustom mail-alias-separator-string ", "
"String inserted between addresses in multi-address mail aliases.
This has to contain a comma, so \", \" is a reasonable value. You might
also want something like \",\\n \" to get each address on its own line.")
also want something like \",\\n \" to get each address on its own line."
:type 'string
:group 'mail-abbrev)
;; define-mail-abbrev sets this flag, which causes mail-resolve-all-aliases
;; to be called before expanding abbrevs if it's necessary.
......@@ -421,14 +423,16 @@ fill-column, break the line at the previous comma, and indent the next line."
;;; Syntax tables and abbrev-expansion
(defvar mail-abbrev-mode-regexp
(defcustom mail-abbrev-mode-regexp
"^\\(Resent-\\)?\\(To\\|From\\|CC\\|BCC\\|Reply-to\\):"
"Regexp to select mail-headers in which mail abbrevs should be expanded.
"Regexp matching mail headers in which mail abbrevs should be expanded.
This string will be handed to `looking-at' with point at the beginning
of the current line; if it matches, abbrev mode will be turned on, otherwise
it will be turned off. (You don't need to worry about continuation lines.)
This should be set to match those mail fields in which you want abbreviations
turned on.")
turned on."
:type 'regexp
:group 'mail-abbrev)
(defvar mail-abbrev-syntax-table nil
"The syntax-table used for abbrev-expansion purposes.
......
......@@ -713,19 +713,6 @@ to an appropriate value, and optionally also set
`rmail-insert-mime-forwarded-message-function', and
`rmail-insert-mime-resent-message-function'.")
;; FIXME this is unused since 23.1.
(defvar rmail-decode-mime-charset t
"Non-nil means a message is decoded by MIME's charset specification.
If this variable is nil, or the message has not MIME specification,
the message is decoded as normal way.
If the variable `rmail-enable-mime' is non-nil, this variable is
ignored, and all the decoding work is done by a feature specified by
the variable `rmail-mime-feature'.")
(make-obsolete-variable 'rmail-decode-mime-charset
"it does nothing." "23.1")
(defvar rmail-mime-charset-pattern
(concat "^content-type:[ \t]*text/plain;"
"\\(?:[ \t\n]*\\(?:format\\|delsp\\)=\"?[-a-z0-9]+\"?;\\)*"
......@@ -4231,10 +4218,13 @@ This has an effect only if a summary buffer exists."
;;; Speedbar support for RMAIL files.
(eval-when-compile (require 'speedbar))
(defvar rmail-speedbar-match-folder-regexp "^[A-Z0-9]+\\(\\.[A-Z0-9]+\\)?$"
"This regex is used to match folder names to be displayed in speedbar.
Enabling this will permit speedbar to display your folders for easy
browsing, and moving of messages.")
(defcustom rmail-speedbar-match-folder-regexp "^[A-Z0-9]+\\(\\.[A-Z0-9]+\\)?$"
"Regexp matching Rmail folder names to be displayed in Speedbar.
Enabling this permits Speedbar to display your folders for easy
browsing, and moving of messages."
:type 'regexp
:group 'rmail
:group 'speedbar)
(defvar rmail-speedbar-last-user nil
"The last user to be displayed in the speedbar.")
......
......@@ -183,12 +183,6 @@ so that the name will be unique among multiple Emacs processes."
:group 'idlwave-shell-general-setup
:type 'string)
(defvar idlwave-shell-fix-inserted-breaks nil
"OBSOLETE VARIABLE, is no longer used.
The documentation of this variable used to be:
If non-nil then run `idlwave-shell-remove-breaks' to clean up IDL messages.")
(defcustom idlwave-shell-prefix-key "\C-c\C-d"
"The prefix key for the debugging map `idlwave-shell-mode-prefix-map'.
This variable must already be set when idlwave-shell.el is loaded.
......@@ -223,9 +217,6 @@ window, but is useful for stepping, etc."
;; (defcustom idlwave-shell-debug-modifiers... See idlwave.el
(defvar idlwave-shell-activate-alt-keybindings nil
"Obsolete variable. See `idlwave-shell-debug-modifiers'.")
(defcustom idlwave-shell-use-truename nil
"Non-nil means, use `file-truename' when looking for buffers.
If this variable is non-nil, Emacs will use the function `file-truename' to
......@@ -335,9 +326,6 @@ expression being examined."
(string :tag "Label ")
(string :tag "Command"))))
(defvar idlwave-shell-print-expression-function nil
"OBSOLETE VARIABLE, is no longer used.")
(defcustom idlwave-shell-separate-examine-output t
"Non-nil means, put output of examine commands in their own buffer."
:group 'idlwave-shell-command-setup
......@@ -520,9 +508,6 @@ t Glyph when possible, otherwise face (same effect as 'glyph)."
(const :tag "Display glyph (red dot)" glyph)
(const :tag "Glyph or face." t)))
(defvar idlwave-shell-use-breakpoint-glyph t
"Obsolete variable. See `idlwave-shell-mark-breakpoints'.")
(defcustom idlwave-shell-breakpoint-face 'idlwave-shell-bp
"The face for breakpoint lines in the source code.
Allows you to choose the font, color and other properties for
......
......@@ -456,9 +456,6 @@ value of `!DIR'. See also `idlwave-library-path'."
(defvar idlwave-xml-system-rinfo-converted-file "idl_xml_rinfo.el")
(defvar idlwave-path-file "idlpath.el")
(defvar idlwave-libinfo-file nil
"Obsolete variable, no longer used.")
(defcustom idlwave-special-lib-alist nil
"Alist of regular expressions matching special library directories.
When listing routine source locations, IDLWAVE gives a short hint where
......@@ -555,10 +552,6 @@ completions."
:group 'idlwave-completion
:type 'boolean)
(defvar idlwave-default-completion-case-is-down nil
"Obsolete variable. See `idlwave-complete-empty-string-as-lower-case' and
`idlwave-completion-case'.")
(defcustom idlwave-buffer-case-takes-precedence nil
"Non-nil means, the case of tokens in buffers dominates over system stuff.
To make this possible, we need to re-case everything each time we update
......@@ -4525,8 +4518,6 @@ information updated immediately, leave NO-CONCATENATE nil."
nil 'idlwave-load-rinfo-next-step)))
(error nil))))
(defvar idlwave-library-routines nil "Obsolete variable.")
;;------ XML Help routine info system
(defun idlwave-load-system-routine-info ()
;; Load the system routine info from the cached routine info file,
......
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