Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Side by Side Diff: tools/emacs/gyp.el

Issue 22815023: gyp.el: use gyp-mode for .gclient files, too. (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ;;; gyp.el - font-lock-mode support for gyp files. 1 ;;; gyp.el - font-lock-mode support for gyp files.
2 2
3 ;; Copyright (c) 2012 Google Inc. All rights reserved. 3 ;; Copyright (c) 2012 Google Inc. 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 ;; Put this somewhere in your load-path and 7 ;; Put this somewhere in your load-path and
8 ;; (require 'gyp) 8 ;; (require 'gyp)
9 9
10 (require 'python) 10 (require 'python)
(...skipping 25 matching lines...) Expand all
36 (defun gyp-set-indentation () 36 (defun gyp-set-indentation ()
37 "Hook function to configure python indentation to suit gyp mode." 37 "Hook function to configure python indentation to suit gyp mode."
38 (setq python-continuation-offset 2 38 (setq python-continuation-offset 2
39 python-indent 2 39 python-indent 2
40 python-guess-indent nil)) 40 python-guess-indent nil))
41 41
42 (add-hook 'gyp-mode-hook 'gyp-set-indentation) 42 (add-hook 'gyp-mode-hook 'gyp-set-indentation)
43 43
44 (add-to-list 'auto-mode-alist '("\\.gyp\\'" . gyp-mode)) 44 (add-to-list 'auto-mode-alist '("\\.gyp\\'" . gyp-mode))
45 (add-to-list 'auto-mode-alist '("\\.gypi\\'" . gyp-mode)) 45 (add-to-list 'auto-mode-alist '("\\.gypi\\'" . gyp-mode))
46 (add-to-list 'auto-mode-alist '("/\\.gclient\\'" . gyp-mode))
46 47
47 ;;; Font-lock support 48 ;;; Font-lock support
48 49
49 (defconst gyp-dependencies-regexp 50 (defconst gyp-dependencies-regexp
50 (regexp-opt (list "dependencies" "export_dependent_settings")) 51 (regexp-opt (list "dependencies" "export_dependent_settings"))
51 "Regular expression to introduce 'dependencies' section") 52 "Regular expression to introduce 'dependencies' section")
52 53
53 (defconst gyp-sources-regexp 54 (defconst gyp-sources-regexp
54 (regexp-opt (list "action" "files" "include_dirs" "includes" "inputs" 55 (regexp-opt (list "action" "files" "include_dirs" "includes" "inputs"
55 "libraries" "outputs" "sources")) 56 "libraries" "outputs" "sources"))
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 (list 2 'font-lock-variable-name-face t t) ; variables, conditions 243 (list 2 'font-lock-variable-name-face t t) ; variables, conditions
243 (list 3 'font-lock-constant-face t t) ; sources 244 (list 3 'font-lock-constant-face t t) ; sources
244 (list 4 'font-lock-preprocessor-face t t)) ; preprocessor 245 (list 4 'font-lock-preprocessor-face t t)) ; preprocessor
245 ;; Variable expansion 246 ;; Variable expansion
246 (list "<@?(\\([^\n )]+\\))" 1 'font-lock-variable-name-face t) 247 (list "<@?(\\([^\n )]+\\))" 1 'font-lock-variable-name-face t)
247 ;; Command expansion 248 ;; Command expansion
248 (list "<!@?(\\([^\n )]+\\))" 1 'font-lock-variable-name-face t) 249 (list "<!@?(\\([^\n )]+\\))" 1 'font-lock-variable-name-face t)
249 ))) 250 )))
250 251
251 (provide 'gyp) 252 (provide 'gyp)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698