emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/rust-mode 9c94ec4 079/486: auto merge of #13922 : Rufflewi


From: ELPA Syncer
Subject: [nongnu] elpa/rust-mode 9c94ec4 079/486: auto merge of #13922 : Rufflewind/rust/patch-1, r=pnkfelix
Date: Sat, 7 Aug 2021 09:24:52 -0400 (EDT)

branch: elpa/rust-mode
commit 9c94ec4c725409db247a8b7ef999794bb81032f3
Merge: 0617f1c 9d8dff8
Author: bors <bors@rust-lang.org>
Commit: bors <bors@rust-lang.org>

    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).
---
 rust-mode.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/rust-mode.el b/rust-mode.el
index 580e5f8..f9142cd 100644
--- a/rust-mode.el
+++ b/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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]