From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: flypell and check-comments. Date: Sun, 11 Mar 2007 15:38:30 +0100 Message-ID: <45F41466.6010108@gmx.at> References: <87fy8ht91r.fsf@lrde.org> <45EF0455.6080407@gmx.at> <87slccrl4w.fsf@lrde.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1173623987 32503 80.91.229.12 (11 Mar 2007 14:39:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 11 Mar 2007 14:39:47 +0000 (UTC) Cc: emacs-devel@gnu.org, rms@gnu.org, Stefan Monnier To: =?ISO-8859-15?Q?Micha=EBl_Cadilhac?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 11 15:39:40 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HQPD0-0006hB-1D for ged-emacs-devel@m.gmane.org; Sun, 11 Mar 2007 15:39:38 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HQPDY-0000Yw-1D for ged-emacs-devel@m.gmane.org; Sun, 11 Mar 2007 09:40:12 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HQPDK-0000Yq-8S for emacs-devel@gnu.org; Sun, 11 Mar 2007 10:39:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HQPDF-0000Sy-P1 for emacs-devel@gnu.org; Sun, 11 Mar 2007 10:39:56 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HQPDF-0000So-Lc for emacs-devel@gnu.org; Sun, 11 Mar 2007 09:39:53 -0500 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1HQPCg-0003ie-Mb for emacs-devel@gnu.org; Sun, 11 Mar 2007 10:39:19 -0400 Original-Received: (qmail invoked by alias); 11 Mar 2007 14:39:17 -0000 Original-Received: from N880P007.adsl.highway.telekom.at (EHLO [62.47.53.231]) [62.47.53.231] by mail.gmx.net (mp040) with SMTP; 11 Mar 2007 15:39:17 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX191kAZ3OCF16A+5DVV8n2mQiZyEWu5uSzSWhLh4tE IAcYuFPXB83P4U User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: <87slccrl4w.fsf@lrde.org> X-Y-GMX-Trusted: 0 X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:67717 Archived-At: > Stefan, Martin, is the code here what you meant (it may not be, > font-locking is not my cup of tea)? Maybe the following should be reconsidered > ! (and (not ispell-check-comments) > ! (nth 4 (syntax-ppss (car (cdr flyspell-word)))))) since on the one hand you don't check for `ispell-check-comments' being eq to 'exclusive (hence you don't emulate ispell faithfully - I don't know whether this is even desirable) while on the other hand you don't check whether you're in a string (hence you don't fully emulate the default of `flyspell-prog-text-faces' either). But maybe I'm wrong. Also `syntax-ppss' may get expensive for `flyspell-large-region'. It's generally better to use it for the first position only, save position and parse-state, and then do `parse-partial-sexp' from the last saved position and parse-state. By no means I want(ed) to express here that syntax _should_ be parsed. What I meant was that if a user does not want to use font-lock _and_ wants to spell-check comments or strings specially, parsing syntax is the only practical way. Hence, IMHO ignoring `ispell-check-comments' here is a viable alternative as well.