mirror of
https://github.com/google/styleguide.git
synced 2024-03-22 13:11:43 +08:00
Add autoload magic comments for the functions exposed by google-c-style.
This should make packaged versions of google-c-style (like from MELPA) provide the symbols without doing explicit 'require. Patch by Kimmo Kinnunen <kkinnunen@nvidia.com>.
This commit is contained in:
parent
3ed10fb207
commit
a8999a616f
|
@ -64,6 +64,7 @@ Suitable for inclusion in `c-offsets-alist'."
|
||||||
(goto-char (match-end 0))))
|
(goto-char (match-end 0))))
|
||||||
(vector (+ 4 (current-column)))))
|
(vector (+ 4 (current-column)))))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
(defconst google-c-style
|
(defconst google-c-style
|
||||||
`((c-recognize-knr-p . nil)
|
`((c-recognize-knr-p . nil)
|
||||||
(c-enable-xemacs-performance-kludge-p . t) ; speed up indentation in XEmacs
|
(c-enable-xemacs-performance-kludge-p . t) ; speed up indentation in XEmacs
|
||||||
|
@ -129,6 +130,7 @@ Suitable for inclusion in `c-offsets-alist'."
|
||||||
(innamespace . 0))))
|
(innamespace . 0))))
|
||||||
"Google C/C++ Programming Style.")
|
"Google C/C++ Programming Style.")
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
(defun google-set-c-style ()
|
(defun google-set-c-style ()
|
||||||
"Set the current buffer's c-style to Google C/C++ Programming
|
"Set the current buffer's c-style to Google C/C++ Programming
|
||||||
Style. Meant to be added to `c-mode-common-hook'."
|
Style. Meant to be added to `c-mode-common-hook'."
|
||||||
|
@ -137,6 +139,7 @@ Suitable for inclusion in `c-offsets-alist'."
|
||||||
(setq c-tab-always-indent t)
|
(setq c-tab-always-indent t)
|
||||||
(c-add-style "Google" google-c-style t))
|
(c-add-style "Google" google-c-style t))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
(defun google-make-newline-indent ()
|
(defun google-make-newline-indent ()
|
||||||
"Sets up preferred newline behavior. Not set by default. Meant
|
"Sets up preferred newline behavior. Not set by default. Meant
|
||||||
to be added to `c-mode-common-hook'."
|
to be added to `c-mode-common-hook'."
|
||||||
|
|
Loading…
Reference in New Issue
Block a user