[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: comment / uncomment region
From: |
Stefan Monnier |
Subject: |
Re: comment / uncomment region |
Date: |
Tue, 03 Aug 2004 14:16:59 GMT |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
> Sorry, there's an 's' at find-file-hooks:
Actually in Emacs-CVS this was fixed: you can now use find-file-hook
without the `s', as god intended.
> (add-hook 'find-file-hooks
> (lambda ()
> (when (string-match "\\.grammar$" (buffer-file-name))
> (setf comment-start "//")
> ;; ...
> )))
> With this variable, it works.
But it's still extremely poor style.
It should really be something like
(define-derived-mode sablecc-grammar-mode java-mode "SableCC-Gram"
"Major mode for SableCC grammar files."
;; We should do something here, but we can start by leaving things as they
;; are in java.
)
(add-to-list 'auto-mode-alist '("\\.grammar\\'" . sablecc-grammar-mode))
-- Stefan