auto merge of #13922 : Rufflewind/rust/patch-1, r=pnkfelix

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).
This commit is contained in:
bors 2014-05-12 03:36:53 -07:00
commit edae0bdabf

View File

@ -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.