🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.emacs
Article #8270

Re: Automatic Mode switching

#8270
From: Dale Wiles
Date: Tue, 10 Jan 1989 18:07
21 lines
1320 bytes
In article <MBADER.89Jan9140035@deep.cs.washington.edu>, mbader@deep (Mark P. Bader) writes:

>How do you add a list item to a emacs lisp variable?  (probably to
>be done in my .emacs file).

This is how I do it. I added this to my .emacs file so that when I
load in a file that ends with ".foo", EMACS enters "bar" mode.

(setq auto-mode-alist
  (append auto-mode-alist
	  (list (cons '"\\.foo$" 'bar-mode))))

Hope this helps.

BTW, where the #$@#$ does "foo" and "bar" come from? Why "foo" and why
"bar"?
-- 
***Palindrome->Emacs came, Dale, lad, Emacs came.*** Looks more (bonk)
* Disclaimer: I don't disclaim nothing! I am THE   * like a sick-e-more (bonk)
* official opinion of my college, state, country   * to me.
* and of all carbon based life forms in the universe.    Yogi the Space Bear.
Technical Details
Message-ID: <3631@cs.Buffalo.EDU>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!tank!ncar!boulder!sunybcs!ugwiles@sybil
References: <MBADER.89Jan9140035@deep.cs.washington.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!tank!ncar!boulder!sunybcs!ugwiles@sybil
From: ugwiles@sybil (Dale Wiles)
Newsgroups: comp.emacs
Subject: Re: Automatic Mode switching
Message-ID: <3631@cs.Buffalo.EDU>
Date: 10 Jan 89 18:07:49 GMT
References: <MBADER.89Jan9140035@deep.cs.washington.edu>
Sender: nobody@cs.Buffalo.EDU
Reply-To: ugwiles@sybil (Dale Wiles)
Distribution: comp.emacs
Organization: SUNY/Buffalo Computer Science
Lines: 21
In-reply-to: mbader@deep.cs.washington.edu (Mark P. Bader)