Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imporve[indent]: to behind of delay ctrl of assignment #1883

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions tests/indent_delay_assignment.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module a();
always(*)begin
a = #1 b |
c |
d;
a <= #1 b |
c |
d;
Comment on lines +6 to +8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
a <= #1 b |
c |
d;
a <= #1 b |
c |
d;
a <= # 1 b |
c |
d;


end
endmodule
11 changes: 11 additions & 0 deletions tests_ok/indent_delay_assignment.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module a();
always(*)begin
a = #1 b |
c |
d;
a <= #1 b |
c |
d;

end
endmodule
2 changes: 1 addition & 1 deletion verilog-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -7242,7 +7242,7 @@ Only look at a few lines to determine indent level."
(verilog-beg-of-statement-1)
(let ((val
(if (and (< (point) here)
(verilog-re-search-forward "=[ \t]*" here 'move)
(verilog-re-search-forward "=[ \t]*\\(#[0-9]+[ \t]*\\)?" here 'move)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(verilog-re-search-forward "=[ \t]*\\(#[0-9]+[ \t]*\\)?" here 'move)
(verilog-re-search-forward "=[ \t]*\\(#[ \t]*[0-9]+[ \t]*\\)?" here 'move)

;; not at a |=>, #=#, or [=n] operator
(not (string-match "\\[=.\\|#=#\\||=>"
(or (buffer-substring
Expand Down