GNU bug report logs -
#5437
C-q reformat and Autofill error
Previous Next
Full log
View this message in rfc822 format
> When I edit the beginning of the first line with an "-" character, and
> reformat using M-q, I expected all the lines to be indented
>
> Instead, after adding the '-' at the beginning, and reformatting with
> M-q, what I get is normal wrapping of the text
>
> This appears to be a bug, because it only seems to happens when the
> first line of the text is edited after the fact. If I include the '-'
> character when I first start typing the multiple lines, I get the
> indented wrapping that I expected. Additionally if I join the lines
> back together, and then type M-q, I get the expected indented
> wrapping.
This is not a bug, it's part of the indentation logic. Emacs has no way
of knowing whether you intend to indent like this:
- foo goo...
bar baz...
or like this:
- foo goo...
bar baz...
Clearly, each indentation could be valid under different circumstances,
and Emacs must not impose one single choice when M-q is typed.
So, if you start out with a long line that is not already indented, it
will try option 2. But if you start out with either choice, it will
stick with that choice.
This bug report was last modified 15 years and 120 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.