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

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

[nongnu] elpa/rust-mode 0b9a7e0 092/486: rust-mode.el: Tweak syntax tabl


From: ELPA Syncer
Subject: [nongnu] elpa/rust-mode 0b9a7e0 092/486: rust-mode.el: Tweak syntax table
Date: Sat, 7 Aug 2021 09:24:55 -0400 (EDT)

branch: elpa/rust-mode
commit 0b9a7e0d77cd4fb8338181a767f4ec7eac0206c5
Author: Roy Crihfield <rscrihf@gmail.com>
Commit: Roy Crihfield <rscrihf@gmail.com>

    rust-mode.el: Tweak syntax table
    
    "_" 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.
---
 rust-mode.el | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/rust-mode.el b/rust-mode.el
index df14af4..0d0e4b3 100644
--- a/rust-mode.el
+++ b/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 ()



reply via email to

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