From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Herbert Euler" Newsgroups: gmane.emacs.devel Subject: Re: Patch: Syntax and Hard Newlines Date: Thu, 16 Nov 2006 18:47:05 +0800 Message-ID: References: <455C248B.7080100@gmx.at> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: sea.gmane.org 1163674140 24985 80.91.229.2 (16 Nov 2006 10:49:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 16 Nov 2006 10:49:00 +0000 (UTC) Cc: rms@gnu.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 16 11:48:56 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GkenR-0007gB-0U for ged-emacs-devel@m.gmane.org; Thu, 16 Nov 2006 11:48:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GkenQ-0004kv-5e for ged-emacs-devel@m.gmane.org; Thu, 16 Nov 2006 05:48:40 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gkem9-0003zS-0a for emacs-devel@gnu.org; Thu, 16 Nov 2006 05:47:21 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gkem6-0003yT-Oc for emacs-devel@gnu.org; Thu, 16 Nov 2006 05:47:20 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gkem6-0003yF-Bp for emacs-devel@gnu.org; Thu, 16 Nov 2006 05:47:18 -0500 Original-Received: from [65.54.246.112] (helo=bay0-omc1-s40.bay0.hotmail.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Gkem3-0003ri-Kc; Thu, 16 Nov 2006 05:47:15 -0500 Original-Received: from hotmail.com ([64.4.26.29]) by bay0-omc1-s40.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 16 Nov 2006 02:47:14 -0800 Original-Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Thu, 16 Nov 2006 02:47:14 -0800 Original-Received: from 64.4.26.200 by by112fd.bay112.hotmail.msn.com with HTTP; Thu, 16 Nov 2006 10:47:05 GMT X-Originating-IP: [216.145.54.158] X-Originating-Email: [herberteuler@hotmail.com] X-Sender: herberteuler@hotmail.com In-Reply-To: <455C248B.7080100@gmx.at> Original-To: rudalics@gmx.at X-OriginalArrivalTime: 16 Nov 2006 10:47:14.0207 (UTC) FILETIME=[93AD3AF0:01C7096C] 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:62372 Archived-At: >A silly question maybe: Wouldn't > >+ (kill-local-variable 'parse-sexp-lookup-properties) > >cause problems for major modes using that? > >I suppose it would be cleaner to require minor modes that want to turn >on/off `parse-sexp-lookup-properties' in a buffer append/remove their >name from/to that variable and kill it iff that list gets empty. No, `kill-local-variable' only makes a variable no longer have a separate value in the current buffer. The same variable (perhaps local) in other buffers is not affected, either does the global version of the variable: (setq abc 7) ==> 7 (setq b1 (get-buffer-create "b1")) ==> # (setq b2 (get-buffer-create "b2")) ==> # (save-window-excursion (switch-to-buffer b1) abc) ==> 7 (save-window-excursion (switch-to-buffer b2) abc) ==> 7 (save-window-excursion (switch-to-buffer b1) (make-local-variable 'abc) (setq abc 5) abc) ==> 5 abc ==> 7 (save-window-excursion (switch-to-buffer b2) (make-local-variable 'abc) (setq abc 9) abc) ==> 9 abc ==> 7 (save-window-excursion (switch-to-buffer b1) (kill-local-variable 'abc) abc) ==> 7 abc ==> 7 (save-window-excursion (switch-to-buffer b2) abc) ==> 9 abc ==> 7 Regards, Guanpeng Xu _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/