* emacs verilog mode
@ 2013-08-14 0:54 Paul Cheng
2013-08-14 4:52 ` Bob Proulx
0 siblings, 1 reply; 8+ messages in thread
From: Paul Cheng @ 2013-08-14 0:54 UTC (permalink / raw)
To: Peter Dyballa; +Cc: help-gnu-emacs@gnu.org
[-- Attachment #1: Type: text/plain, Size: 579 bytes --]
Hi,
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.
Thank you,
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.
[-- Attachment #2: init.el --]
[-- Type: application/octet-stream, Size: 6596 bytes --]
(put 'eval-expression 'disabled nil)
;;(load "hilit19")
(global-set-key "%" 'match-paren)
(global-set-key "\M-g" 'goto-line) ; [ESC]-[g]
; (global-set-key "\C-m" 'set-mark-command) ; CTRL-m --> works
; (global-set-key "\C-SPC" 'set-mark-command) ; Not yet working
; (global-set-key "C-cm" 'set-mark) --> doesn't work
;(define-key global-map "\C-<SPC>" 'set-mark)
(defun match-paren (arg)
"Go to the matching parenthesis if on parenthesis otherwise insert %."
(interactive "p")
(cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1))
((looking-at "\\s\)") (forward-char 1) (backward-list 1))
(t (self-insert-command (or arg 1)))))
;; Remove splash screen
(setq inhibit-splash-screen t)
(setq explicit-shell-file-name "/bin/tcsh")
(setq mail-archive-file-name "~/.Omail")
(setq default-major-mode 'text-mode)
; --- this is annoying
;(setq text-mode-hook '(lambda () (auto-fill-mode 1)))
;(setq explicit-shell-file-name "/bin/csh")
(defun find-file-new-window (filename)
(interactive "FFind file in a new window: ")
(split-window-vertically)
(find-file-other-window filename))
(defun prev-window ()
(interactive)
(other-window -1)
)
(defun justify-paragraph ()
(interactive)
(fill-paragraph t)
)
;;------- to fix the c-spc using gnome terminal
;;(global-set-key (kbd "SPC") 'cmd) ; the Space bar key
;(global-set-key (kbd "C-SPC") 'set-mark-cmd) ; doesn't work, let's try to unset C-@
;(global-set-key [f1] 'set-mark-cmd) ; emacs doesn't like f1 to overtake C-@
;;(global-unset-key (kbd "C-@")) ;; see if unset this would work;; this unsets C-@, but C-SPC still doesn't work
;;----------------------------------------------
;(global-set-key "\C-SPC" 'set-mark-command) ; C-SPC doesn't work; \C-SPC is bad; \C is flagged
(global-set-key "\C-x\C-v" 'find-file-new-window)
(global-set-key "\C-x\C-i" 'insert-file)
(global-set-key "\C-cs" 'shell)
(global-set-key "\C-xn" 'other-window)
(global-set-key "\C-xp" 'prev-window)
(global-set-key "\C-xd" 'delete-window)
(global-set-key "\C-h" 'delete-backward-char)
(global-set-key "\C-xl" 'what-line)
(global-set-key "\C-j" 'justify-paragraph)
(define-key lisp-interaction-mode-map "\C-c\C-e" 'eval-print-last-sexp)
(autoload 'byte-compile "bytecomp" "byte-compile a symbol")
(put 'eval-expression 'disabled nil)
(put 'narrow-to-region 'disabled nil)
(put 'narrow-to-page 'disabled nil)
; Sets the "REPLY" command to reply to the sender only, and not
; all recipients of the message.
;(setq rmail-dont-reply-to-names ".+")
;(autoload 'c++-mode "c++-mode" "C++ Editing Mode" t)
;(autoload 'vhdl-mode "vhdl-mode" "VHDL Editing Mode" t)
(setq auto-mode-alist
(append '(("\\.vhd$" . vhdl-mode) ("\\.C$" . c++-mode)
("\\.h$" . c++-mode) ("\\.ch$" . c++-mode)
) auto-mode-alist))
;; gnus
;;
;;(autoload 'gnus "gnus" "Read network news." t)
;; (autoload 'gnus-post-news "gnuspost" "Post a news." t)
;; gdb
;;(autoload 'gdb "gdb" "GDB." t)
;; Options Menu Settings
;; =====================
(cond
((and (string-match "XEmacs" emacs-version)
(boundp 'emacs-major-version)
(or (and
(= emacs-major-version 19)
(>= emacs-minor-version 14))
(= emacs-major-version 20))
(fboundp 'load-options-file))
(load-options-file "/home/yogesh/.xemacs-options")))
;; ============================
;; End of Options Menu Settings
;; MACROs for OneNAND Flash
(fset 'reg_prog_main
[(menu-bar) edit search search-forward ?$ ?q ?e ?l return (menu-bar) edit search search-forward ?. ?r ?a ?w return left left left left ?\C- (menu-bar) edit search search-backward ? return right (menu-bar) edit copy (menu-bar) edit search search-backward ?i ?n ?t ?_ ?m ?e ?m ?_ ?a ?r ?r ?a ?y return ?\C-y ?\C-d ?\C-d ?\C-d ?\C-d ?\C-d ?\C-d ?\C-d ?\C-d ?\C-d ?\C-d ?\C-d ?\C-d ?\C-d right right right right right right right right right right right right right right right right right right right (menu-bar) edit search search-forward ?- ?s ?t ?a ?r ?t return left left left left left left left ?" ?) ?\; ?\C- down ?\C-w down left left left ?\C-y ?\C-k (menu-bar) edit search search-backward ?% ?m return right right ?\C- ?i ?n ?t ?_ ?m ?e ?m ?_ ?a ?r ?r ?a ?y ?\C- (menu-bar) edit search search-forward ? return left ?\C-w])
(put 'set-goal-column 'disabled nil)
;;;====P. Cheng completion and set-mark-command
;;(require hippie-exp)
;(setq hippie-expand-try-functions-list
;(try-expand-dabbrev
;try-expand-dabbrev-all-buffers
;try-expand-dabbrev-from-kill
;try-complete-file-name-partially
;try-complete-file-name
;try-complete-lisp-symbol-partially
;try-complete-lisp-symbol
;try-expand-whole-kill))
;;also, I tend to use C-SPC for this instead of set-mark-command:
;(global-set-key (kbd C-SPC) hippie-expand)
; === describe-bindings
;====== set tabspace=4
;(setq c-basic-indent 2)
(setq-default indent-tabs-mode nil)
;(setq-default tab-width 4)
(setq default-tab-width 4)
;(setq tab-width 4)
(setq indent-line-function 'insert-tab)
; use the following to for tab stops
;(setq tab-stop-list '(4 8 12 16))
;=====to highlight tabs
; Sets tab width to 4.
(defun set-tab-width-4 ()
"Set the tab-width variable to 4."
(interactive)
(setq tab-width 4)
(redraw-display)
(message "*NOTE: Setting tab-width = 4")
)
; Sets tab width to 8.
(defun set-tab-width-8 ()
"Set the tab-width variable to 8."
(interactive)
(setq tab-width 8)
(redraw-display)
(message "*NOTE: Setting tab-width = 8")
)
; Sets tab width to 12.
(defun set-tab-width-12 ()
"Set the tab-width variable to 12."
(interactive)
(setq tab-width 12)
(redraw-display)
(message "*NOTE: Setting tab-width = 12")
)
;==== see if this will take care of indent caused by newline
;==== no use
;(add-hook 'verilog-mode-hook
; '(lambda ()
; (setq verilog-auto-newline nil
; verilog-tab-always-indent nil)))
;==== see if this helps; better but not quite
; `verilog-auto-indent-on-newline' (default nil)
(add-hook 'verilog-mode-hook
'(lambda ()
(define-key verilog-mode-map [newline] 'self-insert-command)))
;==== ; is just semicolon
(add-hook 'verilog-mode-hook
'(lambda ()
(define-key verilog-mode-map ";" 'self-insert-command)))
;==== macro for inserting verilog comment
(fset 'vericomment
(lambda (&optional arg) "Keyboard macro." (interactive "p") (kmacro-exec-ring-item (quote ([1 47 47 down] 0 "%d")) arg)))
;=====
(put 'upcase-region 'disabled nil)
(put 'downcase-region 'disabled nil)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: emacs verilog mode
2013-08-14 0:54 emacs verilog mode Paul Cheng
@ 2013-08-14 4:52 ` Bob Proulx
2013-08-14 16:27 ` Paul Cheng
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Bob Proulx @ 2013-08-14 4:52 UTC (permalink / raw)
To: Paul Cheng; +Cc: help-gnu-emacs@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
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: emacs verilog mode
2013-08-14 4:52 ` Bob Proulx
@ 2013-08-14 16:27 ` Paul Cheng
2013-09-08 23:52 ` Paul Cheng
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Paul Cheng @ 2013-08-14 16:27 UTC (permalink / raw)
To: Bob Proulx; +Cc: help-gnu-emacs@gnu.org
Bob,
>(setq verilog-auto-indent-on-newline nil)
This takes care of the issue.
Thanks so much,
Paul
-----Original Message-----
From: Bob Proulx [mailto:bob@proulx.com]
Sent: Tuesday, August 13, 2013 9:52 PM
To: Paul Cheng
Cc: Peter Dyballa; help-gnu-emacs@gnu.org
Subject: Re: emacs verilog mode
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
________________________________
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* emacs verilog mode
2013-08-14 4:52 ` Bob Proulx
2013-08-14 16:27 ` Paul Cheng
@ 2013-09-08 23:52 ` Paul Cheng
2013-09-09 0:05 ` Stefan Monnier
2013-10-28 21:57 ` Paul Cheng
[not found] ` <mailman.4860.1382997450.10748.help-gnu-emacs@gnu.org>
3 siblings, 1 reply; 8+ messages in thread
From: Paul Cheng @ 2013-09-08 23:52 UTC (permalink / raw)
To: Bob Proulx; +Cc: help-gnu-emacs@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
________________________________
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: emacs verilog mode
2013-08-14 4:52 ` Bob Proulx
2013-08-14 16:27 ` Paul Cheng
2013-09-08 23:52 ` Paul Cheng
@ 2013-10-28 21:57 ` Paul Cheng
2013-10-29 12:45 ` Stefan Monnier
[not found] ` <mailman.4860.1382997450.10748.help-gnu-emacs@gnu.org>
3 siblings, 1 reply; 8+ messages in thread
From: Paul Cheng @ 2013-10-28 21:57 UTC (permalink / raw)
To: Bob Proulx; +Cc: help-gnu-emacs@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-gnu-emacs@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?
Thanks,
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <mailman.4860.1382997450.10748.help-gnu-emacs@gnu.org>]
* Re: emacs verilog mode
[not found] ` <mailman.4860.1382997450.10748.help-gnu-emacs@gnu.org>
@ 2013-10-29 3:17 ` Rustom Mody
0 siblings, 0 replies; 8+ messages in thread
From: Rustom Mody @ 2013-10-29 3:17 UTC (permalink / raw)
To: help-gnu-emacs
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)))
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-10-29 12:45 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-14 0:54 emacs verilog mode Paul Cheng
2013-08-14 4:52 ` Bob Proulx
2013-08-14 16:27 ` Paul Cheng
2013-09-08 23:52 ` Paul Cheng
2013-09-09 0:05 ` Stefan Monnier
2013-10-28 21:57 ` Paul Cheng
2013-10-29 12:45 ` Stefan Monnier
[not found] ` <mailman.4860.1382997450.10748.help-gnu-emacs@gnu.org>
2013-10-29 3:17 ` Rustom Mody
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).