Updated Branches: refs/heads/master 4fb2706ec -> 38ddc8f75
THRIFT-2142:Minor tweaks to thrift.el for better emacs package compatibility Client: contrib Patch: Andrew Pennebaker Updates thrift.el for better emacs compatibility. Project: http://git-wip-us.apache.org/repos/asf/thrift/repo Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/38ddc8f7 Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/38ddc8f7 Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/38ddc8f7 Branch: refs/heads/master Commit: 38ddc8f757ace6eb543d5a999b70847ad95005a9 Parents: 4fb2706 Author: jfarrell <[email protected]> Authored: Tue Sep 10 12:12:41 2013 -0400 Committer: jfarrell <[email protected]> Committed: Tue Sep 10 12:12:41 2013 -0400 ---------------------------------------------------------------------- contrib/thrift.el | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/thrift/blob/38ddc8f7/contrib/thrift.el ---------------------------------------------------------------------- diff --git a/contrib/thrift.el b/contrib/thrift.el index cd3e0e8..2dc49b0 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 +
