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 20:37:09 +0800 Message-ID: References: <455C5702.8060804@gmx.at> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: sea.gmane.org 1163680677 14776 80.91.229.2 (16 Nov 2006 12:37:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 16 Nov 2006 12:37:57 +0000 (UTC) Cc: emacs-devel@gnu.org, rms@gnu.org, monnier@iro.umontreal.ca Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 16 13:37:51 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 1GkgUy-0004tF-Qi for ged-emacs-devel@m.gmane.org; Thu, 16 Nov 2006 13:37:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GkgUx-0003SM-NJ for ged-emacs-devel@m.gmane.org; Thu, 16 Nov 2006 07:37:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GkgUa-0003RS-Il for emacs-devel@gnu.org; Thu, 16 Nov 2006 07:37:20 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GkgUX-0003QL-Al for emacs-devel@gnu.org; Thu, 16 Nov 2006 07:37:19 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GkgUX-0003QB-1o for emacs-devel@gnu.org; Thu, 16 Nov 2006 07:37:17 -0500 Original-Received: from [65.54.246.215] (helo=bay0-omc3-s15.bay0.hotmail.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GkgUR-0008CF-Nr; Thu, 16 Nov 2006 07:37:11 -0500 Original-Received: from hotmail.com ([64.4.26.36]) by bay0-omc3-s15.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 16 Nov 2006 04:37:10 -0800 Original-Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Thu, 16 Nov 2006 04:37:10 -0800 Original-Received: from 64.4.26.200 by by112fd.bay112.hotmail.msn.com with HTTP; Thu, 16 Nov 2006 12:37:09 GMT X-Originating-IP: [216.145.54.158] X-Originating-Email: [herberteuler@hotmail.com] X-Sender: herberteuler@hotmail.com In-Reply-To: <455C5702.8060804@gmx.at> Original-To: rudalics@gmx.at X-OriginalArrivalTime: 16 Nov 2006 12:37:10.0394 (UTC) FILETIME=[EF4F7DA0:01C7097B] 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:62373 Archived-At: > > No, `kill-local-variable' only makes a variable no longer have a > > separate value in the current buffer. > >That's what I meant. For example, in cc-mode.el you have > > (when (boundp 'parse-sexp-lookup-properties) > (make-local-variable 'parse-sexp-lookup-properties) > (setq parse-sexp-lookup-properties t)) > >that is cc-mode makes a "separate value in the current buffer" and sets >that locally to t. When you turn off longlines in that buffer you turn >that off for cc-mode too. Or am I missing something? No, `make-local-variable' makes a variable local to a buffer, not to a mode: (setq b1 (get-buffer-create "b1")) ==> # (setq b2 (get-buffer-create "b2")) ==> # (save-window-excursion (switch-to-buffer b1) (c-mode) major-mode) ==> c-mode (save-window-excursion (switch-to-buffer b2) (c-mode) major-mode) ==> c-mode parse-sexp-lookup-properties ==> nil (save-window-excursion (switch-to-buffer b1) parse-sexp-lookup-properties) ==> nil (save-window-excursion (switch-to-buffer b2) parse-sexp-lookup-properties) ==> nil (save-window-excursion (switch-to-buffer b1) (make-local-variable 'parse-sexp-lookup-properties) (setq parse-sexp-lookup-properties t) parse-sexp-lookup-properties) ==> t (save-window-excursion (switch-to-buffer b2) (make-local-variable 'parse-sexp-lookup-properties) (setq parse-sexp-lookup-properties nil) parse-sexp-lookup-properties) ==> nil parse-sexp-lookup-properties ==> nil (save-window-excursion (switch-to-buffer b1) (kill-local-variable 'parse-sexp-lookup-properties) parse-sexp-lookup-properties) ==> nil (save-window-excursion (switch-to-buffer b2) parse-sexp-lookup-properties) ==> nil (save-window-excursion (switch-to-buffer b2) (setq parse-sexp-lookup-properties t) parse-sexp-lookup-properties) ==> t parse-sexp-lookup-properties ==> nil Regards, Guanpeng Xu _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/