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. doc/misc/cc-mode.texi (Custom Line-Up): State explicitly that point starts at a random position in the line being indented.
This commit is contained in:
parent
1af1a51aad
commit
33d1e2f5bd
4 changed files with 23 additions and 8 deletions
|
@ -1,3 +1,8 @@
|
|||
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:
|
||||
|
|
|
@ -6475,13 +6475,14 @@ think is generally useful, you're very welcome to contribute it;
|
|||
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
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
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
|
||||
|
|
|
@ -737,7 +737,7 @@ arglist-cont-nonempty."
|
|||
(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
|
||||
|
@ -1039,6 +1039,7 @@ brace-list-close, brace-list-intro, statement-block-intro,
|
|||
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
|
||||
|
@ -1191,6 +1192,7 @@ Works with: arglist-cont, arglist-cont-nonempty."
|
|||
(let ((orig-pos (point))
|
||||
alignto)
|
||||
(save-excursion
|
||||
(beginning-of-line)
|
||||
(and
|
||||
c-opt-asm-stmt-key
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue