Mercurial > emacs
diff lisp/progmodes/verilog-mode.el @ 101958:e2dc5f14229e
(verilog-mode): Avoid circular use of syntax-ppss.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Thu, 12 Feb 2009 05:34:26 +0000 |
parents | 3b3c7e10cd97 |
children | af77bf73dfe0 |
line wrap: on
line diff
--- a/lisp/progmodes/verilog-mode.el Thu Feb 12 04:31:01 2009 +0000 +++ b/lisp/progmodes/verilog-mode.el Thu Feb 12 05:34:26 2009 +0000 @@ -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 Emacs's 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: