[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

`c-indent-command' in a rare case

From: Paul Pogonyshev
Subject: `c-indent-command' in a rare case
Date: Thu, 30 Sep 2004 23:25:54 -0200
User-agent: KMail/1.4.3

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?


--- 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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]