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

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

Issue 2590803003: Revert "third_party/protobuf: Update to HEAD (83d681ee2c)" (Closed)
Patch Set: Created 3 years, 12 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 | « 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)
68 67
69 (eval-when-compile 68 (eval-when-compile
70 (require 'cc-langs) 69 (require 'cc-langs)
71 (require 'cc-fonts)) 70 (require 'cc-fonts))
72 71
73 ;; This mode does not inherit properties from other modes. So, we do not use 72 ;; This mode does not inherit properties from other modes. So, we do not use
74 ;; the usual `c-add-language' function. 73 ;; the usual `c-add-language' function.
75 (eval-and-compile 74 (eval-and-compile
76 (put 'protobuf-mode 'c-mode-prefix "protobuf-")) 75 (put 'protobuf-mode 'c-mode-prefix "protobuf-"))
77 76
78 ;; The following code uses of the `c-lang-defconst' macro define syntactic 77 ;; The following code uses of the `c-lang-defconst' macro define syntactic
79 ;; features of protocol buffer language. Refer to the documentation in the 78 ;; features of protocol buffer language. Refer to the documentation in the
80 ;; cc-langs.el file for information about the meaning of the -kwds variables. 79 ;; cc-langs.el file for information about the meaning of the -kwds variables.
81 80
82 (c-lang-defconst c-primitive-type-kwds 81 (c-lang-defconst c-primitive-type-kwds
83 protobuf '("double" "float" "int32" "int64" "uint32" "uint64" "sint32" 82 protobuf '("double" "float" "int32" "int64" "uint32" "uint64" "sint32"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 (c-make-emacs-variables-local)) 211 (c-make-emacs-variables-local))
213 (c-init-language-vars protobuf-mode) 212 (c-init-language-vars protobuf-mode)
214 (c-common-init 'protobuf-mode) 213 (c-common-init 'protobuf-mode)
215 (easy-menu-add protobuf-menu) 214 (easy-menu-add protobuf-menu)
216 (c-run-mode-hooks 'c-mode-common-hook 'protobuf-mode-hook) 215 (c-run-mode-hooks 'c-mode-common-hook 'protobuf-mode-hook)
217 (c-update-modeline)) 216 (c-update-modeline))
218 217
219 (provide 'protobuf-mode) 218 (provide 'protobuf-mode)
220 219
221 ;;; protobuf-mode.el ends here 220 ;;; 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