Skip to content

Commit edae0bd

Browse files
committed
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).
2 parents 0550b79 + 77c56f7 commit edae0bd

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)