From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: scheme.el bug & fix Date: Sun, 16 Feb 2003 19:05:36 -0600 (CST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200302170105.TAA17107@eel.dms.auburn.edu> References: <3E26DA700109A72E@mel-rta8.wanadoo.fr> (added by postmaster@wanadoo.fr) <200302162353.h1GNrkG24335@rum.cs.yale.edu> NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1045443809 15655 80.91.224.249 (17 Feb 2003 01:03:29 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 17 Feb 2003 01:03:29 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18kZgu-00044N-00 for ; Mon, 17 Feb 2003 02:03:28 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18kZv4-0002gq-00 for ; Mon, 17 Feb 2003 02:18:06 +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 18kZij-0000tr-03 for emacs-devel@quimby.gnus.org; Sun, 16 Feb 2003 20:05:21 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18kZiH-0000na-00 for emacs-devel@gnu.org; Sun, 16 Feb 2003 20:04:53 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18kZiG-0000mb-00 for emacs-devel@gnu.org; Sun, 16 Feb 2003 20:04:52 -0500 Original-Received: from manatee.dms.auburn.edu ([131.204.53.104]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18kZiG-0000jv-00 for emacs-devel@gnu.org; Sun, 16 Feb 2003 20:04:52 -0500 Original-Received: from eel.dms.auburn.edu (eel.dms.auburn.edu [131.204.53.108]) by manatee.dms.auburn.edu (8.9.1a/8.9.1) with ESMTP id TAA09313; Sun, 16 Feb 2003 19:04:46 -0600 (CST) Original-Received: (from teirllm@localhost) by eel.dms.auburn.edu (8.9.3+Sun/8.9.3) id TAA17107; Sun, 16 Feb 2003 19:05:36 -0600 (CST) X-Authentication-Warning: eel.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: monnier+gnu/emacs@rum.cs.yale.edu In-reply-to: <200302162353.h1GNrkG24335@rum.cs.yale.edu> (monnier+gnu/emacs@rum.cs.yale.edu) Original-cc: David.Ponce@wanadoo.fr 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:11691 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:11691 Stefan Monnier wrote: It turns out the problem is that (with-syntax-table st (modify-syntex-entry foo bar)) does not modify `st' because `with-syntax-table' does not use `st' but a copy of it. Actually it's even documented in the docstring. This sounds silly. Does anybody have an idea why it is defined that way ? If not, any objection the patch below which should also improve (very marginally) the performance of Emacs ? Are you sure that you are not going to break plenty of existing code this way? People could very legitimately have relied on the present behavior, which is, as you state yourself, very explicitly mentioned in the doc string. The reason for the "silly" behavior seems obvious: to avoid accidental modification of st. Is there any reason why scheme.el can not possibly define its syntax table in a more standard and more natural way? I do not believe that with-syntax-table was meant to be used the way scheme .el uses it. (I believe it is meant to very temporarily change the syntax table of the current buffer, not to be used to actually define syntax tables.) Sincerely, Luc.