From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.help Subject: Re: Please why ORDER of .emacs lines here matters..... Date: 10 Aug 2003 13:43:03 -0400 Organization: Yale University Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <5lr83tquhk.fsf@rum.cs.yale.edu> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1060539416 23050 80.91.224.253 (10 Aug 2003 18:16:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 10 Aug 2003 18:16:56 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Aug 10 20:16:54 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19lukQ-00080L-01 for ; Sun, 10 Aug 2003 20:16:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19lukE-0005sm-9O for geh-help-gnu-emacs@m.gmane.org; Sun, 10 Aug 2003 14:16:42 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!canoe.uoregon.edu!news.wss.yale.edu!rum.cs.yale.edu!rum.cs.yale.edu Original-Newsgroups: gnu.emacs.help Original-Lines: 26 Original-NNTP-Posting-Host: rum.cs.yale.edu Original-X-Trace: news.wss.yale.edu 1060537386 5769 128.36.229.169 (10 Aug 2003 17:43:06 GMT) Original-X-Complaints-To: news@news.wss.yale.edu Original-NNTP-Posting-Date: Sun, 10 Aug 2003 17:43:06 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-Original-NNTP-Posting-Host: rum.cs.yale.edu X-Original-Trace: 10 Aug 2003 13:43:03 -0400, rum.cs.yale.edu Original-Xref: shelby.stanford.edu gnu.emacs.help:115784 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:11701 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:11701 > (defun cs-python-mode() > (setq-default py-indent-offset 8 ) > (python-mode) > (turn-on-font-lock) > (setq-default auto-fill-function 'do-auto-fill) > (setq-default py-python-command "python2.2" ) > (setq-default py-continuation-offset 8 ) > (setq-default py-smart-indentation nil ) > (setq-default py-block-comment-prefix "#" )) It's completely wrong to use setq-default here, so I'd be curious to know from where you got the idea ? Instead, you want to use ... (set (make-local-variable 'py-continuation-offset) 8) ... since you only want to set those variables in the particular buffer that uses cs-python-mode rather than in all buffers. Stefan PS: Maybe it's time for setq-local.