From 77c56f7cebaedb8e98e8002351f21137b4c61636 Mon Sep 17 00:00:00 2001 From: Phil Ruffwind Date: Sat, 3 May 2014 15:45:55 -0400 Subject: [PATCH] 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). --- src/etc/emacs/rust-mode.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/etc/emacs/rust-mode.el b/src/etc/emacs/rust-mode.el index 580e5f89cd4e0..f9142cd127686 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.