aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorDmitry Gutov2014-03-27 10:21:15 +0200
committerDmitry Gutov2014-03-27 10:21:15 +0200
commit8de64bb862ed7221a0c558167f7b6c766603d377 (patch)
tree1c52524722e737bcdda05671b44e1606129ef297 /lisp
parent42ebc34ea8f93efe5b23c0124691207f32055666 (diff)
downloademacs-8de64bb862ed7221a0c558167f7b6c766603d377.tar.gz
emacs-8de64bb862ed7221a0c558167f7b6c766603d377.zip
* lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight
special globals with font-lock-builtin-face. Fixes: debbugs:17057
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/progmodes/ruby-mode.el23
2 files changed, 22 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ff76cadf945..970402ef86e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12014-03-27 Dmitry Gutov <dgutov@yandex.ru> 12014-03-27 Dmitry Gutov <dgutov@yandex.ru>
2 2
3 * progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight
4 special globals with font-lock-builtin-face. (Bug#17057)
5
3 * progmodes/ruby-mode.el (ruby-syntax-propertize-function): 6 * progmodes/ruby-mode.el (ruby-syntax-propertize-function):
4 Don't propertize `?' or `!' as symbol constituent when after 7 Don't propertize `?' or `!' as symbol constituent when after
5 colon. (Bug#17097) 8 colon. (Bug#17097)
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index 7219221d4e7..6c6cdd3427d 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -2109,13 +2109,28 @@ See `font-lock-syntax-table'.")
2109 1 font-lock-variable-name-face) 2109 1 font-lock-variable-name-face)
2110 ;; Keywords that evaluate to certain values. 2110 ;; Keywords that evaluate to certain values.
2111 ("\\_<__\\(?:LINE\\|ENCODING\\|FILE\\)__\\_>" 2111 ("\\_<__\\(?:LINE\\|ENCODING\\|FILE\\)__\\_>"
2112 (0 font-lock-variable-name-face)) 2112 (0 font-lock-builtin-face))
2113 ;; Symbols. 2113 ;; Symbols.
2114 ("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\|@?\\(\\w\\|_\\)+\\([!?=]\\|\\b_*\\)\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)" 2114 ("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\|@?\\(\\w\\|_\\)+\\([!?=]\\|\\b_*\\)\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)"
2115 2 font-lock-constant-face) 2115 2 font-lock-constant-face)
2116 ;; Variables. 2116 ;; Special globals.
2117 ("\\$[^a-zA-Z \n]" 2117 (,(concat "\\$\\(?:[:\"!@;,/\\._><\\$?~=*&`'+0-9]\\|-[0adFiIlpvw]\\|"
2118 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)
2119 ("\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+" 2134 ("\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+"
2120 0 font-lock-variable-name-face) 2135 0 font-lock-variable-name-face)
2121 ;; Constants. 2136 ;; Constants.