help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: comment / uncomment region


From: exits funnel
Subject: Re: comment / uncomment region
Date: Mon, 2 Aug 2004 20:12:30 -0700 (PDT)

> Or, if you don't want to program a mode for your
> grammar files you
> could have a find-file-hook that would check the
> file type (or file
> name extension) and would initialize the buffer
> environment when it
> finds that a grammar is being opened. Something
> like:
> 
> (add-hook 'find-file-hook
>      (lambda () 
>         (when (string-match "\\.grammar$"
> (buffer-file-name))
>            (setf comment-start "//")
>            ;; ...
>            )))

Actually, I was surprised to find that adding this to
my .emacs file didn't have any affect.  If I replaced
the setf with a call to message( ) it similarly was
not being exectued when I visited a .grammar file. 
I'm running emacs 21.3.1 on Redhat Linux.  This seems
simple enough.  Any thoughts?  Thanks.

-exits




                
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail




reply via email to

[Prev in Thread] Current Thread [Next in Thread]