From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.help Subject: Re: XKCD/541 compliance, anyone? Date: Thu, 08 Jan 2015 02:09:43 +0100 Message-ID: <87tx02xelk.fsf@wmi.amu.edu.pl> References: <8761drazec.fsf@wmi.amu.edu.pl> <87k318npmf.fsf@wmi.amu.edu.pl> <877fwyz1ii.fsf@wmi.amu.edu.pl> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1420679790 32097 80.91.229.3 (8 Jan 2015 01:16:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 8 Jan 2015 01:16:30 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 08 02:16:25 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y91h7-0001Ap-C3 for geh-help-gnu-emacs@m.gmane.org; Thu, 08 Jan 2015 02:15:25 +0100 Original-Received: from localhost ([::1]:43568 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y91h6-000629-Nr for geh-help-gnu-emacs@m.gmane.org; Wed, 07 Jan 2015 20:15:24 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56484) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y91bi-0004OJ-AJ for help-gnu-emacs@gnu.org; Wed, 07 Jan 2015 20:09:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y91bd-0003hH-M2 for help-gnu-emacs@gnu.org; Wed, 07 Jan 2015 20:09:50 -0500 Original-Received: from msg.wmi.amu.edu.pl ([2001:808:114:2::50]:46548) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y91bd-0003h2-Fj for help-gnu-emacs@gnu.org; Wed, 07 Jan 2015 20:09:45 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by msg.wmi.amu.edu.pl (Postfix) with ESMTP id 0E9B44697A; Thu, 8 Jan 2015 02:09:45 +0100 (CET) Original-Received: from msg.wmi.amu.edu.pl ([127.0.0.1]) by localhost (msg.wmi.amu.edu.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Xc8W1heITXzE; Thu, 8 Jan 2015 02:09:44 +0100 (CET) Original-Received: from localhost (117-116.echostar.pl [213.156.117.116]) by msg.wmi.amu.edu.pl (Postfix) with ESMTPSA id B1E3D46963; Thu, 8 Jan 2015 02:09:44 +0100 (CET) In-reply-to: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:808:114:2::50 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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 Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:101938 Archived-At: On 2015-01-07, at 23:37, Stefan Monnier wrote: >> Now this question remains: how to ensure that syntax-propertize is >> getting called everywhere? > > Depends what you mean by "everywhere". It "should" be called internally Everywhere in the buffer. > by things like forward-sexp, but currently isn't. > What you can do is something like > > (jit-lock-register (lambda (from to) (syntax-propertize to)) t) > > [ This needs to be called individually in each buffer. ] > It will make sure that all the visible text has been syntax-propertized, > regardless of font-lock-mode. Do I get it correctly that it's better than my solution (basically, (syntax-propertize (point-max))) because it is faster for large buffer ("lazy smilification";-))? And "calling in each buffer" will probably mean installing it in the hook for modes I want it to work in. (BTW, I love the fact that in the above sentence the closing paren of the smiley is /not/ treated as the counterpart of the opening paren at the beginning of the line. Now that smileys start to "work" for me, I'm going to use them more often :-) :-) ;-P). > Stefan Thanks a lot -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University