[Top][All Lists]

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

Counting bracketing marks

From: fatiparty
Subject: Counting bracketing marks
Date: Wed, 16 Mar 2022 20:48:18 +0100 (CET)

I want to count the number of opening and closing marks that `(` and `)` .

(defun bracketing-count (region-start region-end)
  "Count opening and closing bracketing marks."
  (interactive "r")

    (let ( count (count-matches "\(" (point) region-end) )
      (message "%d" count) )))

reply via email to

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