summaryrefslogtreecommitdiff
path: root/lisp/progmodes/cc-vars.el
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2011-10-28 14:34:39 +0000
committerAlan Mackenzie <acm@muc.de>2011-10-28 14:34:39 +0000
commit020716e178cdae443a3630c4307023cb3fc4c350 (patch)
tree47ed6164c0d4a262cce8d41cef7d88592fe69fa4 /lisp/progmodes/cc-vars.el
parent86c606818495d9411fd5d6b1477f9a097eb18020 (diff)
downloademacs-020716e178cdae443a3630c4307023cb3fc4c350.tar.gz
DTRT for c-beginning/end-of-defun in nested declaration scopes.
Diffstat (limited to 'lisp/progmodes/cc-vars.el')
-rw-r--r--lisp/progmodes/cc-vars.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el
index 58dc1737c5a..769bf63f63c 100644
--- a/lisp/progmodes/cc-vars.el
+++ b/lisp/progmodes/cc-vars.el
@@ -340,6 +340,20 @@ better with the \"do { ... } while \(0)\" trick)."
:group 'c)
(put 'c-syntactic-indentation-in-macros 'safe-local-variable 'booleanp)
+(defcustom c-defun-tactic 'go-outward
+ "*Whether functions are recognized inside, e.g., a class.
+This is used by `c-beginning-of-defun' and like functions.
+
+Its value is one of:
+ t -- Functions are recognized only at the top level.
+ go-outward -- Nested functions are also recognized. Should a function
+ command hit the beginning/end of a nested scope, it will
+ carry on at the less nested level."
+ :type '(radio
+ (const :tag "Functions are at the top-level" t)
+ (const :tag "Functions are also recognized inside declaration scopes" go-outward))
+ :group 'c)
+
(defcustom-c-stylevar c-comment-only-line-offset 0
"*Extra offset for line which contains only the start of a comment.
Can contain an integer or a cons cell of the form: