diff options
author | jfarrell <jfarrell@apache.org> | 2013-09-10 12:12:41 -0400 |
---|---|---|
committer | jfarrell <jfarrell@apache.org> | 2013-09-10 12:12:41 -0400 |
commit | 38ddc8f757ace6eb543d5a999b70847ad95005a9 (patch) | |
tree | 465fba60ec3a7890e9bf307b091b253d9b1d8608 /contrib | |
parent | 4fb2706ecf74f533f71fa4ceab15db984fd13244 (diff) | |
download | thrift-38ddc8f757ace6eb543d5a999b70847ad95005a9.tar.gz |
THRIFT-2142:Minor tweaks to thrift.el for better emacs package compatibility
Client: contrib
Patch: Andrew Pennebaker
Updates thrift.el for better emacs compatibility.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/thrift.el | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/contrib/thrift.el b/contrib/thrift.el index cd3e0e891..2dc49b03c 100644 --- a/contrib/thrift.el +++ b/contrib/thrift.el @@ -1,4 +1,7 @@ -;; +;;; thrift.el --- Major mode for Apache Thrift files + +;; Keywords: files + ;; Licensed to the Apache Software Foundation (ASF) under one ;; or more contributor license agreements. See the NOTICE file ;; distributed with this work for additional information @@ -17,9 +20,16 @@ ;; under the License. ;; +;;; Commentary: + +;; + +;;; Code: + (require 'font-lock) (defvar thrift-mode-hook nil) +;;;###autoload (add-to-list 'auto-mode-alist '("\\.thrift\\'" . thrift-mode)) (defvar thrift-indent-level 2 @@ -34,7 +44,7 @@ '("\\<\\([0-9]+\\)\\>" . font-lock-variable-name-face) ;; ordinals '("\\<\\(\\w+\\)\\s-*(" (1 font-lock-function-name-face)) ;; functions ) - "Thrift Keywords") + "Thrift Keywords.") ;; indentation (defun thrift-indent-line () @@ -112,8 +122,9 @@ thrift-mode-syntax-table) "Syntax table for thrift-mode") +;;;###autoload (defun thrift-mode () - "Mode for editing Thrift files" + "Mode for editing Thrift files." (interactive) (kill-all-local-variables) (set-syntax-table thrift-mode-syntax-table) @@ -123,4 +134,7 @@ (run-hooks 'thrift-mode-hook) (set (make-local-variable 'indent-line-function) 'thrift-indent-line) ) -(provide 'thrift-mode) + +(provide 'thrift) +;;; thrift.el ends here + |