From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ian Eure Newsgroups: gmane.emacs.help Subject: Re: Add hook for one mode only Date: Sun, 28 Dec 2008 08:59:25 -0800 Message-ID: <2DC9FA84-2862-4F4D-B81B-021880A31B23@digg.com> References: <873ag8oes4.fsf@literaturlatenight.de> <87k59k3830.fsf@iki.fi> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1230483601 32662 80.91.229.12 (28 Dec 2008 17:00:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 28 Dec 2008 17:00:01 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Teemu Likonen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Dec 28 18:01:08 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LGz0h-0000um-ID for geh-help-gnu-emacs@m.gmane.org; Sun, 28 Dec 2008 18:01:03 +0100 Original-Received: from localhost ([127.0.0.1]:45798 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LGyzU-00074J-0v for geh-help-gnu-emacs@m.gmane.org; Sun, 28 Dec 2008 11:59:48 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LGyzC-000736-OU for help-gnu-emacs@gnu.org; Sun, 28 Dec 2008 11:59:30 -0500 Original-Received: from [199.232.76.173] (port=50162 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LGyzB-00072y-55 for help-gnu-emacs@gnu.org; Sun, 28 Dec 2008 11:59:29 -0500 Original-Received: from mail.digg.com ([64.191.203.36]:32856) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LGyzA-00083r-Kh for help-gnu-emacs@gnu.org; Sun, 28 Dec 2008 11:59:28 -0500 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.digg.com (Postfix) with ESMTP id 3B5BBA85019; Sun, 28 Dec 2008 08:59:27 -0800 (PST) X-Virus-Scanned: amavisd-new at X-Spam-Score: 1.367 Original-Received: from mail.digg.com ([127.0.0.1]) by localhost (mail.digg.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GRf3WJR2sL2v; Sun, 28 Dec 2008 08:59:26 -0800 (PST) Original-Received: from [192.168.1.100] (adsl-68-125-160-3.dsl.pltn13.pacbell.net [68.125.160.3]) by mail.digg.com (Postfix) with ESMTP id 82776A84FBB; Sun, 28 Dec 2008 08:59:26 -0800 (PST) In-Reply-To: <87k59k3830.fsf@iki.fi> X-Mailer: Apple Mail (2.930.3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:60950 Archived-At: On Dec 28, 2008, at 2:30 AM, Teemu Likonen wrote: > henry atting (2008-12-28 10:00 +0100) wrote: > > "tab-stop-list" is a variable which does not automatically became > buffer-local. This means that normally you only define the global > value. > Fortunately you can make it buffer-local for the current buffer with > function "make-local-variable", so this is likely what you want: > > (add-hook 'ledger-mode-hook > '(lambda () > (make-local-variable 'tab-stop-list) > (setq tab-stop-list '(4 56)))) > You can do it that way, though this is cleaner: (set (make-local-variable 'tab-stop-list) '(4 56)) - Ian