diff options
| author | John Wiegley | 2016-03-03 23:52:26 -0800 |
|---|---|---|
| committer | John Wiegley | 2016-03-03 23:52:26 -0800 |
| commit | 2f3f7fcb576c333efd3c299b29fbbe05bd317d90 (patch) | |
| tree | 477edea3845f30b4dd5b7ef308ce3a414d8c0f00 /lisp/progmodes | |
| parent | 887f6126c5ce9084f93083765ac026ca6b28175c (diff) | |
| parent | 6620944f8325101d6a0e01690aea7901a66f0461 (diff) | |
| download | emacs-2f3f7fcb576c333efd3c299b29fbbe05bd317d90.tar.gz emacs-2f3f7fcb576c333efd3c299b29fbbe05bd317d90.zip | |
Merge from origin/emacs-25
6620944 (cl-union): Do not ignore :test argument when lists are equal.
17dd3fb Add `isearch' to `basic-faces'
c1ec743 Make $, : and @ "prefix characters" in ruby-mode
e72a26e Make find-tag-default-bounds more strict
1bc0e0a Minor fixes in filenotify.el
Diffstat (limited to 'lisp/progmodes')
| -rw-r--r-- | lisp/progmodes/ruby-mode.el | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index e3fe315f3bd..fb942b34ddc 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el | |||
| @@ -32,7 +32,7 @@ | |||
| 32 | ;; file after putting it on your load path: | 32 | ;; file after putting it on your load path: |
| 33 | ;; | 33 | ;; |
| 34 | ;; (autoload 'ruby-mode "ruby-mode" "Major mode for ruby files" t) | 34 | ;; (autoload 'ruby-mode "ruby-mode" "Major mode for ruby files" t) |
| 35 | ;; (add-to-list 'auto-mode-alist '("\\.rb$" . ruby-mode)) | 35 | ;; (add-to-list 'auto-mode-alist '("\\.rb\\'" . ruby-mode)) |
| 36 | ;; (add-to-list 'interpreter-mode-alist '("ruby" . ruby-mode)) | 36 | ;; (add-to-list 'interpreter-mode-alist '("ruby" . ruby-mode)) |
| 37 | ;; | 37 | ;; |
| 38 | ;; Still needs more docstrings; search below for TODO. | 38 | ;; Still needs more docstrings; search below for TODO. |
| @@ -188,9 +188,10 @@ This should only be called after matching against `ruby-here-doc-beg-re'." | |||
| 188 | (modify-syntax-entry ?# "<" table) | 188 | (modify-syntax-entry ?# "<" table) |
| 189 | (modify-syntax-entry ?\n ">" table) | 189 | (modify-syntax-entry ?\n ">" table) |
| 190 | (modify-syntax-entry ?\\ "\\" table) | 190 | (modify-syntax-entry ?\\ "\\" table) |
| 191 | (modify-syntax-entry ?$ "." table) | 191 | (modify-syntax-entry ?$ "'" table) |
| 192 | (modify-syntax-entry ?_ "_" table) | 192 | (modify-syntax-entry ?_ "_" table) |
| 193 | (modify-syntax-entry ?: "_" table) | 193 | (modify-syntax-entry ?: "'" table) |
| 194 | (modify-syntax-entry ?@ "'" table) | ||
| 194 | (modify-syntax-entry ?< "." table) | 195 | (modify-syntax-entry ?< "." table) |
| 195 | (modify-syntax-entry ?> "." table) | 196 | (modify-syntax-entry ?> "." table) |
| 196 | (modify-syntax-entry ?& "." table) | 197 | (modify-syntax-entry ?& "." table) |
| @@ -1858,6 +1859,10 @@ It will be properly highlighted even when the call omits parens.") | |||
| 1858 | (string-to-syntax "_")))) | 1859 | (string-to-syntax "_")))) |
| 1859 | ;; Backtick method redefinition. | 1860 | ;; Backtick method redefinition. |
| 1860 | ("^[ \t]*def +\\(`\\)" (1 "_")) | 1861 | ("^[ \t]*def +\\(`\\)" (1 "_")) |
| 1862 | ;; Ternary operator colon followed by opening paren or bracket | ||
| 1863 | ;; (semi-important for indentation). | ||
| 1864 | ("\\(:\\)\\(?:[\({]\\|\\[[^]]\\)" | ||
| 1865 | (1 (string-to-syntax "."))) | ||
| 1861 | ;; Regular expressions. Start with matching unescaped slash. | 1866 | ;; Regular expressions. Start with matching unescaped slash. |
| 1862 | ("\\(?:\\=\\|[^\\]\\)\\(?:\\\\\\\\\\)*\\(/\\)" | 1867 | ("\\(?:\\=\\|[^\\]\\)\\(?:\\\\\\\\\\)*\\(/\\)" |
| 1863 | (1 (let ((state (save-excursion (syntax-ppss (match-beginning 1))))) | 1868 | (1 (let ((state (save-excursion (syntax-ppss (match-beginning 1))))) |
| @@ -2023,7 +2028,7 @@ It will be properly highlighted even when the call omits parens.") | |||
| 2023 | "The syntax table to use for fontifying Ruby mode buffers. | 2028 | "The syntax table to use for fontifying Ruby mode buffers. |
| 2024 | See `font-lock-syntax-table'.") | 2029 | See `font-lock-syntax-table'.") |
| 2025 | 2030 | ||
| 2026 | (defconst ruby-font-lock-keyword-beg-re "\\(?:^\\|[^.@$]\\|\\.\\.\\)") | 2031 | (defconst ruby-font-lock-keyword-beg-re "\\(?:^\\|[^.@$:]\\|\\.\\.\\)") |
| 2027 | 2032 | ||
| 2028 | (defconst ruby-font-lock-keywords | 2033 | (defconst ruby-font-lock-keywords |
| 2029 | `(;; Functions. | 2034 | `(;; Functions. |
| @@ -2196,7 +2201,7 @@ See `font-lock-syntax-table'.") | |||
| 2196 | ("\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+" | 2201 | ("\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+" |
| 2197 | 0 font-lock-variable-name-face) | 2202 | 0 font-lock-variable-name-face) |
| 2198 | ;; Constants. | 2203 | ;; Constants. |
| 2199 | ("\\(?:\\_<\\|::\\)\\([A-Z]+\\(\\w\\|_\\)*\\)" | 2204 | ("\\_<\\([A-Z]+\\(\\w\\|_\\)*\\)" |
| 2200 | 1 (unless (eq ?\( (char-after)) font-lock-type-face)) | 2205 | 1 (unless (eq ?\( (char-after)) font-lock-type-face)) |
| 2201 | ;; Ruby 1.9-style symbol hash keys. | 2206 | ;; Ruby 1.9-style symbol hash keys. |
| 2202 | ("\\(?:^\\s *\\|[[{(,]\\s *\\|\\sw\\s +\\)\\(\\(\\sw\\|_\\)+:\\)[^:]" | 2207 | ("\\(?:^\\s *\\|[[{(,]\\s *\\|\\sw\\s +\\)\\(\\(\\sw\\|_\\)+:\\)[^:]" |