Xref: utzoo comp.emacs:4488 gnu.emacs:126 Path: utzoo!utgpu!water!watmath!uunet!tektronix!sequent!mntgfx!mosurm From: mosurm@mntgfx.mentor.com (Mosur Mohan) Newsgroups: comp.emacs,gnu.emacs Subject: Re: Wanted: Pascal Minor mode for Gnu Emacs Summary: Here's how I autoload my pas-mode Message-ID: <1988Oct25.152833.2675@mntgfx.mentor.com> Date: 25 Oct 88 22:28:30 GMT References: <23772@tut.cis.ohio-state.edu> <169@s1.sys.uea.ac.uk> Reply-To: uunet!mntgfx!mosurm Distribution: comp Organization: Mentor Graphics Corporation, Beaverton Oregon Lines: 27 In article <169@s1.sys.uea.ac.uk>, mdt@s1.sys.uea.ac.uk (M.D. Templeton GEC ) writes: > It's all very well posting bits of lisp code to create new modes, and so on, > but how do I autoload it?... > > The Druid. Here's the relevant snippet from my .emacs: ;; auto-mode-alist is the association-list that tells Emacs ;; how to determine the right mode based on the file-extension ;; This example identifies .pas, .inc, .pai and .p files as Pascal files (setq auto-mode-alist (append auto-mode-alist '(("\\.pas$" . pas-mode) ("\\.inc$" . pas-mode) ("\\.pai$" . pas-mode) ("\\.p$" . pas-mode)) )) ;; This tells Emacs where to go to find the pas-mode code. ;; Emacs automatically looks for a pas-mode.elc, then a .el file (autoload 'pas-mode "/user/mosurm/code/emacs/pas-mode" "This is a mode intended to support program development in Pascal. Control-C is the prefix to reach functions special to pas-mode." t) -- -- Mohan. {uunet!mntgfx!mosurm} {Mosur Mohan, Mentor Graphics, Beaverton, OR}