From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.devel Subject: Re: narrow-to-here-document Date: Wed, 25 Jun 2003 10:58:51 -0600 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <3EF9D4CB.5010103@yahoo.com> References: <20030620141028.GA1331@math.berkeley.edu> <20030621.012632.74543482.jet@gyve.org> <3EF73468.1030503@yahoo.com> <20030625.151015.68035851.jet@gyve.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1056562682 18088 80.91.224.249 (25 Jun 2003 17:38:02 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 25 Jun 2003 17:38:02 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Jun 25 19:37:56 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19VEDU-0004gj-00 for ; Wed, 25 Jun 2003 19:37:56 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19VEHX-00083f-00 for ; Wed, 25 Jun 2003 19:42:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19VECh-0004A9-SP for emacs-devel@quimby.gnus.org; Wed, 25 Jun 2003 13:37:07 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19VDh2-0004dw-RB for emacs-devel@gnu.org; Wed, 25 Jun 2003 13:04:24 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19VDdU-0003jv-K3 for emacs-devel@gnu.org; Wed, 25 Jun 2003 13:00:45 -0400 Original-Received: from main.gmane.org ([80.91.224.249]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19VDcj-0003Wa-Oh for emacs-devel@gnu.org; Wed, 25 Jun 2003 12:59:57 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19VDcQ-0001Zr-00 for ; Wed, 25 Jun 2003 18:59:38 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19VDaN-0001MC-00 for ; Wed, 25 Jun 2003 18:57:31 +0200 Original-Lines: 77 Original-X-Complaints-To: usenet@main.gmane.org User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:15240 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:15240 Masatake YAMATO wrote: > I've reflected suggestions to my code. ... > Kevin Rodgers: > 3. > Would INCLUDE/IGNORE/CDATA marked sections in SGML/XML/HTML qualify? > > No s or &entity; references are recognized here. > ]]> ... > ;; > ;; sgml-mode > ;; > (defvar sgml-here-document-beginning-regexp " (defvar sgml-here-document-end-regexp "]]>") > (defun sgml-here-document-region () > (let (beginning end) > (save-excursion > (save-match-data > (when (re-search-backward > sgml-here-document-beginning-regexp > (point-min) t) > (setq beginning (match-end 0)) > (when (re-search-forward > sgml-here-document-end-regexp > (point-max) t) > (setq end (match-beginning 0)))))) > (if (and beginning end (<= (point) end)) > (cons beginning end)))) -- Kevin Rodgers