Skip to content

Commit

Permalink
Use defvar for rust-top-item-beg-re instead
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
Rufflewind committed May 3, 2014
1 parent 0c691df commit 77c56f7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/etc/emacs/rust-mode.el
Expand Up @@ -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.
Expand Down

5 comments on commit 77c56f7

@bors
Copy link
Contributor

@bors bors commented on 77c56f7 May 12, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from pnkfelix
at Rufflewind@77c56f7

@bors
Copy link
Contributor

@bors bors commented on 77c56f7 May 12, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging Rufflewind/rust/patch-1 = 77c56f7 into auto

@bors
Copy link
Contributor

@bors bors commented on 77c56f7 May 12, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rufflewind/rust/patch-1 = 77c56f7 merged ok, testing candidate = edae0bd

@bors
Copy link
Contributor

@bors bors commented on 77c56f7 May 12, 2014

@bors
Copy link
Contributor

@bors bors commented on 77c56f7 May 12, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = edae0bd

Please sign in to comment.