LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-29-2012, 11:46 PM   #1
hydraMax
Member
 
Registered: Jul 2010
Location: Skynet
Distribution: Debian + Emacs
Posts: 467
Blog Entries: 60

Rep: Reputation: 51
emacs: change mode associated with file ending


Does anyone happen to know: In Emacs, how do I change which programming mode is associated with a particular file ending? I need to change the configuration so that *.pl files are opened in prolog-mode, instead of the default perl-mode.
 
Old 10-30-2012, 12:49 AM   #2
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,780

Rep: Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081
You need add an entry to auto-mode-alist:
Code:
(add-to-list 'auto-mode-alist '("\\.pl$" . prolog-mode))
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to change mode of tftp ,then get file and put file? programming in shell zobin Programming 3 02-25-2012 02:31 AM
[SOLVED] emacs console mode : change background colour ravi.xolve Linux - Hardware 4 11-09-2011 10:54 PM
emacs: minor mode font-mode-lock not on by default?! hewsonism Linux - Newbie 2 06-10-2010 01:32 PM
Automatic hs-minor-mode in Emacs for PHP mode? CoderMan Programming 1 06-12-2009 09:38 AM
Change file mode juno Linux - General 1 12-05-2002 07:35 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration