python-mode in emacs
Svein Halvor Halvorsen
svein.h at lvor.halvorsen.cc
Tue Oct 17 00:22:33 UTC 2006
> Well, it doesn't cause any harm to add to your ~/.emacs
> ;; Add python-mode
> (autoload 'python-mode "python-mode" "Python editing mode." t)
> (setq auto-mode-alist
> (cons '("\\.py$" . python-mode) auto-mode-alist))
> (add-hook 'python-mode-hook 'turn-on-font-lock)
>> Are there any way to get emacs to automatically read files in this
>> directory? Am I missing something? Shouldn't the ports system by default
>> be setup in a way that this would work?
> I don't know. But having Emacs auto-load every mode from there
> doesn't seem a good idea. And the port can't do that either, since
> it's a per-user decision.
I wasn't suggesting emacs autoload every mode, but rather that emacs
simply read the files, and offer me the choice of using modes defines in
E.g. do the same as
$emacs -l /usr/local/share/emacs/site-lisp/python-mode.el
If I start emacs by just typing "emacs", and then use "esc-x"
python-mode is not an option. However, If I use the -l option,
python-mode is not automatically loaded, but emacs will then offer me
the option of loading it later.
Your suggested additions to my .emacs file, seems to work, though.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 247 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20061017/663a6d3d/signature.pgp
More information about the freebsd-questions