[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 r116870: * lisp/progmodes/ruby-mode.el (ruby-font
From: |
Dmitry Gutov |
Subject: |
[Emacs-diffs] emacs-24 r116870: * lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight |
Date: |
Thu, 27 Mar 2014 08:23:38 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116870
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/17057
committer: Dmitry Gutov <address@hidden>
branch nick: emacs-24
timestamp: Thu 2014-03-27 10:21:15 +0200
message:
* lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight
special globals with font-lock-builtin-face.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/progmodes/ruby-mode.el
rubymode.el-20091113204419-o5vbwnq5f7feedwu-8804
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-03-27 06:53:13 +0000
+++ b/lisp/ChangeLog 2014-03-27 08:21:15 +0000
@@ -1,5 +1,8 @@
2014-03-27 Dmitry Gutov <address@hidden>
+ * progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight
+ special globals with font-lock-builtin-face. (Bug#17057)
+
* progmodes/ruby-mode.el (ruby-syntax-propertize-function):
Don't propertize `?' or `!' as symbol constituent when after
colon. (Bug#17097)
=== modified file 'lisp/progmodes/ruby-mode.el'
--- a/lisp/progmodes/ruby-mode.el 2014-03-27 06:53:13 +0000
+++ b/lisp/progmodes/ruby-mode.el 2014-03-27 08:21:15 +0000
@@ -2109,13 +2109,28 @@
1 font-lock-variable-name-face)
;; Keywords that evaluate to certain values.
("\\_<__\\(?:LINE\\|ENCODING\\|FILE\\)__\\_>"
- (0 font-lock-variable-name-face))
+ (0 font-lock-builtin-face))
;; Symbols.
("\\(^\\|[^:]\\)\\(:\\(address@hidden|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\|@?\\(\\w\\|_\\)+\\([!?=]\\|\\b_*\\)\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)"
2 font-lock-constant-face)
- ;; Variables.
- ("\\$[^a-zA-Z \n]"
- 0 font-lock-variable-name-face)
+ ;; Special globals.
+ (,(concat "\\$\\(?:[:\"!@;,/\\._><\\$?~=*&`'+0-9]\\|-[0adFiIlpvw]\\|"
+ (regexp-opt '("LOAD_PATH" "LOADED_FEATURES" "PROGRAM_NAME"
+ "ERROR_INFO" "ERROR_POSITION"
+ "FS" "FIELD_SEPARATOR"
+ "OFS" "OUTPUT_FIELD_SEPARATOR"
+ "RS" "INPUT_RECORD_SEPARATOR"
+ "ORS" "OUTPUT_RECORD_SEPARATOR"
+ "NR" "INPUT_LINE_NUMBER"
+ "LAST_READ_LINE" "DEFAULT_OUTPUT" "DEFAULT_INPUT"
+ "PID" "PROCESS_ID" "CHILD_STATUS"
+ "LAST_MATCH_INFO" "IGNORECASE"
+ "ARGV" "MATCH" "PREMATCH" "POSTMATCH"
+ "LAST_PAREN_MATCH" "stdin" "stdout" "stderr"
+ "DEBUG" "FILENAME" "VERBOSE" "SAFE" "CLASSPATH"
+ "JRUBY_VERSION" "JRUBY_REVISION" "ENV_JAVA"))
+ "\\_>\\)")
+ 0 font-lock-builtin-face)
("\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+"
0 font-lock-variable-name-face)
;; Constants.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 r116870: * lisp/progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight,
Dmitry Gutov <=