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: identifiing strings and comments in program source files (to skip them over) Date: Wed, 26 Apr 2006 19:05:30 GMT Organization: Nokia Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1146080495 20596 80.91.229.2 (26 Apr 2006 19:41:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 26 Apr 2006 19:41:35 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 26 21:41:33 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FYpt0-0001tg-1p for geh-help-gnu-emacs@m.gmane.org; Wed, 26 Apr 2006 21:41:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FYpsz-00039R-Gk for geh-help-gnu-emacs@m.gmane.org; Wed, 26 Apr 2006 15:41:17 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.gamma.ru!Gamma.RU!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed0.kamp.net!newsfeed.kamp.net!news.osn.de!diablo2.news.osn.de!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.bahnhof.se!195.197.54.117.MISMATCH!feeder1.news.jippii.net!nntp.inet.fi!inet.fi!newsfeed1.nokia.com!news1.nokia.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: 40tude_Dialog/2.0.15.1 Original-Lines: 16 Original-NNTP-Posting-Host: 172.25.150.224 Original-X-Complaints-To: newsmaster@nokia.com Original-X-Trace: news1.nokia.com 1146078330 172.25.150.224 (Wed, 26 Apr 2006 22:05:30 EET DST) Original-NNTP-Posting-Date: Wed, 26 Apr 2006 22:05:30 EET DST Original-Xref: shelby.stanford.edu gnu.emacs.help:139055 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:34676 Archived-At: On Wed, 26 Apr 2006 08:38:52 +0200, martin rudalics wrote: > To check whether searching stopped in a > comment or string you could parse from `beginning-of-defun' or something > similar instead - `syntax-ppss' does that. Thanks for this detailed explanation also! My problem is that I have legacy code (with ~1 MB source files sometimes) and I can't really imagine anything for beginning-of-defun. E.g. C-like /*...*/ works for commenting and whole subprograms can be commented out... In other words: I think I should have to start parsing everytime from the beginning of the buffer... Any idea? Or 1MB source files are not too big for this on today's PCs? Br, P