summaryrefslogtreecommitdiff
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
commit9d8dff85475952dce6f5395d38ace9c7049f0449 (patch)
treead3400481ccc891572e9174c802c71a33c066e78
parent0e58eb3dbe2bf2507299ae1e134666c17230fd98 (diff)
downloadrust-mode-9d8dff85475952dce6f5395d38ace9c7049f0449.tar.gz
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--rust-mode.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/rust-mode.el b/rust-mode.el
index 580e5f8..f9142cd 100644
--- a/rust-mode.el
+++ b/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.