emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100167: * progmodes/verilog-mode.


From: Dan Nicolaescu
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-23 r100167: * progmodes/verilog-mode.el (verilog-insert-one-definition)
Date: Sat, 06 Nov 2010 00:54:19 -0700
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100167
author: Wilson Snyder <address@hidden>
committer: Dan Nicolaescu <address@hidden>
branch nick: emacs-23
timestamp: Sat 2010-11-06 00:54:19 -0700
message:
  * progmodes/verilog-mode.el (verilog-insert-one-definition)
  (verilog-read-decls, verilog-read-sub-decls-sig): Fix AUTOWIRE and
  AUTOINOUT for SV style multidimensional arrays, bug294.  Reported
  by Eric Mastromarchi.
  (verilog-preprocess): Use with-current-buffer and
  font-lock-fontify-buffer to cleanup style issues.
modified:
  lisp/ChangeLog
  lisp/progmodes/verilog-mode.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-11-05 20:52:50 +0000
+++ b/lisp/ChangeLog    2010-11-06 07:54:19 +0000
@@ -1,3 +1,12 @@
+2010-11-07  Wilson Snyder  <address@hidden>
+
+        * progmodes/verilog-mode.el (verilog-insert-one-definition)
+       (verilog-read-decls, verilog-read-sub-decls-sig): Fix AUTOWIRE and
+       AUTOINOUT for SV style multidimensional arrays, bug294.  Reported
+       by Eric Mastromarchi.
+        (verilog-preprocess): Use with-current-buffer and
+       font-lock-fontify-buffer to cleanup style issues.
+
 2010-11-05  Michael Albinus  <address@hidden>
 
        * net/trampver.el: Update release number.

=== modified file 'lisp/progmodes/verilog-mode.el'
--- a/lisp/progmodes/verilog-mode.el    2010-10-23 21:12:38 +0000
+++ b/lisp/progmodes/verilog-mode.el    2010-11-06 07:54:19 +0000
@@ -124,9 +124,9 @@
 ;;; Code:
 
 ;; This variable will always hold the version number of the mode
-(defconst verilog-mode-version "647"
+(defconst verilog-mode-version "650"
   "Version of this Verilog mode.")
-(defconst verilog-mode-release-date "2010-10-20-GNU"
+(defconst verilog-mode-release-date "2010-11-05-GNU"
   "Release date of this Verilog mode.")
 (defconst verilog-mode-release-emacs t
   "If non-nil, this version of Verilog mode was released with Emacs itself.")
@@ -4562,16 +4562,18 @@
                                 default nil nil
                                 'verilog-preprocess-history default)))))
   (unless command (setq command (verilog-expand-command verilog-preprocessor)))
-  (let* ((dir (file-name-directory (or filename buffer-file-name)))
+  (let* ((fontlocked (and (boundp 'font-lock-mode) font-lock-mode))
+        (dir (file-name-directory (or filename buffer-file-name)))
         (file (file-name-nondirectory (or filename buffer-file-name)))
         (cmd (concat "cd " dir "; " command " " file)))
     (with-output-to-temp-buffer "*Verilog-Preprocessed*"
-      (save-excursion
-       (set-buffer "*Verilog-Preprocessed*")
+      (with-current-buffer (get-buffer "*Verilog-Preprocessed*")
        (insert (concat "// " cmd "\n"))
        (shell-command cmd "*Verilog-Preprocessed*")
        (verilog-mode)
-       (font-lock-mode)))))
+       ;; Without this force, it takes a few idle seconds
+       ;; to get the color, which is very jarring
+       (when fontlocked (font-lock-fontify-buffer))))))
 
 
 ;;
@@ -7277,7 +7279,10 @@
         ((looking-at "\\s-*\\(\\[[^]]+\\]\\)")
          (goto-char (match-end 0))
          (cond (newsig ; Memory, not just width.  Patch last signal added's 
memory (nth 3)
-                (setcar (cdr (cdr (cdr newsig))) (match-string 1)))
+                (setcar (cdr (cdr (cdr newsig)))
+                        (if (verilog-sig-memory newsig)
+                            (concat (verilog-sig-memory newsig) (match-string 
1))
+                          (match-string 1))))
                (vec ;; Multidimensional
                 (setq multidim (cons vec multidim))
                 (setq vec (verilog-string-replace-matches
@@ -7415,7 +7420,9 @@
                     (cons (verilog-sig-new
                            sig
                            (if dotname (verilog-sig-bits portdata) vec)
-                           (concat "To/From " comment) nil nil
+                           (concat "To/From " comment)
+                           (verilog-sig-memory portdata)
+                           nil
                            (verilog-sig-signed portdata)
                            (verilog-sig-type portdata)
                            multidim nil)
@@ -7426,7 +7433,9 @@
                     (cons (verilog-sig-new
                            sig
                            (if dotname (verilog-sig-bits portdata) vec)
-                           (concat "From " comment) nil nil
+                           (concat "From " comment)
+                           (verilog-sig-memory portdata)
+                           nil
                            (verilog-sig-signed portdata)
                            (verilog-sig-type portdata)
                            multidim nil)
@@ -7437,7 +7446,9 @@
                     (cons (verilog-sig-new
                            sig
                            (if dotname (verilog-sig-bits portdata) vec)
-                           (concat "To " comment) nil nil
+                           (concat "To " comment)
+                           (verilog-sig-memory portdata)
+                           nil
                            (verilog-sig-signed portdata)
                            (verilog-sig-type portdata)
                            multidim nil)
@@ -7447,7 +7458,9 @@
                     (cons (verilog-sig-new
                            sig
                            (if dotname (verilog-sig-bits portdata) vec)
-                           (concat "To/From " comment) nil nil
+                           (concat "To/From " comment)
+                           (verilog-sig-memory portdata)
+                           nil
                            (verilog-sig-signed portdata)
                            (verilog-sig-type portdata)
                            multidim nil)
@@ -7459,7 +7472,9 @@
                     (cons (verilog-sig-new
                            sig
                            (if dotname (verilog-sig-bits portdata) vec)
-                           (concat "To/From " comment) nil nil
+                           (concat "To/From " comment)
+                           (verilog-sig-memory portdata)
+                           nil
                            (verilog-sig-signed portdata)
                            (verilog-sig-type portdata)
                            multidim nil)
@@ -8874,7 +8889,9 @@
   (indent-to (max 24 (+ indent-pt 16)))
   (unless (= (char-syntax (preceding-char)) ?\  )
     (insert " "))  ; Need space between "]name" if indent-to did nothing
-  (insert (verilog-sig-name sig)))
+  (insert (verilog-sig-name sig))
+  (when (verilog-sig-memory sig)
+    (insert " " (verilog-sig-memory sig))))
 
 (defun verilog-insert-definition (sigs direction indent-pt v2k &optional 
dont-sort)
   "Print out a definition for a list of SIGS of the given DIRECTION,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]