all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to associate more than two file-types as C code, code included
@ 2007-12-03 22:50 Mike H
  2007-12-03 23:56 ` Lennart Borgman (gmail)
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Mike H @ 2007-12-03 22:50 UTC (permalink / raw)
  To: help-gnu-emacs

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)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-12-04 17:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-03 22:50 How to associate more than two file-types as C code, code included Mike H
2007-12-03 23:56 ` Lennart Borgman (gmail)
2007-12-04 12:59 ` Peter Dyballa
     [not found] ` <mailman.4464.1196726225.18990.help-gnu-emacs@gnu.org>
2007-12-04 17:27   ` Mike H
     [not found] ` <mailman.4488.1196773183.18990.help-gnu-emacs@gnu.org>
2007-12-04 17:27   ` Mike H

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.