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

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

Re: Emacs . How can I associate *.cu files as cc mode as a default ?


From: Tyler Smith
Subject: Re: Emacs . How can I associate *.cu files as cc mode as a default ?
Date: 19 Sep 2007 02:01:59 GMT
User-agent: slrn/0.9.8.1pl1 (Debian)

On 2007-09-19, Mike H <hspnew@gmail.com> wrote:
> Just one thing ,
>
> When I put those scripts in, and when I open *.cu files,
> I get the following...
>
> Symbol's function definition is void
>

It should be (c-mode), not (cc-mode). The following works for
me:

(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)

Tyler



reply via email to

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