;;; cc-align.el --- custom indentation functions for CC Mode
-;; Copyright (C) 1985, 1987, 1992-2015 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1987, 1992-2016 Free Software Foundation, Inc.
;; Authors: 2004- Alan Mackenzie
;; 1998- Martin Stjernholm
settings, e.g. as follows \(the arglist-close setting is just a
suggestion to get a consistent style):
-\(c-set-offset 'arglist-cont '(c-lineup-arglist-operators 0))
-\(c-set-offset 'arglist-cont-nonempty '(c-lineup-arglist-operators
+\(c-set-offset \\='arglist-cont \\='(c-lineup-arglist-operators 0))
+\(c-set-offset \\='arglist-cont-nonempty \\='(c-lineup-arglist-operators
c-lineup-arglist))
-\(c-set-offset 'arglist-close '(c-lineup-arglist-close-under-paren))
+\(c-set-offset \\='arglist-close \\='(c-lineup-arglist-close-under-paren))
Works with: arglist-cont, arglist-cont-nonempty."
(save-excursion
Works with: inher-cont."
(save-excursion
(goto-char (c-langelem-pos langelem))
- (forward-word 1)
+ (forward-word-strictly 1)
(if (looking-at "[ \t]*$")
c-basic-offset
(c-forward-syntactic-ws)
arglist-cont."
(save-excursion
(goto-char (c-langelem-pos langelem))
- (when (looking-at "\\s\(")
+ (when (looking-at "\\s(")
(if (c-go-up-list-backward)
(let ((pos (point)))
(back-to-indentation)
const char msg[] = if (!running)
\"Some text.\"; error(\"Not running!\");
-#define X(A, B) \ #define X(A, B) \
-do { \ <-> do { \ <- c-lineup-cpp-define
- printf (A, B); \ printf (A, B); \
+#define X(A, B) \\ #define X(A, B) \\
+do { \\ <-> do { \\ <- c-lineup-cpp-define
+ printf (A, B); \\ printf (A, B); \\
} while (0) } while (0)
If `c-syntactic-indentation-in-macros' is non-nil, the function
returns the relative indentation to the macro start line to allow
accumulation with other offsets. E.g. in the following cases,
cpp-define-intro is combined with the statement-block-intro that comes
-from the \"do {\" that hangs on the \"#define\" line:
+from the `do {' that hangs on the `#define' line:
int dribble() {
const char msg[] = if (!running)
\"Some text.\"; error(\"Not running!\");
-#define X(A, B) do { \ #define X(A, B) do { \
- printf (A, B); \ <-> printf (A, B); \ <- c-lineup-cpp-define
- this->refs++; \ this->refs++; \
+#define X(A, B) do { \\ #define X(A, B) do { \\
+ printf (A, B); \\ <-> printf (A, B); \\ <- c-lineup-cpp-define
+ this->refs++; \\ this->refs++; \\
} while (0) <-> } while (0) <- c-lineup-cpp-define
The relative indentation returned by `c-lineup-cpp-define' is zero and
\f
(cc-provide 'cc-align)
-;;; Local Variables:
-;;; indent-tabs-mode: t
-;;; tab-width: 8
-;;; End:
+;; Local Variables:
+;; indent-tabs-mode: t
+;; tab-width: 8
+;; End:
;;; cc-align.el ends here