From: Joakim Hove <hove@bccs.no>
Subject: Re: How to load a lisp file automatically
Date: Fri, 12 Dec 2003 13:47:43 +0100 [thread overview]
Message-ID: <4yzndyxkwg.fsf@skjellgran.ii.uib.no> (raw)
In-Reply-To: 7iad5zt8h7.fsf@neoscale.com
Kin Cho <kin@techie.com> writes:
>> (setq load-path (cons "~/" load-path))
>> (require 'setnu)
>> (add-hook 'text-mode-hook 'turn-on-setnu-mode)
>
> Try adding to the bottom of setnu.el (and byte-compile it again):
>
> (provide 'setnu)
An another solution (it is always a good idea to (provide
'your-lisp)), but instead of (require 'setnu) you could use:
(autoload 'turn-on-setnu-mode "setnu" "Automatically load file setnu" 't)
The purpose of this is to setup a connection between a function
(turn-on-setnu-mode), and a file ("setnu.el(c)") which contains an
implementation of that function.
HTH - Joakim
--
/--------------------------------------------------------------------\
/ Joakim Hove / hove@bccs.no / (55 5) 84076 | \
| Unifob AS, Avdeling for Beregningsvitenskap (BCCS) | Stabburveien 18 |
| CMU | 5231 Paradis |
\ Thormøhlensgt.55, 5020 Bergen. | 55 91 28 18 /
\--------------------------------------------------------------------/
next prev parent reply other threads:[~2003-12-12 12:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1601.1071175004.399.help-gnu-emacs@gnu.org>
2003-12-11 20:17 ` How to load a lisp file automatically Kin Cho
2003-12-12 12:47 ` Joakim Hove [this message]
2003-12-11 19:34 Chunyan Wang
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4yzndyxkwg.fsf@skjellgran.ii.uib.no \
--to=hove@bccs.no \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).