all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Stefan Monnier" <monnier+gnu.emacs.help/news/@flint.cs.yale.edu>
Subject: Re: Please why ORDER of .emacs lines here matters.....
Date: 10 Aug 2003 13:43:03 -0400	[thread overview]
Message-ID: <5lr83tquhk.fsf@rum.cs.yale.edu> (raw)
In-Reply-To: bf23f78f.0307311214.2f56c326@posting.google.com

>   (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.

      parent reply	other threads:[~2003-08-10 17:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-31 20:14 Please why ORDER of .emacs lines here matters Christian Seberino
2003-07-31 21:53 ` Kevin Rodgers
2003-08-01  5:36   ` Christian Seberino
2003-08-01 16:13     ` Kevin Rodgers
2003-08-01 20:50     ` Alan Mackenzie
2003-08-05  8:42     ` Thien-Thi Nguyen
2003-08-08  8:42       ` Alan Mackenzie
2003-08-01 20:48 ` Kai Großjohann
2003-08-10 17:43 ` Stefan Monnier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5lr83tquhk.fsf@rum.cs.yale.edu \
    --to=monnier+gnu.emacs.help/news/@flint.cs.yale.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.