+2013-03-06 Alan Mackenzie <acm@muc.de>
+
+ * cc-mode.texi (Custom Line-Up): Clarify position of point on
+ calling a line-up function.
+
2013-03-04 Paul Eggert <eggert@cs.ucla.edu>
* emacs-mime.texi, htmlfontify.texi, mairix-el.texi, mh-e.texi:
please contact @email{bug-cc-mode@@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
+(@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
+2013-03-06 Alan Mackenzie <acm@muc.de>
+
+ Correct the position of point in some line-up functions.
+ * progmodes/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.
+
2013-03-05 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-compat.el (tramp-compat-delete-directory): Implement
(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
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
(let ((orig-pos (point))
alignto)
(save-excursion
+ (beginning-of-line)
(and
c-opt-asm-stmt-key