From owner-freebsd-questions@FreeBSD.ORG Tue Oct 17 00:22:33 2006 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BC27516A403 for ; Tue, 17 Oct 2006 00:22:33 +0000 (UTC) (envelope-from svein.h@lvor.halvorsen.cc) Received: from signal.itea.ntnu.no (signal.itea.ntnu.no [129.241.190.231]) by mx1.FreeBSD.org (Postfix) with ESMTP id B5A0A43D69 for ; Tue, 17 Oct 2006 00:22:24 +0000 (GMT) (envelope-from svein.h@lvor.halvorsen.cc) Received: from localhost (localhost [127.0.0.1]) by signal.itea.ntnu.no (Postfix) with ESMTP id 6935433B06 for ; Tue, 17 Oct 2006 02:22:22 +0200 (CEST) Received: from maren.thelosingend.net (maren.math.ntnu.no [129.241.211.48]) by signal.itea.ntnu.no (Postfix) with SMTP for ; Tue, 17 Oct 2006 02:22:21 +0200 (CEST) Received: (qmail 12537 invoked by uid 88); 17 Oct 2006 02:22:21 +0200 Received: from 10.84-48-62.nextgentel.com (HELO [10.0.0.8]) (84.48.62.10) by maren.thelosingend.net (qpsmtpd/0.31.1) with ESMTP; Tue, 17 Oct 2006 02:22:20 +0200 Message-ID: <453421C5.2020801@lvor.halvorsen.cc> Date: Tue, 17 Oct 2006 02:20:21 +0200 From: Svein Halvor Halvorsen User-Agent: Thunderbird 1.5.0.2 (X11/20060522) MIME-Version: 1.0 To: cpghost References: <45340E01.5080709@lvor.halvorsen.cc> <20061016231947.GA25692@epia2.farid-hajji.net> In-Reply-To: <20061016231947.GA25692@epia2.farid-hajji.net> X-Enigmail-Version: 0.94.0.0 OpenPGP: id=9198BB40; url=mailto:pgpkey@svein.halvorsen.cc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigF038A11361331C06378DA7F7" X-Virus-Checked: Checked X-Content-Scanned: with sophos and spamassassin at mailgw.ntnu.no. Cc: questions@freebsd.org Subject: Re: python-mode in emacs X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Oct 2006 00:22:33 -0000 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--