Skip to content

Commit

Permalink
Add option to enable/disable variable fontification.
Browse files Browse the repository at this point in the history
* verilog-mode.el (Line#939, verilog-declaration-varname-matcher,
verilog-fontify-variables, verilog-submit-bug-report):
Add option to enable/disable variable fontification.

Signed-off-by: Gonzalo Larumbe <[email protected]>
  • Loading branch information
gmlarumbe committed Sep 15, 2022
1 parent 03f0c08 commit 75abe7a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion verilog-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,12 @@ always be saved."
:type 'boolean)
(put 'verilog-auto-star-save 'safe-local-variable #'verilog-booleanp)

(defcustom verilog-fontify-variables t
"Non-nil means fontify declaration variables."
:group 'verilog-mode-actions
:type 'boolean)
(put 'verilog-fontify-variables 'safe-local-variable #'verilog-booleanp)

(defvar verilog-auto-update-tick nil
"Modification tick at which autos were last performed.")

Expand Down Expand Up @@ -3743,7 +3749,8 @@ This function moves POINT to the next variable within the same declaration (if
it exists).
LIMIT is expected to be the pos at which current single-declaration ends,
obtained using `verilog-single-declaration-end'."
(when (not (member (thing-at-point 'symbol) verilog-keywords))
(when (and verilog-fontify-variables
(not (member (thing-at-point 'symbol) verilog-keywords)))
(let (found-var old-point)
;; Remove starting whitespace
(verilog-forward-ws&directives limit)
Expand Down Expand Up @@ -15501,6 +15508,7 @@ Files are checked based on `verilog-library-flags'."
verilog-compiler
verilog-coverage
verilog-delete-auto-hook
verilog-fontify-variables
verilog-getopt-flags-hook
verilog-highlight-grouping-keywords
verilog-highlight-includes
Expand Down

0 comments on commit 75abe7a

Please sign in to comment.