From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Adam Warner" Newsgroups: gmane.emacs.help Subject: String recognition in Emacs 21 Date: Mon, 13 Jan 2003 04:17:43 +1300 Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1042384821 25953 80.91.224.249 (12 Jan 2003 15:20:21 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 12 Jan 2003 15:20:21 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18XjuK-0006kD-00 for ; Sun, 12 Jan 2003 16:20:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18XjuO-0005ao-09 for gnu-help-gnu-emacs@m.gmane.org; Sun, 12 Jan 2003 10:20:20 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!fu-berlin.de!uni-berlin.de!ip210-55-214-182.ip.win.co.NZ!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 59 Original-NNTP-Posting-Host: ip210-55-214-182.ip.win.co.nz (210.55.214.182) Original-X-Trace: fu-berlin.de 1042384593 19593515 210.55.214.182 (16 [105510]) User-Agent: Pan/0.13.3 (That cat's something I can't explain) Original-Xref: shelby.stanford.edu gnu.emacs.help:108868 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:5397 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:5397 Hi all, I'd like Emacs to be able to correctly highlight Common Lisp strings. I was very pleased that Gerd Moellmann pointed out open-paren-in-column-0-is-defun-start. This now means that lines that begin with ( are still parsed as a string--it does however appear to be temperamental, e.g.: " (string " (defun test ()) If you delete one of the lines between " and the function definition Emacs decides to highlight the function as a string. Wait a little while and the correct parsing flashes by before Emacs decides upon the incorrect parsing. To get Emacs to correctly interpret the code it appears one has to edit the string (e.g. delete and reinsert a line in the string) I still have the problem that lines beginning with [ cause string data to be parsed as code: "Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users." One should find that the square bracket in the string has caused the last two lines of the string to be parsed as code. Additional code after the closing double quotation mark is interpreted as text. Adding a backslash before the square bracket gives a semantically equivalent string yet is properly parsed by Emacs. Is the incorrect string parsing just a bug? (I'm only familiar with Common Lisp syntax. Square brackets by themselves have no special significance in Common Lisp (they are reserved as reader macro characters). I have checked and they denote vectors in Emacs Lisp. Even so I don't see why they should affect string parsing). I'm yet to hack Emacs so figuring out how to fix this would be a worthwhile exercise. But if someone knows the answer I won't protest :-) I'm currently using version 21.2-5 in Debian unstable. Regards, Adam