From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Peter Tury" Newsgroups: gmane.emacs.help Subject: Re: Different behaviour between M-x replace-regexp in function and in echowindow Date: Thu, 21 Apr 2005 13:21:08 GMT Organization: MSG Message-ID: <8NN9e.5450$v4.100780@news2.nokia.com> References: Reply-To: Peter Tury NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1114089414 23236 80.91.229.2 (21 Apr 2005 13:16:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 21 Apr 2005 13:16:54 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 21 15:16:52 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DObWf-0006Pi-9c for geh-help-gnu-emacs@m.gmane.org; Thu, 21 Apr 2005 15:15:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DObbN-0008B7-QN for geh-help-gnu-emacs@m.gmane.org; Thu, 21 Apr 2005 09:20:17 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed1.swip.net!swipnet!newsfeed1.funet.fi!newsfeeds.funet.fi!nntp.inet.fi!inet.fi!newsfeed1.nokia.com!news1.nokia.com!news2.nokia.com.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 17 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Original-NNTP-Posting-Host: 172.24.170.141 Original-X-Complaints-To: newsmaster@nokia.com Original-X-Trace: news2.nokia.com 1114089668 172.24.170.141 (Thu, 21 Apr 2005 16:21:08 EET DST) Original-NNTP-Posting-Date: Thu, 21 Apr 2005 16:21:08 EET DST Original-Xref: shelby.stanford.edu gnu.emacs.help:130307 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:25879 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:25879 Hi, consider this alternative: (defun comment-formatting(start end) (interactive "*r") (save-excursion (goto-char start) (while (search-forward "//" end t) (just-one-space)))) It inserts a SPC if needed. Hm? Br, P