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




_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

Reply via email to