about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPhil Ruffwind <rf@rufflewind.com>2014-05-03 15:45:55 -0400
committerPhil Ruffwind <rf@rufflewind.com>2014-05-03 15:45:55 -0400
commit77c56f7cebaedb8e98e8002351f21137b4c61636 (patch)
treed2aa7ca0d618e0e74c521683192a00a506f224e7
parent0c691df8acaf10aa3721476e5d7fafcee11b0aaa (diff)
downloadrust-77c56f7cebaedb8e98e8002351f21137b4c61636.tar.gz
rust-77c56f7cebaedb8e98e8002351f21137b4c61636.zip
Use defvar for rust-top-item-beg-re instead
Since rust-top-item-beg-re hasn't been defined yet, using defvar instead of
setq is more appropriate here (and also silences compilation warnings).
-rw-r--r--src/etc/emacs/rust-mode.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/etc/emacs/rust-mode.el b/src/etc/emacs/rust-mode.el
index 580e5f89cd4..f9142cd1276 100644
--- a/src/etc/emacs/rust-mode.el
+++ b/src/etc/emacs/rust-mode.el
@@ -380,11 +380,11 @@ idomenu (imenu with `ido-mode') for best mileage.")
 ;;; Defun Motions
 
 ;;; Start of a Rust item
-(setq rust-top-item-beg-re
-      (concat "^\\s-*\\(?:priv\\|pub\\)?\\s-*"
-              (regexp-opt
-               '("enum" "struct" "type" "mod" "use" "fn" "static" "impl"
-                 "extern" "impl" "static" "trait"))))
+(defvar rust-top-item-beg-re
+  (concat "^\\s-*\\(?:priv\\|pub\\)?\\s-*"
+          (regexp-opt
+           '("enum" "struct" "type" "mod" "use" "fn" "static" "impl"
+             "extern" "impl" "static" "trait"))))
 
 (defun rust-beginning-of-defun (&optional arg)
   "Move backward to the beginning of the current defun.