mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
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.
This commit is contained in:
commit
5acb97ae76
@ -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 ()
|
||||
|
Loading…
Reference in New Issue
Block a user