Function: verilog-backward-open-bracket

verilog-backward-open-bracket is a byte-compiled function defined in verilog-mode.el.gz.

Signature

(verilog-backward-open-bracket)

Documentation

Find the open bracket that match the current point.

Ignore other open bracket with matching close bracket.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/verilog-mode.el.gz
(defun verilog-backward-open-bracket ()
  "Find the open bracket that match the current point.
Ignore other open bracket with matching close bracket."
  (let ((parens 1))
    (while (> parens 0)
      (unless (verilog-re-search-backward-quick "[][]" nil t)
	(error "%s: Mismatching []" (verilog-point-text)))
      (cond ((= (following-char) ?\] )
	     (setq parens (1+ parens)))
	    ((= (following-char) ?\[ )
	     (setq parens (1- parens)))))))