Function: verilog-delete-auto-buffer

verilog-delete-auto-buffer is a byte-compiled function defined in verilog-mode.el.gz.

Signature

(verilog-delete-auto-buffer)

Documentation

Perform verilog-delete-auto on the current buffer.

Intended for internal use inside a verilog-save-font-no-change-functions block.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/verilog-mode.el.gz
(defun verilog-delete-auto-buffer ()
  "Perform `verilog-delete-auto' on the current buffer.
Intended for internal use inside a
`verilog-save-font-no-change-functions' block."
  ;; Allow user to customize
  (verilog-run-hooks 'verilog-before-delete-auto-hook)

  ;; Remove those that have multi-line insertions, possibly with parameters
  ;; We allow anything beginning with AUTO, so that users can add their own
  ;; patterns
  (verilog-auto-re-search-do
   (concat "/\\*AUTO[A-Za-z0-9_]+"
           ;; Optional parens or quoted parameter or .* for (((...)))
           "\\(\\|([^)]*)\\|(\"[^\"]*\")\\).*?"
           "\\*/")
   'verilog-delete-autos-lined)
  ;; Remove those that are in parenthesis
  (verilog-auto-re-search-do
   (concat "/\\*"
           (eval-when-compile
             (verilog-regexp-words
              '("AS" "AUTOARG" "AUTOCONCATWIDTH" "AUTOINST" "AUTOINSTPARAM"
                "AUTOSENSE")))
           "\\((.*?)\\)?"
           "\\*/")
   'verilog-delete-to-paren)
  ;; Do .* instantiations, but avoid removing any user pins by looking for our magic comments
  (verilog-auto-re-search-do "\\.\\*"
                             'verilog-delete-auto-star-all)
  ;; Remove template comments ... anywhere in case was pasted after AUTOINST removed
  (goto-char (point-min))
  (while (re-search-forward "\\s-*// \\(Templated\\(\\s-*AUTONOHOOKUP\\)?\\|Implicit \\.\\*\\)\\([ \tLT0-9]*\\| LHS: .*\\)$" nil t)
    (replace-match ""))

  ;; Final customize
  (verilog-run-hooks 'verilog-delete-auto-hook))