Skip to content

Commit e3d5be9

Browse files
authored
Fix leaving extra spaces before tabs on lining up declarations. (#1723)
* verilog-mode.el (verilog-indent-declaration, verilog-pretty-declarations): Reported by TAKAI Kousuke.
1 parent 2559a8c commit e3d5be9

File tree

4 files changed

+16
-20
lines changed

4 files changed

+16
-20
lines changed

tests_batch_ok/autoinout.v

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ module instio (/*AUTOARG*/
6060
inout sec_io;
6161
output sec_out;
6262

63-
wire lower_out = lower_ina | lower_io;
64-
wire sec_out = sec_ina | sec_io;
63+
wire lower_out = lower_ina | lower_io;
64+
wire sec_out = sec_ina | sec_io;
6565

6666
endmodule
6767

tests_batch_ok/autoinst_lopaz.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module io1_sub(
22
/*AUTOARG*/);
33

44
wire [42:0] bscan_data; // boundary scan stitch
5-
parameter bscan_count = 0;
5+
parameter bscan_count = 0;
66

77
assign bscan_data[0] = bscan_in;
88

tests_batch_ok/autoinst_star.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module io1_sub (/*AUTOARG*/);
33
/*AUTOWIRE*/
44
// Beginning of automatic wires (for undeclared instantiated-module outputs)
55
wire [w-1:0] pin; // To/From MD31_pad of autoinst_lopaz_srpad.v
6-
wire [2*w-1:0] pin_in; // From MD31_pad of autoinst_lopaz_srpad.v, ...
6+
wire [2*w-1:0] pin_in; // From MD31_pad of autoinst_lopaz_srpad.v, ...
77
wire templated; // To/From MD31_pad of autoinst_lopaz_srpad.v
88
// End of automatics
99

verilog-mode.el

+12-16
Original file line numberDiff line numberDiff line change
@@ -7157,11 +7157,11 @@ Be verbose about progress unless optional QUIET set."
71577157
(forward-char -1)
71587158
(just-one-space)
71597159
(goto-char (marker-position m1))
7160-
(just-one-space)
7161-
(indent-to ind))
7160+
(delete-horizontal-space)
7161+
(indent-to ind 1))
71627162
(progn
7163-
(just-one-space)
7164-
(indent-to ind)))))
7163+
(delete-horizontal-space)
7164+
(indent-to ind 1)))))
71657165
((verilog-continued-line-1 (marker-position startpos))
71667166
(goto-char e)
71677167
(indent-line-to ind))
@@ -7324,12 +7324,10 @@ BASEIND is the base indent to offset everything."
73247324
(forward-char -1)
73257325
(just-one-space)
73267326
(goto-char (marker-position m1))
7327-
(just-one-space)
7328-
(indent-to ind))
7329-
(if (/= (current-column) ind)
7330-
(progn
7331-
(just-one-space)
7332-
(indent-to ind)))))
7327+
(delete-horizontal-space)
7328+
(indent-to ind 1))
7329+
(delete-horizontal-space)
7330+
(indent-to ind 1)))
73337331
(if (looking-at verilog-declaration-re-2-no-macro)
73347332
(let ((p (match-end 0)))
73357333
(set-marker m1 p)
@@ -7338,12 +7336,10 @@ BASEIND is the base indent to offset everything."
73387336
(forward-char -1)
73397337
(just-one-space)
73407338
(goto-char (marker-position m1))
7341-
(just-one-space)
7342-
(indent-to ind))
7343-
(if (/= (current-column) ind)
7344-
(progn
7345-
(just-one-space)
7346-
(indent-to ind))))))))))
7339+
(delete-horizontal-space)
7340+
(indent-to ind 1))
7341+
(delete-horizontal-space)
7342+
(indent-to ind 1))))))))
73477343
(goto-char pos)))
73487344

73497345
(defun verilog-get-lineup-indent (b edpos)

0 commit comments

Comments
 (0)