Fix issues with deriving too much from c++-mode
This commit is contained in:
parent
424e721d64
commit
f10cee0930
12
cuda-mode.el
12
cuda-mode.el
@ -298,7 +298,8 @@ Each list item should be a regexp matching a single identifier."
|
|||||||
;; syntactic context, and which therefore should trig reindentation
|
;; syntactic context, and which therefore should trig reindentation
|
||||||
;; when they are completed.
|
;; when they are completed.
|
||||||
'(("else" "else" c-electric-continued-statement 0)
|
'(("else" "else" c-electric-continued-statement 0)
|
||||||
("while" "while" c-electric-continued-statement 0)))
|
("while" "while" c-electric-continued-statement 0)
|
||||||
|
("catch" "catch" c-electric-continued-statement 0)))
|
||||||
|
|
||||||
(defvar cuda-mode-map (let ((map (c-make-inherited-keymap)))
|
(defvar cuda-mode-map (let ((map (c-make-inherited-keymap)))
|
||||||
;; Add bindings which are only useful for CUDA
|
;; Add bindings which are only useful for CUDA
|
||||||
@ -314,8 +315,7 @@ Each list item should be a regexp matching a single identifier."
|
|||||||
(cons "CUDA" (c-lang-const c-mode-menu cuda)))
|
(cons "CUDA" (c-lang-const c-mode-menu cuda)))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(add-to-list 'auto-mode-alist '("\\.cu\\'" . cuda-mode))
|
(add-to-list 'auto-mode-alist '("\\.cuh?\\'" . cuda-mode))
|
||||||
(add-to-list 'auto-mode-alist '("\\.cuh\\'" . cuda-mode))
|
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(define-derived-mode cuda-mode prog-mode "CUDA" ()
|
(define-derived-mode cuda-mode prog-mode "CUDA" ()
|
||||||
@ -329,14 +329,12 @@ initialization, then `cuda-mode-hook'.
|
|||||||
Key bindings:
|
Key bindings:
|
||||||
\\{cuda-mode-map}"
|
\\{cuda-mode-map}"
|
||||||
(c-initialize-cc-mode t)
|
(c-initialize-cc-mode t)
|
||||||
(set-syntax-table cuda-mode-syntax-table)
|
(setq abbrev-mode t)
|
||||||
(setq local-abbrev-table cuda-mode-abbrev-table
|
|
||||||
abbrev-mode t)
|
|
||||||
(use-local-map c-mode-map)
|
(use-local-map c-mode-map)
|
||||||
;; `c-init-language-vars' is a macro that is expanded at compile
|
;; `c-init-language-vars' is a macro that is expanded at compile
|
||||||
;; time to a large `setq' with all the language variables and their
|
;; time to a large `setq' with all the language variables and their
|
||||||
;; customized values for our language.
|
;; customized values for our language.
|
||||||
(c-init-language-vars-for 'cuda-mode)
|
(c-init-language-vars cuda-mode)
|
||||||
;; `c-common-init' initializes most of the components of a CC Mode
|
;; `c-common-init' initializes most of the components of a CC Mode
|
||||||
;; buffer, including setup of the mode menu, font-lock, etc.
|
;; buffer, including setup of the mode menu, font-lock, etc.
|
||||||
;; There's also a lower level routine `c-basic-common-init' that
|
;; There's also a lower level routine `c-basic-common-init' that
|
||||||
|
Loading…
Reference in New Issue
Block a user