Source release 18.1.0
This commit is contained in:
19
third_party/protobuf/editors/protobuf-mode.el
vendored
19
third_party/protobuf/editors/protobuf-mode.el
vendored
@@ -193,7 +193,7 @@
|
||||
;;;###autoload (add-to-list 'auto-mode-alist '("\\.proto\\'" . protobuf-mode))
|
||||
|
||||
;;;###autoload
|
||||
(define-derived-mode protobuf-mode prog-mode "Protobuf"
|
||||
(define-derived-mode protobuf-mode prog-mode "Protocol-Buffers"
|
||||
"Major mode for editing Protocol Buffers description language.
|
||||
|
||||
The hook `c-mode-common-hook' is run with no argument at mode
|
||||
@@ -201,26 +201,17 @@ initialization, then `protobuf-mode-hook'.
|
||||
|
||||
Key bindings:
|
||||
\\{protobuf-mode-map}"
|
||||
(interactive)
|
||||
(kill-all-local-variables)
|
||||
(set-syntax-table protobuf-mode-syntax-table)
|
||||
(setq major-mode 'protobuf-mode
|
||||
mode-name "Protocol-Buffers"
|
||||
local-abbrev-table protobuf-mode-abbrev-table
|
||||
abbrev-mode t)
|
||||
(use-local-map protobuf-mode-map)
|
||||
:after-hook (c-update-modeline)
|
||||
(setq abbrev-mode t)
|
||||
(c-initialize-cc-mode t)
|
||||
(if (fboundp 'c-make-emacs-variables-local)
|
||||
(c-make-emacs-variables-local))
|
||||
(c-init-language-vars protobuf-mode)
|
||||
(c-common-init 'protobuf-mode)
|
||||
(easy-menu-add protobuf-menu)
|
||||
(c-run-mode-hooks 'c-mode-common-hook 'protobuf-mode-hook)
|
||||
(c-update-modeline)
|
||||
(setq imenu-generic-expression
|
||||
'(("Message" "^[[:space:]]*message[[:space:]]+\\([[:alnum:]]+\\)" 1)
|
||||
("Enum" "^[[:space:]]*enum[[:space:]]+\\([[:alnum:]]+\\)" 1)
|
||||
("Service" "^[[:space:]]*service[[:space:]]+\\([[:alnum:]]+\\)" 1))))
|
||||
("Service" "^[[:space:]]*service[[:space:]]+\\([[:alnum:]]+\\)" 1)))
|
||||
(c-run-mode-hooks 'c-mode-common-hook))
|
||||
|
||||
(provide 'protobuf-mode)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user