*** Note: I am not the original author of the cuda.el file. I am compiling the notes from my searches on the topic ***
*** Note 2: I was not able to do syntax highlighting on emacs 23. This only works on xemacs ***

1. To get xemacs

sudo apt-get install xemacs21

2. Add the following to lines to your ~/.xemacs/init.el

(autoload 'cuda-mode "~/.emacs.d/cuda-mode.el" "Cuda mode." t)
(setq auto-mode-alist (append '(("\\.cu$" . cuda-mode)) auto-mode-alist)

3. create a file ~/xemacs/cuda-mode.el or download from here
4. open your .cu file using xemacs.

Edit: to use on emacs remove the defconst lines in cuda-mode.el file.

Advertisements