[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to associate more than two file-types as C code, code included
From: |
Mike H |
Subject: |
How to associate more than two file-types as C code, code included |
Date: |
Mon, 3 Dec 2007 14:50:46 -0800 (PST) |
User-agent: |
G2/1.0 |
I want the files .cu and .txx to be recognized as C files..
One block of the following codes works separately, but when I put them
together.. it doesn't work.
How should I do it ?
when ((string-match "\\.cu$" fn) || (string-match "\\.txx$" fn))
will something like above work? i tried, and it doesn't...
Thanks..
(defun my-find-file-hook()
(let ((fn (buffer-file-name)))
(when (string-match "\\.cu$" fn)
(c-mode))))
(add-hook 'find-file-hooks 'my-find-file-hook)
(defun my-find-file-hook()
(let ((fn (buffer-file-name)))
(when (string-match "\\.txx$" fn)
(c-mode))))
(add-hook 'find-file-hooks 'my-find-file-hook)
- How to associate more than two file-types as C code, code included,
Mike H <=
- Message not available