* modify .emacs
@ 2005-05-17 12:55 Michael Dewar
2005-05-18 0:39 ` Daniel Brockman
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Michael Dewar @ 2005-05-17 12:55 UTC (permalink / raw)
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))
But I don't know where to include them.
Thanks f or any help. Michael.
_________________________________________________________________
Winks & nudges are here - download MSN Messenger 7.0 today!
http://messenger.msn.co.uk
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: modify .emacs
2005-05-17 12:55 modify .emacs Michael Dewar
@ 2005-05-18 0:39 ` Daniel Brockman
2005-05-18 10:30 ` Peter Dyballa
[not found] ` <mailman.356.1116413686.25862.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 5+ messages in thread
From: Daniel Brockman @ 2005-05-18 0:39 UTC (permalink / raw)
"Michael Dewar" <fishliveroil@hotmail.com> writes:
> 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))
>
> But I don't know where to include them.
It doesn't matter. Just put them at the top of the file.
--
Daniel Brockman <daniel@brockman.se>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: modify .emacs
2005-05-17 12:55 modify .emacs Michael Dewar
2005-05-18 0:39 ` Daniel Brockman
@ 2005-05-18 10:30 ` Peter Dyballa
[not found] ` <mailman.356.1116413686.25862.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 5+ messages in thread
From: Peter Dyballa @ 2005-05-18 10:30 UTC (permalink / raw)
Cc: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: modify .emacs
[not found] ` <mailman.356.1116413686.25862.help-gnu-emacs@gnu.org>
@ 2005-05-18 22:21 ` Tim X
2005-05-18 23:05 ` Peter Dyballa
0 siblings, 1 reply; 5+ messages in thread
From: Tim X @ 2005-05-18 22:21 UTC (permalink / raw)
Peter Dyballa <Peter_Dyballa@Web.DE> writes:
> Am 17.05.2005 um 14:55 schrieb Michael Dewar:
>
>
> 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)))
>
Unless I'm missing something, the \\ doesn't have anything to do with
the end of a word - in the RE above, the \\ at the end of literal
atoms is introducing 'special' characters i.e. \\| indicates an
alternative and \\(...\\) a grouping which allows you to reference
parts of the match with $1, $2 etc. The $ matches the end of the
string your trying to match and is as far as I know the best and only
way to match the end of a string.
Tim
--
Tim Cross
The e-mail address on this message is FALSE (obviously!). My real e-mail is
to a company in Australia called rapttech and my login is tcross - if you
really need to send mail, you should be able to work it out!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: modify .emacs
2005-05-18 22:21 ` Tim X
@ 2005-05-18 23:05 ` Peter Dyballa
0 siblings, 0 replies; 5+ messages in thread
From: Peter Dyballa @ 2005-05-18 23:05 UTC (permalink / raw)
Cc: help-gnu-emacs
Am 19.05.2005 um 00:21 schrieb Tim X:
> Unless I'm missing something, the \\ doesn't have anything to do with
> the end of a word
It's ``\\'´´ that I wrote a few times ...
--
Greetings
Pete
"There's no place like 127.0.0.1"
origin unknown
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-05-18 23:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-17 12:55 modify .emacs Michael Dewar
2005-05-18 0:39 ` Daniel Brockman
2005-05-18 10:30 ` Peter Dyballa
[not found] ` <mailman.356.1116413686.25862.help-gnu-emacs@gnu.org>
2005-05-18 22:21 ` Tim X
2005-05-18 23:05 ` Peter Dyballa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).