* `c-indent-command' in a rare case
@ 2004-10-01 1:25 Paul Pogonyshev
0 siblings, 0 replies; only message in thread
From: Paul Pogonyshev @ 2004-10-01 1:25 UTC (permalink / raw)
Create a new C mode buffer and type
#define X\ TAB
in it (note: no RET.) Emacs will hang in `c-append-backslashes-forward'
till you press C-g. The one-liner below solves this. However, I'm not
sure if this the correct way of solving. Should `(forward-line 1)'
return 0 when not advancing a single line and only jumping to the end
of last, unterminated, line?
Paul
--- cc-cmds.el 11 Aug 2004 14:22:21 -0200 1.37
+++ cc-cmds.el 30 Sep 2004 23:21:11 -0200
@@ -2441,7 +2441,7 @@ command to conveniently insert and align
(delete-region (point) end)
(indent-to column 1)))
- (= (forward-line 1) 0))))
+ (= (progn (end-of-line) (forward-line 1)) 0))))
;; Make sure there are backslashes with at least one space in
;; front of them.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-10-01 1:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-01 1:25 `c-indent-command' in a rare case Paul Pogonyshev
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).