From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: grep can help? Date: Thu, 22 Apr 2004 10:14:33 -0400 Organization: Looking for work Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <86brlkmhj7.fsf@chello.at> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1082643678 15142 80.91.224.253 (22 Apr 2004 14:21:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 22 Apr 2004 14:21:18 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 22 16:21:12 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BGf4h-0005Bf-00 for ; Thu, 22 Apr 2004 16:21:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BGf04-00052Z-Fd for geh-help-gnu-emacs@m.gmane.org; Thu, 22 Apr 2004 10:16:24 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.isc.org!sjc70.webusenet.com!news.usenetserver.com!border1.nntp.sjc.giganews.com!nntp.giganews.com!local1.nntp.sjc.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail Original-NNTP-Posting-Date: Thu, 22 Apr 2004 09:14:33 -0500 Original-Newsgroups: gnu.emacs.help Mail-Copies-To: nobody User-Agent: MT-NewsWatcher/3.4 (PPC Mac OS X) X-Copies-To: never Original-Lines: 31 Original-NNTP-Posting-Host: 24.128.26.140 Original-X-Trace: sv3-Jz6hR03I+pj8BHqLZmqv67K6eY7WFSVn4P+T8d2CMnSAQDU9Jf8oDoRMbFn8bGwukplgyXEu8xeVUz9!EAYO05QqvjFj8feUvoIfvg7K8x9JkGmkttFVFjltgTn3QNUjjxuLiEmqNKzmAiUzSwHYGj5TBcPR!1e51J7xcyig= Original-X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Original-Xref: shelby.stanford.edu gnu.emacs.help:122567 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:17854 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:17854 In article , FCC wrote: > Albert Reiner wrote: > > Just to point out the obvious: This does not take into account > > exclamation marks in string constants, and the standard also allows > > you to write F90 in fixed format in which case you might use ! in > > column 5 (?) for continuation lines. Of course it depends on your > > code whether this is a problem; a general solution would need to parse > > F90 in both formats. > > > > Albert. > > I see. I think your 2nd point is not an example of good programming, so > I would not worry about it. But your 1st point needs to be taken care > of: replace-regexp "\B!.*" " " and all the comments will be gone, > respecting the ! inside the strings, as long as they don't come with a > preceding whitespace. But if they do, this is again not a good practice, > normally for example you write "Nice to see you!", but not "Nice to see > you !". > > FCC. That's true if the strings contain normal prose text. But suppose you were writing a program that adds comments to programs. It's likely to contain " ! " as a string. -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***