1 new commit in cc-mode:
https://bitbucket.org/xemacs/cc-mode/commits/f3461758abf6/
changeset: f3461758abf6
user: acm
date: 2013-03-06 13:01:31
summary: Correct the position of point in some line-up functions.
cc-align.el (c-lineup-whitesmith-in-block, c-lineup-assignments)
(c-lineup-gcc-asm-reg ): take position of point at column 0 rather than
at a random place in the line.
cc-mode.texi (Custom Line-Up): State explicitly that point starts at a
random position in the line being indented.
affected #: 2 files
diff -r 3a2a90216ffe53e1b80d556503b5cd053a42ba71 -r
f3461758abf62bd22f7ff3cda68350b83b0b0adb cc-align.el
--- a/cc-align.el
+++ b/cc-align.el
@@ -739,7 +739,7 @@
(setq startpos (c-langelem-pos langelem)))))
(setq startpos (c-langelem-pos langelem)
- endpos (point))
+ endpos (c-point 'bol))
;; Find a syntactically relevant and unnested "=" token on the
;; current line. equalp is in that case set to the number of
@@ -1041,6 +1041,7 @@
arglist-intro, arglist-cont-nonempty, arglist-close, and all in*
symbols, e.g. inclass and inextern-lang."
(save-excursion
+ (beginning-of-line)
(if (and (c-go-up-list-backward)
(= (point) (c-point 'boi)))
nil
@@ -1193,6 +1194,7 @@
(let ((orig-pos (point))
alignto)
(save-excursion
+ (beginning-of-line)
(and
c-opt-asm-stmt-key
diff -r 3a2a90216ffe53e1b80d556503b5cd053a42ba71 -r
f3461758abf62bd22f7ff3cda68350b83b0b0adb cc-mode.texi
--- a/cc-mode.texi
+++ b/cc-mode.texi
@@ -6465,13 +6465,14 @@
please contact @email{bug-cc-mode@(a)gnu.org}.
Line-up functions are passed a single argument, the syntactic
-element (see below). The return value is a @code{c-offsets-alist}
-offset specification: for example, an integer, a symbol such as
-@code{+}, a vector, @code{nil}@footnote{Returning @code{nil} is useful
-when the offset specification for a syntactic element is a list
-containing the line-up function (@pxref{c-offsets-alist}).}, or even
-another line-up function. Full details of these are in
-@ref{c-offsets-alist}.
+element (see below). At the time of the call, point will be somewhere
+on the line being indented. The return value is a
+@code{c-offsets-alist} offset specification: for example, an integer,
+a symbol such as @code{+}, a vector, @code{nil}@footnote{Returning
+@code{nil} is useful when the offset specification for a syntactic
+element is a list containing the line-up function
+((a)pxref{c-offsets-alist}).}, or even another line-up function. Full
+details of these are in @ref{c-offsets-alist}.
Line-up functions must not move point or change the content of the
buffer (except temporarily). They are however allowed to do
Repository URL:
https://bitbucket.org/xemacs/cc-mode/
--
This is a commit notification from
bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches