]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/cc-vars.el
Merge from emacs-24; up to 2012-11-03T05:11:34Z!dmantipov@yandex.ru
[gnu-emacs] / lisp / progmodes / cc-vars.el
index 055d5f4c57c3d15a6b256cad9a165fd4165259ed..d56c1124a9c67640440881bc17d36fa36f55a593 100644 (file)
@@ -1,6 +1,6 @@
 ;;; cc-vars.el --- user customization variables for CC Mode
 
-;; Copyright (C) 1985, 1987, 1992-2011  Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1987, 1992-2012  Free Software Foundation, Inc.
 
 ;; Authors:    2002- Alan Mackenzie
 ;;             1998- Martin Stjernholm
   (require 'custom)
   (require 'widget))
 
-(cc-eval-when-compile
-  ;; Need the function form of `backquote', which isn't standardized
-  ;; between Emacsen.  It's called `bq-process' in XEmacs, and
-  ;; `backquote-process' in Emacs.  `backquote-process' returns a
-  ;; slightly more convoluted form, so let `bq-process' be the norm.
-  (if (fboundp 'backquote-process)
-      (cc-bytecomp-defmacro bq-process (form)
-       `(cdr (backquote-process ,form)))))
-
-\f
 ;;; Helpers
 
 ;; This widget exists in newer versions of the Custom library
@@ -340,6 +330,21 @@ 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."
+  :version "24.1"
+  :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:
@@ -406,7 +411,7 @@ If a LINE-TYPE is missing, then \\[indent-for-comment] indents the comment
 according to `comment-column'.
 
 Note that a non-nil value on `c-indent-comments-syntactically-p'
-overrides this variable, so empty lines are indentented syntactically
+overrides this variable, so empty lines are indented syntactically
 in that case, i.e. as if \\[c-indent-command] was used instead."
   :type
   (let ((space '(cons :tag "space"
@@ -572,7 +577,7 @@ in a mode hook, you have to call `c-setup-doc-comment-style'
 afterwards to redo that work."
   ;; Symbols other than those documented above may be used on this
   ;; variable.  If a variable exists that has that name with
-  ;; "-font-lock-keywords" appended, it's value is prepended to the
+  ;; "-font-lock-keywords" appended, its value is prepended to the
   ;; font lock keywords list.  If it's a function then it's called and
   ;; the result is prepended.
   :type '(radio
@@ -949,7 +954,7 @@ this is `c-lineup-ObjC-method-call', which would align it like:
        [foo blahBlahBlah: fred
             thisIsTooDamnLong: barney
 
-This behaviour can be overridden by customizing the indentation of
+This behavior can be overridden by customizing the indentation of
 `objc-method-call-cont' in the \"objc\" style."
   :type 'integer
   :group 'c)
@@ -1313,7 +1318,7 @@ Here is the current list of valid syntactic element symbols:
  statement-case-open    -- The first line in a case block starting with brace.
  substatement           -- The first line after an if/while/for/do/else.
  substatement-open      -- The brace that opens a substatement block.
- substatement-label     -- Labelled line after an if/while/for/do/else.
+ substatement-label     -- Labeled line after an if/while/for/do/else.
  case-label             -- A \"case\" or \"default\" label.
  access-label           -- C++ private/protected/public access label.
  label                  -- Any ordinary label.
@@ -1611,7 +1616,7 @@ names)."))
 (defvar c-macro-with-semi-re nil
   ;; Regular expression which matches a (#define'd) symbol whose expansion
   ;; ends with a semicolon.
-  ;; 
+  ;;
   ;; This variable should be set by `c-make-macros-with-semi-re' rather than
   ;; directly.
 )
@@ -1637,7 +1642,7 @@ names)."))
          (t (error "c-make-macro-with-semi-re: invalid \
 c-macro-names-with-semicolon: %s"
                    c-macro-names-with-semicolon))))))
-    
+
 (defvar c-macro-names-with-semicolon
   '("Q_OBJECT" "Q_PROPERTY" "Q_DECLARE" "Q_ENUMS")
   "List of #defined symbols whose expansion ends with a semicolon.