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

Side by Side Diff: third_party/protobuf/editors/protobuf-mode.el

Issue 2495533002: third_party/protobuf: Update to HEAD (83d681ee2c) (Closed)
Patch Set: Make chrome settings proto generated file a component Created 4 years 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 | « third_party/protobuf/docs/third_party.md ('k') | third_party/protobuf/examples/CMakeLists.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ;;; protobuf-mode.el --- major mode for editing protocol buffers. 1 ;;; protobuf-mode.el --- major mode for editing protocol buffers.
2 2
3 ;; Author: Alexandre Vassalotti <alexandre@peadrop.com> 3 ;; Author: Alexandre Vassalotti <alexandre@peadrop.com>
4 ;; Created: 23-Apr-2009 4 ;; Created: 23-Apr-2009
5 ;; Version: 0.3 5 ;; Version: 0.3
6 ;; Keywords: google protobuf languages 6 ;; Keywords: google protobuf languages
7 7
8 ;; Redistribution and use in source and binary forms, with or without 8 ;; Redistribution and use in source and binary forms, with or without
9 ;; modification, are permitted provided that the following conditions are 9 ;; modification, are permitted provided that the following conditions are
10 ;; met: 10 ;; met:
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 ;; - Make highlighting for enum values work properly. 57 ;; - Make highlighting for enum values work properly.
58 ;; - Fix the parser to recognize extensions as identifiers and not 58 ;; - Fix the parser to recognize extensions as identifiers and not
59 ;; as casts. 59 ;; as casts.
60 ;; - Improve the parsing of option assignment lists. For example: 60 ;; - Improve the parsing of option assignment lists. For example:
61 ;; optional int32 foo = 1 [(my_field_option) = 4.5]; 61 ;; optional int32 foo = 1 [(my_field_option) = 4.5];
62 ;; - Add support for fully-qualified identifiers (e.g., with a leading "."). 62 ;; - Add support for fully-qualified identifiers (e.g., with a leading ".").
63 63
64 ;;; Code: 64 ;;; Code:
65 65
66 (require 'cc-mode) 66 (require 'cc-mode)
67 (require 'cl)
67 68
68 (eval-when-compile 69 (eval-when-compile
69 (require 'cc-langs) 70 (require 'cc-langs)
70 (require 'cc-fonts)) 71 (require 'cc-fonts))
71 72
72 ;; This mode does not inherit properties from other modes. So, we do not use 73 ;; This mode does not inherit properties from other modes. So, we do not use
73 ;; the usual `c-add-language' function. 74 ;; the usual `c-add-language' function.
74 (eval-and-compile 75 (eval-and-compile
75 (put 'protobuf-mode 'c-mode-prefix "protobuf-")) 76 (put 'protobuf-mode 'c-mode-prefix "protobuf-"))
76 77
77 ;; The following code uses of the `c-lang-defconst' macro define syntactic 78 ;; The following code uses of the `c-lang-defconst' macro define syntactic
78 ;; features of protocol buffer language. Refer to the documentation in the 79 ;; features of protocol buffer language. Refer to the documentation in the
79 ;; cc-langs.el file for information about the meaning of the -kwds variables. 80 ;; cc-langs.el file for information about the meaning of the -kwds variables.
80 81
81 (c-lang-defconst c-primitive-type-kwds 82 (c-lang-defconst c-primitive-type-kwds
82 protobuf '("double" "float" "int32" "int64" "uint32" "uint64" "sint32" 83 protobuf '("double" "float" "int32" "int64" "uint32" "uint64" "sint32"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 (c-make-emacs-variables-local)) 212 (c-make-emacs-variables-local))
212 (c-init-language-vars protobuf-mode) 213 (c-init-language-vars protobuf-mode)
213 (c-common-init 'protobuf-mode) 214 (c-common-init 'protobuf-mode)
214 (easy-menu-add protobuf-menu) 215 (easy-menu-add protobuf-menu)
215 (c-run-mode-hooks 'c-mode-common-hook 'protobuf-mode-hook) 216 (c-run-mode-hooks 'c-mode-common-hook 'protobuf-mode-hook)
216 (c-update-modeline)) 217 (c-update-modeline))
217 218
218 (provide 'protobuf-mode) 219 (provide 'protobuf-mode)
219 220
220 ;;; protobuf-mode.el ends here 221 ;;; protobuf-mode.el ends here
OLDNEW
« no previous file with comments | « third_party/protobuf/docs/third_party.md ('k') | third_party/protobuf/examples/CMakeLists.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698