changeset 80267:c1d9521017f6

* verilog-mode.el (verilog-font-grouping-keywords): Fix bug in the grouping-keyword regular expression. (verilog-font-lock-keywords): Allow users to toggle special highlight of grouping-keywords. (verilog-highlight-grouping-keywords): The toggle for special highlighting of grouping keywords.
author Dan Nicolaescu <dann@ics.uci.edu>
date Mon, 03 Mar 2008 08:52:49 +0000
parents 191c9a6e1768
children b70bf168951d
files lisp/ChangeLog lisp/progmodes/verilog-mode.el
diffstat 2 files changed, 31 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Mon Mar 03 03:28:33 2008 +0000
+++ b/lisp/ChangeLog	Mon Mar 03 08:52:49 2008 +0000
@@ -1,3 +1,12 @@
+2008-03-03  Michael McNamara  <mac@mail.brushroad.com>
+
+	* verilog-mode.el (verilog-font-grouping-keywords): Fix bug in the
+	grouping-keyword regular expression.
+	(verilog-font-lock-keywords): Allow users to toggle special
+	highlight of grouping-keywords.
+	(verilog-highlight-grouping-keywords): The toggle for special
+	highlighting of grouping keywords.
+
 2008-03-02  Juri Linkov  <juri@jurta.org>
 
 	* startup.el: Revert 2008-02-28 change that adds initial message
--- a/lisp/progmodes/verilog-mode.el	Mon Mar 03 03:28:33 2008 +0000
+++ b/lisp/progmodes/verilog-mode.el	Mon Mar 03 08:52:49 2008 +0000
@@ -115,9 +115,9 @@
 ;;; Code:
 
 ;; This variable will always hold the version number of the mode
-(defconst verilog-mode-version "399"
+(defconst verilog-mode-version "404"
   "Version of this Verilog mode.")
-(defconst verilog-mode-release-date "2008-02-19-GNU"
+(defconst verilog-mode-release-date "2008-03-02-GNU"
   "Release date of this Verilog mode.")
 (defconst verilog-mode-release-emacs t
   "If non-nil, this version of Verilog mode was released with Emacs itself.")
@@ -531,6 +531,15 @@
   :type 'boolean)
 (put 'verilog-highlight-p1800-keywords 'safe-local-variable 'verilog-booleanp)
 
+(defcustom verilog-highlight-grouping-keywords nil
+  "*True means highlight grouping keywords 'begin' and 'end' more dramatically.
+If false, these words are in the font-lock-type-face; if True then they are in
+`verilog-font-lock-ams-face'. Some find that special highlighting on these
+grouping constructs allow the structure of the code to be understood at a glance."
+  :group 'verilog-mode-indent
+  :type 'boolean)
+(put 'verilog-highlight-p1800-keywords 'safe-local-variable verilog-booleanp)
+
 (defcustom verilog-auto-endcomments t
   "*True means insert a comment /* ... */ after 'end's.
 The name of the function or case will be set between the braces."
@@ -1899,14 +1908,17 @@
 	 ;; Fontify all builtin keywords
 	 (concat "\\<\\(" verilog-font-keywords "\\|"
 		       ;; And user/system tasks and functions
-		       "\\$[a-zA-Z][a-zA-Z0-9_\\$]*"
-		       "\\)\\>")
-	 ;; Fontify all types
-	 (cons (concat "\\(\\<" verilog-font-grouping-keywords "\\)\\>") 
-	       'verilog-font-lock-ams-face)
-	 (cons (concat "\\<\\(" verilog-type-font-keywords "\\)\\>") 
-	       'font-lock-type-face)
-	 ;; Fontify IEEE-P1800 keywords appropriately
+              "\\$[a-zA-Z][a-zA-Z0-9_\\$]*"
+              "\\)\\>")
+    ;; Fontify all types
+     (if verilog-highlight-grouping-keywords
+         (cons (concat "\\<\\(" verilog-font-grouping-keywords "\\)\\>")
+           'verilog-font-lock-ams-face)
+       (cons (concat "\\<\\(" verilog-font-grouping-keywords "\\)\\>")
+         'font-lock-type-face))
+    (cons (concat "\\<\\(" verilog-type-font-keywords "\\)\\>")
+          'font-lock-type-face)
+    ;; Fontify IEEE-P1800 keywords appropriately
 	 (if verilog-highlight-p1800-keywords
 	     (cons (concat "\\<\\(" verilog-p1800-keywords "\\)\\>")
 		   'verilog-font-lock-p1800-face)