unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Pogonyshev <pogonyshev@gmx.net>
Subject: `c-indent-command' in a rare case
Date: Thu, 30 Sep 2004 23:25:54 -0200	[thread overview]
Message-ID: <200409302325.54277.pogonyshev@gmx.net> (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.

                 reply	other threads:[~2004-10-01  1:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200409302325.54277.pogonyshev@gmx.net \
    --to=pogonyshev@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).