[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r115392: Fix Bug#15874
From: |
Dmitry Gutov |
Subject: |
[Emacs-diffs] trunk r115392: Fix Bug#15874 |
Date: |
Fri, 06 Dec 2013 04:22:15 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 115392
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/15874
committer: Dmitry Gutov <address@hidden>
branch nick: trunk
timestamp: Fri 2013-12-06 06:22:08 +0200
message:
Fix Bug#15874
* lisp/progmodes/ruby-mode.el (ruby-mode-syntax-table): Don't modify
syntax for `?'.
(ruby-expr-beg): Expect that `!' will have syntax class "symbol"
where appropriate already.
(ruby-syntax-propertize-function): Propertize `?' and `!' at the
end of method names.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/progmodes/ruby-mode.el
rubymode.el-20091113204419-o5vbwnq5f7feedwu-8804
test/automated/ruby-mode-tests.el
rubymodetests.el-20120720101201-mn39s4kfopdxj3ek-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-12-06 00:55:20 +0000
+++ b/lisp/ChangeLog 2013-12-06 04:22:08 +0000
@@ -1,3 +1,12 @@
+2013-12-06 Dmitry Gutov <address@hidden>
+
+ * progmodes/ruby-mode.el (ruby-mode-syntax-table): Don't modify
+ syntax for `?'.
+ (ruby-expr-beg): Expect that `!' will have syntax class "symbol"
+ where appropriate already.
+ (ruby-syntax-propertize-function): Propertize `?' and `!' at the
+ end of method names (Bug#15874).
+
2013-12-06 Juri Linkov <address@hidden>
* isearch.el (isearch--saved-overriding-local-map):
=== modified file 'lisp/progmodes/ruby-mode.el'
--- a/lisp/progmodes/ruby-mode.el 2013-11-22 12:36:38 +0000
+++ b/lisp/progmodes/ruby-mode.el 2013-12-06 04:22:08 +0000
@@ -186,7 +186,6 @@
(modify-syntax-entry ?\n ">" table)
(modify-syntax-entry ?\\ "\\" table)
(modify-syntax-entry ?$ "." table)
- (modify-syntax-entry ?? "_" table)
(modify-syntax-entry ?_ "_" table)
(modify-syntax-entry ?: "_" table)
(modify-syntax-entry ?< "." table)
@@ -783,7 +782,7 @@
ruby-block-mid-keywords)
'words))
(goto-char (match-end 0))
- (not (looking-at "\\s_\\|!")))
+ (not (looking-at "\\s_")))
((eq option 'expr-qstr)
(looking-at "[a-zA-Z][a-zA-z0-9_]* +%[^ \t]"))
((eq option 'expr-re)
@@ -1648,6 +1647,14 @@
;; Not within a string.
(nth 3 (syntax-ppss (match-beginning 0))))
(string-to-syntax "\\"))))
+ ;; Part of symbol when at the end of a method name.
+ ("[!?]"
+ (0 (unless (save-excursion
+ (or (nth 8 (syntax-ppss (match-beginning 0)))
+ (let (parse-sexp-lookup-properties)
+ (or (zerop (skip-syntax-backward "w_"))
+ (memq (preceding-char) '(?@ ?$))))))
+ (string-to-syntax "_"))))
;; Regular expressions. Start with matching unescaped slash.
("\\(?:\\=\\|[^\\]\\)\\(?:\\\\\\\\\\)*\\(/\\)"
(1 (let ((state (save-excursion (syntax-ppss (match-beginning 1)))))
=== modified file 'test/automated/ruby-mode-tests.el'
--- a/test/automated/ruby-mode-tests.el 2013-11-22 03:08:31 +0000
+++ b/test/automated/ruby-mode-tests.el 2013-12-06 04:22:08 +0000
@@ -91,8 +91,7 @@
(ert-deftest ruby-no-heredoc-inside-quotes ()
(ruby-assert-state "\"<<\", \"\",\nfoo" 3 nil))
-;; Change result if you fix http://debbugs.gnu.org/15874
-(ert-deftest ruby-exit!-font-lock () :expected-result :failed
+(ert-deftest ruby-exit!-font-lock ()
(ruby-assert-face "exit!" 5 font-lock-builtin-face))
(ert-deftest ruby-deep-indent ()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r115392: Fix Bug#15874,
Dmitry Gutov <=