[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#1243: Verilog mode hanging emacs 22.2
From: |
Stefan Monnier |
Subject: |
bug#1243: Verilog mode hanging emacs 22.2 |
Date: |
Mon, 27 Oct 2008 10:20:38 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
> I ran emacs under gdb, from within the src directory. I then edited the
> file that exhibits this problem and did a few incremental searches.
> This caused emacs to hang. I tried to break out of this from gdb using
> ctrl-c, which killed emacs so that I could not use xbacktrace. Then,
> from the gdb prompt I used: "handle SIGINT stop", got back to the hang,
> and tried ctrl-c again. I now was able to use xbacktrace, and see this:
> (gdb) xbacktrace
> "re-search-backward" (0x86f1eeb)
> "verilog-beg-of-defun" (0x87cfd85)
> "byte-code" (0x8234d13)
> "verilog-syntax-ppss" (0x831e8c9)
> "verilog-skip-backward-comment-or-string" (0x8811595)
> "verilog-beg-of-defun" (0x87cfd85)
> "byte-code" (0x8234d13)
> "verilog-syntax-ppss" (0x831e8c9)
I believe the patch below will fix it. Wilson, WDYT?
Stefan
--- verilog-mode.el.~1.24.~ 2008-09-12 12:39:48.000000000 -0400
+++ verilog-mode.el 2008-10-27 10:18:58.000000000 -0400
@@ -2373,6 +2373,8 @@
;; Fontify things in translate off regions
'(verilog-match-translate-off
(0 'verilog-font-lock-translate-off-face prepend))))))
+ ;; FIXME: This XEmacs setting is redundant with the setting done later
+ ;; for Emacs (because XEmacs obeys's Emacs setting as well).
(put 'verilog-mode 'font-lock-defaults
'((verilog-font-lock-keywords
verilog-font-lock-keywords-1
@@ -2560,10 +2562,17 @@
;; Stuff for GNU Emacs
(set (make-local-variable 'font-lock-defaults)
- '((verilog-font-lock-keywords verilog-font-lock-keywords-1
+ `((verilog-font-lock-keywords verilog-font-lock-keywords-1
verilog-font-lock-keywords-2
verilog-font-lock-keywords-3)
- nil nil nil verilog-beg-of-defun))
+ nil nil nil
+ ,(if (functionp 'syntax-ppss)
+ ;; verilog-beg-of-defun uses syntax-ppss, and syntax-ppss uses
+ ;; font-lock-beginning-of-syntax-function, so
+ ;; font-lock-beginning-of-syntax-function, can't use
+ ;; verilog-beg-of-defun.
+ nil
+ verilog-beg-of-defun)))
;;------------------------------------------------------------
;; now hook in 'verilog-colorize-include-files (eldo-mode.el&spice-mode.el)
;; all buffer local: