summaryrefslogtreecommitdiff
path: root/lisp/progmodes/cc-align.el
diff options
context:
space:
mode:
authorNickolas Lloyd <ultrageek.lloyd@gmail.com>2017-02-01 22:31:55 -0500
committerNickolas Lloyd <ultrageek.lloyd@gmail.com>2017-02-01 22:31:55 -0500
commit9a15b5509abb49a11c97c1101ad216f4ef258368 (patch)
tree7311337d92833cb8f233eaa696a967a15a306a80 /lisp/progmodes/cc-align.el
parent5d8f2548ceaa5a0b33c08a39f1d6c11071ec63aa (diff)
parent70d36dda26465b43c1a63e8e13153e070af86456 (diff)
downloademacs-nick.lloyd-bytecode-jit.tar.gz
Merge branch 'master' into nick.lloyd-bytecode-jitnick.lloyd-bytecode-jit
Diffstat (limited to 'lisp/progmodes/cc-align.el')
-rw-r--r--lisp/progmodes/cc-align.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/progmodes/cc-align.el b/lisp/progmodes/cc-align.el
index 7cb36c4396b..0f7e4b598dc 100644
--- a/lisp/progmodes/cc-align.el
+++ b/lisp/progmodes/cc-align.el
@@ -1221,6 +1221,18 @@ Works with: arglist-cont, arglist-cont-nonempty."
(vector (progn (goto-char alignto) (current-column)))))))
+(defun c-lineup-under-anchor (langelem)
+ "Line up the current line directly under the anchor position in LANGELEM.
+
+This is like 0, except it supersedes any indentation already calculated for
+previous syntactic elements in the syntactic context.
+
+Works with: Any syntactic symbol which has an anchor position."
+ (save-excursion
+ (goto-char (c-langelem-pos langelem))
+ (vector (current-column))))
+
+
(defun c-lineup-dont-change (langelem)
"Do not change the indentation of the current line.