summaryrefslogtreecommitdiff
path: root/lisp/speedbar.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2011-02-16 21:13:17 -0800
committerGlenn Morris <rgm@gnu.org>2011-02-16 21:13:17 -0800
commit53ef76c7d3cd9932d8d3be981aef3a136cc8849d (patch)
tree352f343ec9f2357fbbec8966aaf0da2ad5f77a81 /lisp/speedbar.el
parentd638ac9ecc2f2fcf7c000ef0aa237826f1a1cda1 (diff)
downloademacs-53ef76c7d3cd9932d8d3be981aef3a136cc8849d.tar.gz
Convert some defvars to defcustoms.
* lisp/speedbar.el (speedbar-ignored-modes, speedbar-file-unshown-regexp) (speedbar-update-flag, speedbar-fetch-etags-command) (speedbar-fetch-etags-arguments): * lisp/term.el (term-buffer-maximum-size, term-input-chunk-size) (term-completion-autolist, term-completion-addsuffix) (term-completion-recexact, term-completion-fignore): * lisp/term/sup-mouse.el (sup-mouse-fast-select-window): * lisp/term/x-win.el (x-select-request-type): Convert some defvars with "*" to defcustoms.
Diffstat (limited to 'lisp/speedbar.el')
-rw-r--r--lisp/speedbar.el51
1 files changed, 31 insertions, 20 deletions
diff --git a/lisp/speedbar.el b/lisp/speedbar.el
index b84afd797d1..dad2a4c82ac 100644
--- a/lisp/speedbar.el
+++ b/lisp/speedbar.el
@@ -614,8 +614,11 @@ state data."
:group 'speedbar
:type 'hook)
-(defvar speedbar-ignored-modes '(fundamental-mode)
- "*List of major modes which speedbar will not switch directories for.")
+(defcustom speedbar-ignored-modes '(fundamental-mode)
+ "List of major modes which speedbar will not switch directories for."
+ :group 'speedbar
+ :type '(choice (const nil)
+ (repeat :tag "List of modes" (symbol :tag "Major mode"))))
(defun speedbar-extension-list-to-regex (extlist)
"Takes EXTLIST, a list of extensions and transforms it into regexp.
@@ -669,7 +672,7 @@ directories here; see `vc-directory-exclusion-list'."
:group 'speedbar
:type 'string)
-(defvar speedbar-file-unshown-regexp
+(defcustom speedbar-file-unshown-regexp
(let ((nstr "") (noext completion-ignored-extensions))
(while noext
(setq nstr (concat nstr (regexp-quote (car noext)) "\\'"
@@ -677,8 +680,10 @@ directories here; see `vc-directory-exclusion-list'."
noext (cdr noext)))
;; backup refdir lockfile
(concat nstr "\\|#[^#]+#$\\|\\.\\.?\\'\\|\\.#"))
- "*Regexp matching files we don't want displayed in a speedbar buffer.
-It is generated from the variable `completion-ignored-extensions'.")
+ "Regexp matching files we don't want displayed in a speedbar buffer.
+It is generated from the variable `completion-ignored-extensions'."
+ :group 'speedbar
+ :type 'string)
(defvar speedbar-file-regexp nil
"Regular expression matching files we know how to expand.
@@ -755,14 +760,17 @@ DIRECTORY-EXPRESSION to `speedbar-ignored-directory-expressions'."
speedbar-ignored-directory-regexp (speedbar-extension-list-to-regex
speedbar-ignored-directory-expressions)))
-(defvar speedbar-update-flag dframe-have-timer-flag
- "*Non-nil means to automatically update the display.
+(defcustom speedbar-update-flag dframe-have-timer-flag
+ "Non-nil means to automatically update the display.
When this is nil then speedbar will not follow the attached frame's directory.
-When speedbar is active, use:
-
-\\<speedbar-key-map> `\\[speedbar-toggle-updates]'
-
-to toggle this value.")
+If you want to change this while speedbar is active, either use
+\\[customize] or call \\<speedbar-key-map> `\\[speedbar-toggle-updates]'."
+ :group 'speedbar
+ :initialize 'custom-initialize-default
+ :set (lambda (sym val)
+ (set sym val)
+ (speedbar-toggle-updates))
+ :type 'boolean)
(defvar speedbar-update-flag-disable nil
"Permanently disable changing of the update flag.")
@@ -3643,17 +3651,20 @@ to be at the beginning of a line in the etags buffer.
This variable is ignored if `speedbar-use-imenu-flag' is non-nil.")
-(defvar speedbar-fetch-etags-command "etags"
- "*Command used to create an etags file.
-
-This variable is ignored if `speedbar-use-imenu-flag' is t.")
+(defcustom speedbar-fetch-etags-command "etags"
+ "Command used to create an etags file.
+This variable is ignored if `speedbar-use-imenu-flag' is t."
+ :group 'speedbar
+ :type 'string)
-(defvar speedbar-fetch-etags-arguments '("-D" "-I" "-o" "-")
- "*List of arguments to use with `speedbar-fetch-etags-command'.
+(defcustom speedbar-fetch-etags-arguments '("-D" "-I" "-o" "-")
+ "List of arguments to use with `speedbar-fetch-etags-command'.
This creates an etags output buffer. Use `speedbar-toggle-etags' to
modify this list conveniently.
-
-This variable is ignored if `speedbar-use-imenu-flag' is t.")
+This variable is ignored if `speedbar-use-imenu-flag' is t."
+ :group 'speedbar
+ :type '(choice (const nil)
+ (repeat :tag "List of arguments" string)))
(defun speedbar-toggle-etags (flag)
"Toggle FLAG in `speedbar-fetch-etags-arguments'.