[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r117227: Sync with upstream verilog-mode revision 3c
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] trunk r117227: Sync with upstream verilog-mode revision 3cd8144 |
Date: |
Mon, 02 Jun 2014 06:45:25 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117227
revision-id: address@hidden
parent: address@hidden
author: Wilson Snyder <address@hidden>
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sun 2014-06-01 23:45:11 -0700
message:
Sync with upstream verilog-mode revision 3cd8144
* lisp/progmodes/verilog-mode.el (verilog-mode-version): Bump.
(verilog-auto-arg-format): New option, to support newlines in AUTOARG.
(verilog-type-font-keywords): Add nor.
(verilog-batch-execute-func): Force reading of Local Variables.
Fix printing "no changes to be saved" with verilog-batch.
(verilog-auto-arg-ports): Doc fix.
Add verilog-auto-arg-format to support newlines in AUTOARG.
(verilog-auto-arg): Doc fix.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/progmodes/verilog-mode.el
verilogmode.el-20091113204419-o5vbwnq5f7feedwu-8207
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-06-02 01:10:07 +0000
+++ b/lisp/ChangeLog 2014-06-02 06:45:11 +0000
@@ -1,3 +1,15 @@
+2014-06-02 Wilson Snyder <address@hidden>
+
+ Sync with upstream verilog-mode revision 3cd8144.
+ * progmodes/verilog-mode.el (verilog-mode-version): Bump.
+ (verilog-auto-arg-format): New option, to support newlines in AUTOARG.
+ (verilog-type-font-keywords): Add nor.
+ (verilog-batch-execute-func): Force reading of Local Variables.
+ Fix printing "no changes to be saved" with verilog-batch.
+ (verilog-auto-arg-ports): Doc fix.
+ Add verilog-auto-arg-format to support newlines in AUTOARG.
+ (verilog-auto-arg): Doc fix.
+
2014-06-02 Glenn Morris <address@hidden>
* emulation/crisp.el, emulation/tpu-edt.el, emulation/tpu-extras.el:
=== modified file 'lisp/progmodes/verilog-mode.el'
--- a/lisp/progmodes/verilog-mode.el 2014-05-29 03:45:29 +0000
+++ b/lisp/progmodes/verilog-mode.el 2014-06-02 06:45:11 +0000
@@ -123,7 +123,7 @@
;;; Code:
;; This variable will always hold the version number of the mode
-(defconst verilog-mode-version "2014-03-15-702457d-vpo"
+(defconst verilog-mode-version "2014-05-31-3cd8144-vpo"
"Version of this Verilog mode.")
(defconst verilog-mode-release-emacs t
"If non-nil, this version of Verilog mode was released with Emacs itself.")
@@ -1020,6 +1020,20 @@
:type 'string)
(put 'verilog-assignment-delay 'safe-local-variable 'stringp)
+(defcustom verilog-auto-arg-format 'packed
+ "Formatting to use for AUTOARG signal names.
+If 'packed', then as many inputs and outputs that fit within
+`fill-column' will be put onto one line.
+
+If 'single', then a single input or output will be put onto each
+line."
+ :version "24.5"
+ :type '(radio (const :tag "Line up Assignments and Declarations" packed)
+ (const :tag "Line up Assignment statements" single))
+ :group 'verilog-mode-auto)
+(put 'verilog-auto-arg-format 'safe-local-variable
+ '(lambda (x) (memq x '(packed single))))
+
(defcustom verilog-auto-arg-sort nil
"Non-nil means AUTOARG signal names will be sorted, not in declaration order.
Declaration order is advantageous with order based instantiations
@@ -2907,7 +2921,7 @@
'(
"and" "bit" "buf" "bufif0" "bufif1" "cmos" "defparam"
"event" "genvar" "inout" "input" "integer" "localparam"
- "logic" "mailbox" "nand" "nmos" "not" "notif0" "notif1" "or"
+ "logic" "mailbox" "nand" "nmos" "nor" "not" "notif0" "notif1" "or"
"output" "parameter" "pmos" "pull0" "pull1" "pulldown" "pullup"
"rcmos" "real" "realtime" "reg" "rnmos" "rpmos" "rtran"
"rtranif0" "rtranif1" "semaphore" "signed" "struct" "supply"
@@ -5144,23 +5158,29 @@
;; Make sure any sub-files we read get proper mode
(setq-default major-mode 'verilog-mode)
;; Ditto files already read in
- (mapc (lambda (buf)
- (when (buffer-file-name buf)
- (with-current-buffer buf
- (verilog-mode))))
- (buffer-list))
- ;; Process the files
- (mapcar (lambda (buf)
+ ;; Remember buffer list, so don't later pickup any verilog-getopt files
+ (let ((orig-buffer-list (buffer-list)))
+ (mapc (lambda (buf)
(when (buffer-file-name buf)
- (save-excursion
- (if (not (file-exists-p (buffer-file-name buf)))
- (error
- (concat "File not found: " (buffer-file-name buf))))
- (message (concat "Processing " (buffer-file-name buf)))
- (set-buffer buf)
- (funcall funref)
- (unless no-save (save-buffer)))))
- (buffer-list))))
+ (with-current-buffer buf
+ (verilog-mode)
+ (verilog-auto-reeval-locals)
+ (verilog-getopt-flags))))
+ orig-buffer-list)
+ ;; Process the files
+ (mapcar (lambda (buf)
+ (when (buffer-file-name buf)
+ (save-excursion
+ (if (not (file-exists-p (buffer-file-name buf)))
+ (error
+ (concat "File not found: " (buffer-file-name buf))))
+ (message (concat "Processing " (buffer-file-name buf)))
+ (set-buffer buf)
+ (funcall funref)
+ (when (and (not no-save)
+ (buffer-modified-p)) ;; Avoid "no changes to be
saved"
+ (save-buffer)))))
+ orig-buffer-list))))
(defun verilog-batch-auto ()
"For use with --batch, perform automatic expansions as a stand-alone tool.
@@ -9639,7 +9659,7 @@
allow-cache
(setq modi (gethash module verilog-modi-lookup-cache))
(equal verilog-modi-lookup-last-current current)
- ;; Iff hit is in current buffer, then tick must match
+ ;; If hit is in current buffer, then tick must match
(or (equal verilog-modi-lookup-last-tick
(buffer-chars-modified-tick))
(not (equal current (verilog-modi-file-or-buffer modi)))))
;;(message "verilog-modi-lookup: HIT %S" modi)
@@ -10617,7 +10637,7 @@
;;
(defun verilog-auto-arg-ports (sigs message indent-pt)
- "Print a list of ports for an AUTOINST.
+ "Print a list of ports for AUTOARG.
Takes SIGS list, adds MESSAGE to front and inserts each at INDENT-PT."
(when sigs
(when verilog-auto-arg-sort
@@ -10629,13 +10649,19 @@
(let ((space ""))
(indent-to indent-pt)
(while sigs
- (cond ((> (+ 2 (current-column) (length (verilog-sig-name (car sigs))))
fill-column)
+ (cond ((equal verilog-auto-arg-format 'single)
+ (indent-to indent-pt)
+ (setq space "\n"))
+ ;; verilog-auto-arg-format 'packed
+ ((> (+ 2 (current-column) (length (verilog-sig-name (car sigs))))
fill-column)
(insert "\n")
- (indent-to indent-pt))
- (t (insert space)))
+ (indent-to indent-pt)
+ (setq space " "))
+ (t
+ (insert space)
+ (setq space " ")))
(insert (verilog-sig-name (car sigs)) ",")
- (setq sigs (cdr sigs)
- space " ")))))
+ (setq sigs (cdr sigs))))))
(defun verilog-auto-arg ()
"Expand AUTOARG statements.
@@ -10670,9 +10696,11 @@
output o;
endmodule
-The argument declarations may be printed in declaration order to best suit
-order based instantiations, or alphabetically, based on the
-`verilog-auto-arg-sort' variable.
+The argument declarations may be printed in declaration order to
+best suit order based instantiations, or alphabetically, based on
+the `verilog-auto-arg-sort' variable.
+
+Formatting is controlled with `verilog-auto-arg-format' variable.
Any ports declared between the ( and /*AUTOARG*/ are presumed to be
predeclared and are not redeclared by AUTOARG. AUTOARG will make a
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r117227: Sync with upstream verilog-mode revision 3cd8144,
Glenn Morris <=