help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Please why ORDER of .emacs lines here matters.....


From: Stefan Monnier
Subject: Re: Please why ORDER of .emacs lines here matters.....
Date: 10 Aug 2003 13:43:03 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]