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)