arduino-mode
arduino-mode copied to clipboard
Emacs freezes after typing `#include "'
I started using this mode but it seems something is not working right. The problem occurs after I typed in the first double-quote in the same line as #include. something is runnung a infinite loop but no idea. (searching the library path?) I've tested with Abbrev, gtags and doxymacs turned off but the same things happen.
Ubuntu 12.04LTS, emacs 23.3.1 grabbed the latest arduino-mode from github, related code snipplets in emacs:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; doxymacs
(lazyload 'doxymacs-mode "doxymacs")
(lazyload 'gtags-mode "gtags")
(add-hook 'c-mode-common-hook
'(lambda()
(gtags-mode 1)
(gtags-make-complete-list)))
(add-hook 'c-mode-common-hook 'doxymacs-mode)
(add-hook 'c++-mode-hook 'doxymacs-mode)
(defun bind-m-ret-to-comment-line ()
(define-key c-mode-map (kbd "<M-return>") 'c-indent-new-comment-line))
(add-hook 'c-mode-hook 'bind-m-ret-to-comment-line)
(add-hook 'c++-mode-hook 'bind-m-ret-to-comment-line)
(defun my-doxymacs-font-lock-hook ()
(if (or (eq major-mode 'c-mode) (eq major-mode 'c++-mode))
(doxymacs-font-lock)))
(add-hook 'font-lock-mode-hook 'my-doxymacs-font-lock-hook)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; Arduino mode
(add-to-list 'load-path (site "arduino-mode/"))
(add-to-list 'auto-mode-alist
'("\\.\\(pde\\|ino\\)$" . arduino-mode))
(lazyload 'arduino-mode "arduino-mode")
Putting a #include ""' in .cpp and renaming the file with extention .ino is ok. However if I add another
"' it freezes again.
#include <> is ok.
I have the same trouble with #define the trouble is the # itself
you can use C-g to un-freeze and edit your file.