about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-11-24 23:06:45 +0000
committerbors <bors@rust-lang.org>2014-11-24 23:06:45 +0000
commit5acb97ae76aeaeed9b4d78a613aa448ea815d74e (patch)
tree485917c7da3327ad075b70bb0df0c40d7b5b86d2 /src
parent7222ba965038897168f4f4abe9a464bc36266982 (diff)
parentf3bd844d2aed3465f8e90417b53482ec70a83521 (diff)
downloadrust-5acb97ae76aeaeed9b4d78a613aa448ea815d74e.tar.gz
rust-5acb97ae76aeaeed9b4d78a613aa448ea815d74e.zip
auto merge of #19021 : roysc/rust/emacs-pr, r=brson
"_" should keep the default syntax class (symbol, not word). This
allows, e.g., `forward-word' to behave in the familiar way, jumping to
underscores within a function or variable name.
Diffstat (limited to 'src')
-rw-r--r--src/etc/emacs/rust-mode.el5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/etc/emacs/rust-mode.el b/src/etc/emacs/rust-mode.el
index df14af4c887..0d0e4b35a0b 100644
--- a/src/etc/emacs/rust-mode.el
+++ b/src/etc/emacs/rust-mode.el
@@ -31,9 +31,6 @@
     (modify-syntax-entry ?\" "\"" table)
     (modify-syntax-entry ?\\ "\\" table)
 
-    ;; _ is a word-char
-    (modify-syntax-entry ?_ "w" table)
-
     ;; Comments
     (modify-syntax-entry ?/  ". 124b" table)
     (modify-syntax-entry ?*  ". 23"   table)
@@ -397,7 +394,7 @@ This is written mainly to be used as `beginning-of-defun-function' for Rust.
 Don't move to the beginning of the line. `beginning-of-defun',
 which calls this, does that afterwards."
   (interactive "p")
-  (re-search-backward (concat "^\\(" rust-top-item-beg-re "\\)\\b")
+  (re-search-backward (concat "^\\(" rust-top-item-beg-re "\\)\\_>")
                       nil 'move (or arg 1)))
 
 (defun rust-end-of-defun ()