You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When run the verilog-goto-defun command in verilog file buffer, the functions and tasks are not listed as candidates.
As in the verilog-build-defun-re function, the original regexp only match with function/task start with no leading spaces and not taking "automatic|static" keywords and return type before function name into account.
(defun verilog-build-defun-re (str &optional arg)
"Return function/task/module starting with STR as regular expression.
With optional second ARG non-nil, STR is the complete name of the instruction."
(if arg
(concat "^\\(function\\|task\\|module\\)[ \t]+\\(" str "\\)\\>")
(concat "^\\(function\\|task\\|module\\)[ \t]+\\(" str "[a-zA-Z0-9_ ]*\\)\\>")))
I did a little bit local hack as below, the function and task names are presented as candidates now:
(defun verilog-build-defun-re (str &optional arg)
"Return function/task/module starting with STR as regular expression.
With optional second ARG non-nil, STR is the complete name of the instruction."
(if arg
(concat "^[ \t]*\\(function\\|task\\|module\\)[ \t]+\\(automatic\\|static\\)*\\(" str "\\)\\>")
(concat "^[ \t]*\\(function\\|task\\|module\\)[ \t]+\\(automatic\\|static\\)*\\(" str "[a-zA-Z0-9_ ]*\\)\\>")))
Also tweak required for verilog-comp-defun as more matched items may be found.
As the swiper package does great job for searching, it maybe good to delicate this functionality to it. The "class|package|interface", etc can all be found easily.
The text was updated successfully, but these errors were encountered:
Author Name: Enze Chi
Original Redmine Issue: 1492 from https://www.veripool.org
Original Assignee: Wilson Snyder (@wsnyder)
When run the
verilog-goto-defun
command in verilog file buffer, the functions and tasks are not listed as candidates.As in the
verilog-build-defun-re
function, the original regexp only match with function/task start with no leading spaces and not taking "automatic|static" keywords and return type before function name into account.I did a little bit local hack as below, the function and task names are presented as candidates now:
Also tweak required for
verilog-comp-defun
as more matched items may be found.As the
swiper
package does great job for searching, it maybe good to delicate this functionality to it. The "class|package|interface", etc can all be found easily.The text was updated successfully, but these errors were encountered: