summaryrefslogtreecommitdiff
path: root/lisp/progmodes/cc-align.el
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2021-03-09 10:03:47 +0100
committerAndrea Corallo <akrl@sdf.org>2021-03-09 10:03:47 +0100
commit43b0df62cd5922df5495b3f4aee5b7beca14384f (patch)
tree3c0bfa9526d08c9c85e646cd355467e3dfb439ac /lisp/progmodes/cc-align.el
parent380ba045c48bfbb160da288b1bd50f82d3f999f0 (diff)
parent9cbdf20316e1cec835a7dfe28877142e437976f4 (diff)
downloademacs-43b0df62cd5922df5495b3f4aee5b7beca14384f.tar.gz
emacs-43b0df62cd5922df5495b3f4aee5b7beca14384f.tar.bz2
emacs-43b0df62cd5922df5495b3f4aee5b7beca14384f.zip
Merge commit '9cbdf20316' into native-comp
Diffstat (limited to 'lisp/progmodes/cc-align.el')
-rw-r--r--lisp/progmodes/cc-align.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/progmodes/cc-align.el b/lisp/progmodes/cc-align.el
index d14ef1744af..51d51deef71 100644
--- a/lisp/progmodes/cc-align.el
+++ b/lisp/progmodes/cc-align.el
@@ -274,8 +274,10 @@ statement-block-intro, statement-case-intro, arglist-intro."
(save-excursion
(beginning-of-line)
(backward-up-list 1)
+ (forward-char)
(skip-chars-forward " \t" (c-point 'eol))
- (vector (1+ (current-column)))))
+ (if (eolp) (skip-chars-backward " \t"))
+ (vector (current-column))))
(defun c-lineup-arglist-close-under-paren (langelem)
"Line up a line under the enclosing open paren.
@@ -1145,7 +1147,8 @@ Works with brace-list-intro."
; the line.
(save-excursion ; "{" earlier on the line
(goto-char (c-langelem-pos
- (assq 'brace-list-intro c-syntactic-context)))
+ (assq 'brace-list-entry
+ c-syntactic-context)))
(and
(eq (c-backward-token-2
1 nil