Date: Tue, 17 Oct 2006 02:20:21 +0200 From: Svein Halvor Halvorsen <svein.h@lvor.halvorsen.cc> To: cpghost <cpghost@cordula.ws> Cc: questions@freebsd.org Subject: Re: python-mode in emacs Message-ID: <453421C5.2020801@lvor.halvorsen.cc> In-Reply-To: <20061016231947.GA25692@epia2.farid-hajji.net> References: <45340E01.5080709@lvor.halvorsen.cc> <20061016231947.GA25692@epia2.farid-hajji.net>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF038A11361331C06378DA7F7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable cpghost wrote: > Well, it doesn't cause any harm to add to your ~/.emacs >=20 > ;; 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) >=20 >> Are there any way to get emacs to automatically read files in this >> directory? Am I missing something? Shouldn't the ports system by defau= lt >> be setup in a way that this would work? >=20 > 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 such files. 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. Svein Halvor --------------enigF038A11361331C06378DA7F7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) Comment: mailto:pgpkey@svein.halvorsen.cc to get my PGP-key iD8DBQFFNCHIhQg3vZGYu0ARAt2DAKCik+TVWIi1gC3hqAEZoHokwsv4bwCgjcJP IzLuF3WI8So4Mgi/Nsqmz9I= =4Gj7 -----END PGP SIGNATURE----- --------------enigF038A11361331C06378DA7F7--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?453421C5.2020801>