diff options
author | Chong Yidong <cyd@gnu.org> | 2012-05-04 13:14:14 +0800 |
---|---|---|
committer | Chong Yidong <cyd@gnu.org> | 2012-05-04 13:14:14 +0800 |
commit | 78f3273aab4817ead42af0db41e703dc7e90260b (patch) | |
tree | 71c70a9d0bd5d796e5be009d3cc562ea7a0863b4 /lisp | |
parent | ab0fa4e4ba0b2b93a9ef007842523d8d5f9eb758 (diff) | |
download | emacs-78f3273aab4817ead42af0db41e703dc7e90260b.tar.gz |
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.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 28 | ||||
-rw-r--r-- | lisp/dos-w32.el | 17 | ||||
-rw-r--r-- | lisp/emacs-lisp/timer.el | 6 | ||||
-rw-r--r-- | lisp/facemenu.el | 9 | ||||
-rw-r--r-- | lisp/ffap.el | 8 | ||||
-rw-r--r-- | lisp/find-file.el | 16 | ||||
-rw-r--r-- | lisp/follow.el | 7 | ||||
-rw-r--r-- | lisp/forms.el | 6 | ||||
-rw-r--r-- | lisp/ido.el | 11 | ||||
-rw-r--r-- | lisp/iswitchb.el | 9 | ||||
-rw-r--r-- | lisp/mail/feedmail.el | 30 | ||||
-rw-r--r-- | lisp/mail/footnote.el | 10 | ||||
-rw-r--r-- | lisp/mail/mailabbrev.el | 16 | ||||
-rw-r--r-- | lisp/mail/rmail.el | 24 | ||||
-rw-r--r-- | lisp/progmodes/idlw-shell.el | 15 | ||||
-rw-r--r-- | lisp/progmodes/idlwave.el | 9 |
16 files changed, 114 insertions, 107 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b75a6606779..d57d93a7060 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,31 @@ +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. diff --git a/lisp/dos-w32.el b/lisp/dos-w32.el index 071c7b71263..f68af7a73be 100644 --- a/lisp/dos-w32.el +++ b/lisp/dos-w32.el @@ -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. diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el index 87b6cceb24b..11ec0f0614c 100644 --- a/lisp/emacs-lisp/timer.el +++ b/lisp/emacs-lisp/timer.el @@ -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. diff --git a/lisp/facemenu.el b/lisp/facemenu.el index e76b61fdacb..bcef25eb893 100644 --- a/lisp/facemenu.el +++ b/lisp/facemenu.el @@ -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. diff --git a/lisp/ffap.el b/lisp/ffap.el index 7ab6a75406d..905d7873dc2 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -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'.") diff --git a/lisp/find-file.el b/lisp/find-file.el index fe1ab96add9..1deafc9734c 100644 --- a/lisp/find-file.el +++ b/lisp/find-file.el @@ -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 diff --git a/lisp/follow.el b/lisp/follow.el index 4c76b43da2d..0dea1917f85 100644 --- a/lisp/follow.el +++ b/lisp/follow.el @@ -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: diff --git a/lisp/forms.el b/lisp/forms.el index 38670e42bdd..69433de0e14 100644 --- a/lisp/forms.el +++ b/lisp/forms.el @@ -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." diff --git a/lisp/ido.el b/lisp/ido.el index bbf3fe2a1d0..f3deba7ae8b 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -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. diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el index 9600bd1db2d..a31828514bd 100644 --- a/lisp/iswitchb.el +++ b/lisp/iswitchb.el @@ -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. diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el index f35560841e2..df18abbc532 100644 --- a/lisp/mail/feedmail.el +++ b/lisp/mail/feedmail.el @@ -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) diff --git a/lisp/mail/footnote.el b/lisp/mail/footnote.el index c0a63ef197c..f0c6b21513e 100644 --- a/lisp/mail/footnote.el +++ b/lisp/mail/footnote.el @@ -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 diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el index fb8e1502f91..290c57c1c55 100644 --- a/lisp/mail/mailabbrev.el +++ b/lisp/mail/mailabbrev.el @@ -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. diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index df2f8be533a..14bf9d90a16 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -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.") diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index d843de04913..ca51eef6e8e 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el @@ -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 diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index 74f37df9b2d..015f58df3fb 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el @@ -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, |