about summary refs log tree commit diff
diff options
context:
space:
mode:
-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.