summaryrefslogtreecommitdiff
path: root/lisp/progmodes/cc-langs.el
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2011-06-30 20:45:12 +0000
committerAlan Mackenzie <acm@muc.de>2011-06-30 20:45:12 +0000
commitb14c0c5545592e86b968405c794c10bc55f95124 (patch)
treefb2060d7722cea9c1fd829af1d075a6066b20bcc /lisp/progmodes/cc-langs.el
parent1fa280a3def73608707921d7978cb91d23c90cad (diff)
downloademacs-b14c0c5545592e86b968405c794c10bc55f95124.tar.gz
progmodes/cc-guess.el: New file.
progmodes/cc-langs.el (c-mode-menu): Added "Style..." submenu. progmodes/cc-styles.el (cc-choose-style-for-mode): New function derived from `c-basic-common-init'. progmodes/cc-mode.el (top-level): Require cc-guess. (c-basic-common-init): Use `cc-choose-style-for-mode'.
Diffstat (limited to 'lisp/progmodes/cc-langs.el')
-rw-r--r--lisp/progmodes/cc-langs.el13
1 files changed, 13 insertions, 0 deletions
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index 86a963bcf55..a6459e1724f 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -295,6 +295,19 @@ the evaluated constant value at compile time."
["Backslashify" c-backslash-region
(c-fn-region-is-active-p)]))
"----"
+ ("Style..."
+ ["Set Style..." c-set-style t]
+ ["Show Current Style Name" (message
+ "Style Name: %s"
+ c-indentation-style) t]
+ ["Guess Style from this Buffer" c-guess-buffer-no-install t]
+ ["Install the Last Guessed Style..." c-guess-install
+ (and c-guess-guessed-offsets-alist
+ c-guess-guessed-basic-offset) ]
+ ["View the Last Guessed Style" c-guess-view
+ (and c-guess-guessed-offsets-alist
+ c-guess-guessed-basic-offset) ])
+ "----"
("Toggle..."
["Syntactic indentation" c-toggle-syntactic-indentation
:style toggle :selected c-syntactic-indentation]