Skip to content

Commit 77c56f7

Browse files
committed
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).
1 parent 0c691df commit 77c56f7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/etc/emacs/rust-mode.el

+5-5
Original file line numberDiff line numberDiff line change
@@ -380,11 +380,11 @@ idomenu (imenu with `ido-mode') for best mileage.")
380380
;;; Defun Motions
381381

382382
;;; Start of a Rust item
383-
(setq rust-top-item-beg-re
384-
(concat "^\\s-*\\(?:priv\\|pub\\)?\\s-*"
385-
(regexp-opt
386-
'("enum" "struct" "type" "mod" "use" "fn" "static" "impl"
387-
"extern" "impl" "static" "trait"))))
383+
(defvar rust-top-item-beg-re
384+
(concat "^\\s-*\\(?:priv\\|pub\\)?\\s-*"
385+
(regexp-opt
386+
'("enum" "struct" "type" "mod" "use" "fn" "static" "impl"
387+
"extern" "impl" "static" "trait"))))
388388

389389
(defun rust-beginning-of-defun (&optional arg)
390390
"Move backward to the beginning of the current defun.

0 commit comments

Comments
 (0)