+2013-12-06 Dmitry Gutov <dgutov@yandex.ru>
+
+ * 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 <juri@jurta.org>
* isearch.el (isearch--saved-overriding-local-map):
(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)
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)
;; 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)))))
(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 ()