Closed Dickby closed 8 years ago
Hm. That definitely sounds like a bug. Could you provide an example snippet where that happens?
Start emacs with -q, open a new file in c-mode, enable only aggressive-indent-mode. type the following c code:
#include <stdio.h>
int main()
{
printf("hello, world!\n");
|
return 0;
}
'|' is where the cursor should be.
Now type printf
where the cursor is and the return 0;
will be indented one step deeper.
If you now delete the line with "C-a C-k C-k" the return 0;
line stays where it is and doesn't jump back.
Hello,
I run into the same issue in cc-mode as Dickby described above in rev 1.5 with the latest Emacs 24 release.
Another observation after this issue is that c-c c-q on the messed-up code seems not working any more. I have to re-load the file in order to make it work.
Thanks a lot.
Done, let me know if it works. :+1:
It works only sometimes. Even on the same line the bahavior differs.
I don't know if this helps, but I solved it for me by disabling line 320 in
aggressive-indent-indent-region-and-on
in aggressive-indent.el:
(forward-line 1)
It works only sometimes. Even on the same line the bahavior differs.
You'll have to be a little more specific. ☺ Is there anything you do that triggers it now?
Hi, I truly love this package! But there is one case in c-mode that could be improved in my opinion: If I open a new line inside an existing function and start to type, the next lines are indented one more step as long as I don't type the finishing semicolon. Thats fine! But if I deside to kill that line again before typing the semicolon (with C-a C-k C-k) the following lines aren't jumping back again. This is the only case I know where I need to indent manually. Thanks