Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: emacs verilog mode

398 views
Skip to first unread message

Bob Proulx

unread,
Aug 14, 2013, 12:52:03 AM8/14/13
to Paul Cheng, help-gn...@gnu.org
Paul Cheng wrote:
> Emacs would reformat my verilog file after I press enter/return, is
> there any way to stop it from doing that? My init.el is attached.

That sounds like the behavior of verilog-auto-indent-on-newline.

"Non-nil means automatically indent line after newline."

Check the value of that variable. Set it to nil if you want to turn
that behavior off.

M-x set-variable
verilog-auto-indent-on-newline
nil

If that is the behavior you want to change then you can set that
variable in your startup file.

(setq verilog-auto-indent-on-newline nil)

If it is a different behavior then please say some more words about
the problem. And also if you could include a very small snippet that
we could use that would recreate the problem it would help.

Bob

Paul Cheng

unread,
Aug 14, 2013, 12:27:50 PM8/14/13
to Bob Proulx, help-gn...@gnu.org
Bob,

>(setq verilog-auto-indent-on-newline nil)
This takes care of the issue.

Thanks so much,

Paul
________________________________

This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.

Paul Cheng

unread,
Sep 8, 2013, 7:52:02 PM9/8/13
to Bob Proulx, help-gn...@gnu.org
How do I prevent emacs from auto-indent on ';' (semicolon)? I can do this for newline (setq verilog-auto-indent-on-newline nil)

However, it doesn't seem to work for semicolon like:
(setq verilog-auto-indent-on-semicolon nil)

Is there a global command to disable all the verilog-auto-indent?

Thanks,
Paul

Stefan Monnier

unread,
Sep 8, 2013, 8:05:53 PM9/8/13
to help-gn...@gnu.org
> Is there a global command to disable all the verilog-auto-indent?

Emacs-24 introduced electric-indent-mode which is meant to control
those things. But major modes have to be changed to make use of it.
So you might report a bug about the fact that verilog doesn't use
electric-indent-mode.


Stefan


Paul Cheng

unread,
Oct 28, 2013, 5:57:10 PM10/28/13
to Bob Proulx, help-gn...@gnu.org
Resend my earlier email.

I have tried/searched various methods to no avail on how to stop emacs from reformatting on ';' (semicolon) in verilog mode.
Please let me know if there's a solution.

Paul
-----Original Message-----
From: Paul Cheng
Sent: Sunday, September 08, 2013 4:52 PM
To: 'Bob Proulx'
Cc: Peter Dyballa; help-gn...@gnu.org
Subject: emacs verilog mode

How do I prevent emacs from auto-indent on ';' (semicolon)? I can do this for newline (setq verilog-auto-indent-on-newline nil)

However, it doesn't seem to work for semicolon like:
(setq verilog-auto-indent-on-semicolon nil)

Is there a global command to disable all the verilog-auto-indent?

Rustom Mody

unread,
Oct 28, 2013, 11:17:49 PM10/28/13
to
On Tuesday, October 29, 2013 3:27:10 AM UTC+5:30, Paul Cheng wrote:
> Resend my earlier email.
>
>
> I have tried/searched various methods to no avail on how to stop emacs from reformatting on ';' (semicolon) in verilog mode.
>
> Please let me know if there's a solution.

This is a poor hack; however since its a 5-month old complaint and still unaddressed, can you try adding this to your init file? Does it work?

(add-hook 'verilog-mode-hook
(lambda () (define-key verilog-mode-map ";" 'self-insert-command)))

Stefan Monnier

unread,
Oct 29, 2013, 8:45:51 AM10/29/13
to help-gn...@gnu.org
> I have tried/searched various methods to no avail on how to stop emacs from
> reformatting on ';' (semicolon) in verilog mode.
> Please let me know if there's a solution.

verilog-mode should obey electric-indent-mode, so please report this as
a bug.


Stefan


0 new messages