You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by ca...@apache.org on 2014/03/12 21:54:55 UTC
git commit: THRIFT-2399 Recognize '//'-style comments in emacs
Repository: thrift
Updated Branches:
refs/heads/master 52744eed7 -> 98bebac15
THRIFT-2399 Recognize '//'-style comments in emacs
PATCH: David Hull
Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/98bebac1
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/98bebac1
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/98bebac1
Branch: refs/heads/master
Commit: 98bebac1520bcf1dd5392535e06a751d7b2af58e
Parents: 52744ee
Author: Carl Yeksigian <ca...@apache.org>
Authored: Wed Mar 12 16:48:01 2014 -0400
Committer: Carl Yeksigian <ca...@apache.org>
Committed: Wed Mar 12 16:48:01 2014 -0400
----------------------------------------------------------------------
contrib/thrift.el | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/thrift/blob/98bebac1/contrib/thrift.el
----------------------------------------------------------------------
diff --git a/contrib/thrift.el b/contrib/thrift.el
index 2dc49b0..941a99f 100644
--- a/contrib/thrift.el
+++ b/contrib/thrift.el
@@ -38,7 +38,6 @@
;; syntax coloring
(defconst thrift-font-lock-keywords
(list
- '("#.*$" . font-lock-comment-face) ;; perl style comments
'("\\<\\(include\\|struct\\|exception\\|typedef\\|const\\|enum\\|service\\|extends\\|void\\|oneway\\|throws\\|optional\\|required\\)\\>" . font-lock-keyword-face) ;; keywords
'("\\<\\(bool\\|byte\\|i16\\|i32\\|i64\\|double\\|string\\|binary\\|map\\|list\\|set\\)\\>" . font-lock-type-face) ;; built-in types
'("\\<\\([0-9]+\\)\\>" . font-lock-variable-name-face) ;; ordinals
@@ -112,13 +111,14 @@
(indent-line-to cur-indent)
(indent-line-to 0)))))
-;; C/C++ comments; also allowing underscore in words
+;; C/C++- and sh-style comments; also allowing underscore in words
(defvar thrift-mode-syntax-table
(let ((thrift-mode-syntax-table (make-syntax-table)))
(modify-syntax-entry ?_ "w" thrift-mode-syntax-table)
- (modify-syntax-entry ?/ ". 1456" thrift-mode-syntax-table)
- (modify-syntax-entry ?* ". 23" thrift-mode-syntax-table)
- (modify-syntax-entry ?\n "> b" thrift-mode-syntax-table)
+ (modify-syntax-entry ?# "<" thrift-mode-syntax-table) ; sh-style comments
+ (modify-syntax-entry ?/ ". 124" thrift-mode-syntax-table) ; c/c++-style comments
+ (modify-syntax-entry ?* ". 23b" thrift-mode-syntax-table)
+ (modify-syntax-entry ?\n ">" thrift-mode-syntax-table)
thrift-mode-syntax-table)
"Syntax table for thrift-mode")