diff options
Diffstat (limited to 'lisp/progmodes/ruby-mode.el')
| -rw-r--r-- | lisp/progmodes/ruby-mode.el | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 2b8f2fa6868..6c6cdd3427d 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el | |||
| @@ -1812,6 +1812,7 @@ It will be properly highlighted even when the call omits parens.") | |||
| 1812 | ("[!?]" | 1812 | ("[!?]" |
| 1813 | (0 (unless (save-excursion | 1813 | (0 (unless (save-excursion |
| 1814 | (or (nth 8 (syntax-ppss (match-beginning 0))) | 1814 | (or (nth 8 (syntax-ppss (match-beginning 0))) |
| 1815 | (eq (char-before) ?:) | ||
| 1815 | (let (parse-sexp-lookup-properties) | 1816 | (let (parse-sexp-lookup-properties) |
| 1816 | (zerop (skip-syntax-backward "w_"))) | 1817 | (zerop (skip-syntax-backward "w_"))) |
| 1817 | (memq (preceding-char) '(?@ ?$)))) | 1818 | (memq (preceding-char) '(?@ ?$)))) |
| @@ -2108,13 +2109,28 @@ See `font-lock-syntax-table'.") | |||
| 2108 | 1 font-lock-variable-name-face) | 2109 | 1 font-lock-variable-name-face) |
| 2109 | ;; Keywords that evaluate to certain values. | 2110 | ;; Keywords that evaluate to certain values. |
| 2110 | ("\\_<__\\(?:LINE\\|ENCODING\\|FILE\\)__\\_>" | 2111 | ("\\_<__\\(?:LINE\\|ENCODING\\|FILE\\)__\\_>" |
| 2111 | (0 font-lock-variable-name-face)) | 2112 | (0 font-lock-builtin-face)) |
| 2112 | ;; Symbols. | 2113 | ;; Symbols. |
| 2113 | ("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\|@?\\(\\w\\|_\\)+\\([!?=]\\|\\b_*\\)\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)" | 2114 | ("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\|@?\\(\\w\\|_\\)+\\([!?=]\\|\\b_*\\)\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)" |
| 2114 | 2 font-lock-constant-face) | 2115 | 2 font-lock-constant-face) |
| 2115 | ;; Variables. | 2116 | ;; Special globals. |
| 2116 | ("\\$[^a-zA-Z \n]" | 2117 | (,(concat "\\$\\(?:[:\"!@;,/\\._><\\$?~=*&`'+0-9]\\|-[0adFiIlpvw]\\|" |
| 2117 | 0 font-lock-variable-name-face) | 2118 | (regexp-opt '("LOAD_PATH" "LOADED_FEATURES" "PROGRAM_NAME" |
| 2119 | "ERROR_INFO" "ERROR_POSITION" | ||
| 2120 | "FS" "FIELD_SEPARATOR" | ||
| 2121 | "OFS" "OUTPUT_FIELD_SEPARATOR" | ||
| 2122 | "RS" "INPUT_RECORD_SEPARATOR" | ||
| 2123 | "ORS" "OUTPUT_RECORD_SEPARATOR" | ||
| 2124 | "NR" "INPUT_LINE_NUMBER" | ||
| 2125 | "LAST_READ_LINE" "DEFAULT_OUTPUT" "DEFAULT_INPUT" | ||
| 2126 | "PID" "PROCESS_ID" "CHILD_STATUS" | ||
| 2127 | "LAST_MATCH_INFO" "IGNORECASE" | ||
| 2128 | "ARGV" "MATCH" "PREMATCH" "POSTMATCH" | ||
| 2129 | "LAST_PAREN_MATCH" "stdin" "stdout" "stderr" | ||
| 2130 | "DEBUG" "FILENAME" "VERBOSE" "SAFE" "CLASSPATH" | ||
| 2131 | "JRUBY_VERSION" "JRUBY_REVISION" "ENV_JAVA")) | ||
| 2132 | "\\_>\\)") | ||
| 2133 | 0 font-lock-builtin-face) | ||
| 2118 | ("\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+" | 2134 | ("\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+" |
| 2119 | 0 font-lock-variable-name-face) | 2135 | 0 font-lock-variable-name-face) |
| 2120 | ;; Constants. | 2136 | ;; Constants. |