[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: modify .emacs
From: |
Peter Dyballa |
Subject: |
Re: modify .emacs |
Date: |
Wed, 18 May 2005 12:30:55 +0200 |
Am 17.05.2005 um 14:55 schrieb Michael Dewar:
I use M-x customize, I'm told to add these lines to .emacs
(autoload gp-mode "pari" nil t)
(autoload gp-script-mode "pari" nil t)
(autoload gp "pari" nil t)
(autoload gpman "pari" nil t)
(setq auto-mode-alist
(cons ("\\.gp$" . gp-script-mode) auto-mode-alist))
When customizing your Emacs you don't need to add anything to .emacs
because in the customize buffers you press the button to save your
customization for further use and Emacs does all for you.
If you need to add the lines above to .emacs then just do it! Usually
any place is good outside the customize clauses. It's good too to add
them in a "block," with empty lines before and afterwards and a comment
for what and why (and when ?) they were added. If you add more than one
cons to auto-mode-alist you can merge them together. It was said on
this list that \\' is a more precise description of a file name's end
than $. When using more excessively the regular expressions the code
can become very hard to understand:
(setq auto-mode-alist
(append
'(("\\.\\(xsl\\|id\\[de\\]\\)\\'" . sgml-mode)
("\\.\\(plist\\|xml\\|xsl\\|fo\\)\\'" . xml-mode)
("\\.\\(tgz\\|tar\\.\\(bz2\\|gz\\|Z\\)\\)\\'" . tar-mode)
("\\.\\(arc\\|jar\\|lzh\\|zip\\|zoo\\)\\'" . tar-mode)
auto-mode-alist)))
--
Greetings
Pete
“Computers are good at following instructions, but not at reading your
mind.”
- D. E. Knuth, The TeXbook, Addison-Wesley 1984, 1986, 1996, p. 9