arduino-mode icon indicating copy to clipboard operation
arduino-mode copied to clipboard

Emacs freezes after typing `#include "'

Open guicho271828 opened this issue 11 years ago • 4 comments

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

guicho271828 avatar Apr 06 '13 05:04 guicho271828

Putting a #include ""' in .cpp and renaming the file with extention .ino is ok. However if I add another"' it freezes again.

guicho271828 avatar Apr 06 '13 06:04 guicho271828

#include <> is ok.

guicho271828 avatar Apr 06 '13 06:04 guicho271828

I have the same trouble with #define the trouble is the # itself

roastercode avatar Nov 11 '14 09:11 roastercode

you can use C-g to un-freeze and edit your file.

roastercode avatar Nov 12 '14 16:11 roastercode