OLD | NEW |
1 ;;; gn-mode.el - A major mode for editing gn files. | 1 ;;; gn-mode.el - A major mode for editing gn files. |
2 | 2 |
3 ;; Copyright 2015 The Chromium Authors. All rights reserved. | 3 ;; Copyright 2015 The Chromium Authors. All rights reserved. |
4 ;; Use of this source code is governed by a BSD-style license that can be | 4 ;; Use of this source code is governed by a BSD-style license that can be |
5 ;; found in the LICENSE file. | 5 ;; found in the LICENSE file. |
6 | 6 |
7 ;; Author: Elliot Glaysher <erg@chromium.org> | 7 ;; Author: Elliot Glaysher <erg@chromium.org> |
8 ;; Created: April 03, 2015 | 8 ;; Created: April 03, 2015 |
9 ;; Keywords: tools, gn, ninja, chromium | 9 ;; Keywords: tools, gn, ninja, chromium |
10 | 10 |
11 ;; This file is not part of GNU Emacs. | 11 ;; This file is not part of GNU Emacs. |
12 | 12 |
13 ;;; Commentary: | 13 ;;; Commentary: |
14 | 14 |
15 ;; A major mode for editing GN files. GN stands for Generate Ninja. GN is the | 15 ;; A major mode for editing GN files. GN stands for Generate Ninja. GN is the |
16 ;; meta build system used in Chromium. For more information on GN, see the GN | 16 ;; meta build system used in Chromium. For more information on GN, see the GN |
17 ;; manual: <https://code.google.com/p/chromium/wiki/gn> | 17 ;; manual: <https://chromium.googlesource.com/chromium/src/+/master/tools/gn/REA
DME.md> |
18 | 18 |
19 ;;; To Do: | 19 ;;; To Do: |
20 | 20 |
21 ;; - We syntax highlight builtin actions, but don't highlight instantiations of | 21 ;; - We syntax highlight builtin actions, but don't highlight instantiations of |
22 ;; templates. Should we? | 22 ;; templates. Should we? |
23 | 23 |
24 | 24 |
25 | 25 |
26 | 26 |
27 (eval-when-compile (require 'cl)) ;For the `case' macro. | 27 (eval-when-compile (require 'cl)) ;For the `case' macro. |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 | 147 |
148 ;; python style comment: “# …” | 148 ;; python style comment: “# …” |
149 (modify-syntax-entry ?# "< b" gn-mode-syntax-table) | 149 (modify-syntax-entry ?# "< b" gn-mode-syntax-table) |
150 (modify-syntax-entry ?\n "> b" gn-mode-syntax-table) | 150 (modify-syntax-entry ?\n "> b" gn-mode-syntax-table) |
151 (modify-syntax-entry ?_ "w" gn-mode-syntax-table)) | 151 (modify-syntax-entry ?_ "w" gn-mode-syntax-table)) |
152 | 152 |
153 ;;;###autoload | 153 ;;;###autoload |
154 (add-to-list 'auto-mode-alist '("\\.gni?\\'" . gn-mode)) | 154 (add-to-list 'auto-mode-alist '("\\.gni?\\'" . gn-mode)) |
155 | 155 |
156 (provide 'gn-mode) | 156 (provide 'gn-mode) |
OLD | NEW |