 (defun verilog-indent-comment ()
   "Indent current line as comment."
   (let* ((stcol
-	  (cond
-	   ((verilog-in-star-comment-p)
-	    (save-excursion
-	      (re-search-backward "/\\*" nil t)
-	      (1+(current-column))))
-	   (comment-column
+          (cond
+           ((verilog-in-star-comment-p)
+            (save-excursion
+              (re-search-backward "/\\*" nil t)
+              (1+(current-column))))
+           (comment-column
             comment-column )
-	   (t
-	    (save-excursion
-	      (re-search-backward "//" nil t)
-	      (current-column))))))
+           (t
+            (save-excursion
+              (re-search-backward "//" nil t)
+              (current-column))))))
     (indent-line-to stcol)
     stcol))
 
 (defun verilog-more-comment ()
   "Make more comment lines like the previous."
   (let* ((star 0)
-	 (stcol
-	  (cond
-	   ((verilog-in-star-comment-p)
-	    (save-excursion
-	      (setq star 1)
-	      (re-search-backward "/\\*" nil t)
-	      (1+(current-column))))
-	   (comment-column
-	    comment-column )
-	   (t
-	    (save-excursion
-	      (re-search-backward "//" nil t)
-	      (current-column))))))
+         (stcol
+          (cond
+           ((verilog-in-star-comment-p)
+            (save-excursion
+              (setq star 1)
+              (re-search-backward "/\\*" nil t)
+              (1+(current-column))))
+           (comment-column
+            comment-column )
+           (t
+            (save-excursion
+              (re-search-backward "//" nil t)
+              (current-column))))))
     (progn
       (indent-to stcol)
       (if (and star
-	       (save-excursion
-		 (forward-line -1)
-		 (skip-chars-forward " \t")
-		 (looking-at "\\*")))
-	  (insert "* ")))))
+               (save-excursion
+                 (forward-line -1)
+                 (skip-chars-forward " \t")
+                 (looking-at "\\*")))
+          (insert "* ")))))
 
 (defun verilog-comment-indent (&optional _arg)
   "Return the column number the line should be indented to.

`verilog-auto-reset-widths'."
  (concat
   (if (and verilog-active-low-regexp
	    (verilog-string-match-fold verilog-active-low-regexp (verilog-sig-name sig)))
       "~" "")
   (cond ((not verilog-auto-reset-widths)
	  "0")
	 ((equal verilog-auto-reset-widths 'unbased)
	  "'0")
	 ;; Else presume verilog-auto-reset-widths is true
	 (t
	  (let* ((width (verilog-sig-width sig)))
	    (cond ((not width)
		   "'0/*NOWIDTH*/")
		  ((string-match "^[0-9]+$" width)
		   (concat width (if (verilog-sig-signed sig) "'sh0" "'h0")))
		  (t
		   (concat "{" width "{1'b0}}"))))))))

;;
;; Dumping

    (save-match-data
      (verilog-save-buffer-state
       (let (pt)
         (goto-char beg)
         (while (< (point) end)
           (cond ((looking-at "//")
                  (setq pt (point))
                  (or (search-forward "\n" end t)
                      (goto-char end))
                  ;; "1+": The leading // or /* itself isn't considered as
                  ;; being "inside" the comment, so that a (search-backward)
                  ;; that lands at the start of the // won't mis-indicate
                  ;; it's inside a comment.  Also otherwise it would be
                  ;; hard to find a commented out /*AS*/ vs one that isn't
                  (put-text-property (1+ pt) (point) 'v-cmts t))
                 ((looking-at "/\\*")
                  (setq pt (point))
                  (or (search-forward "*/" end t)
                      ;; No error - let later code indicate it so we can
                      ;; use inside functions on-the-fly
                      ;;(error "%s: Unmatched /* */, at char %d"
                      ;;       (verilog-point-text) (point))
                      (goto-char end))
                  (put-text-property (1+ pt) (point) 'v-cmts t))
                 ((looking-at "\"")
                  (setq pt (point))
                  (or (re-search-forward "[^\\]\"" end t)  ; don't forward-char first, since we look for a non backslash first
                      ;; No error - let later code indicate it so we can
                      (goto-char end))
                  (put-text-property (1+ pt) (point) 'v-cmts t))
                 (t
                  (forward-char 1)
                  (if (re-search-forward "[/\"]" end t)
                      (backward-char 1)
                    (goto-char end))))))))))

(defun verilog-scan ()
  "Parse the buffer, marking all comments with properties.
