From 2fe66dda68f9c6927c1a6fd40a1e51d495639f5f Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 1 May 1998 05:33:39 +0000 Subject: [PATCH] (show-paren-ring-bell-on-mismatch): New option. (show-paren-function): Beep on mismatch, if requested. --- lisp/paren.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lisp/paren.el b/lisp/paren.el index 9d3c94f88dc..d3e3df0046e 100644 --- a/lisp/paren.el +++ b/lisp/paren.el @@ -67,6 +67,12 @@ otherwise)." :type '(number :tag "seconds") :group 'paren-showing) +(defcustom show-paren-ring-bell-on-mismatch nil + "*If non-nil, beep if mismatched paren is detected." + :type 'boolean + :group 'paren-showing + :version "20.3") + (defface show-paren-match-face '((((class color)) (:background "turquoise")) (t (:background "gray"))) @@ -158,7 +164,10 @@ in `show-paren-style' after `show-paren-delay' seconds of Emacs idle time." ;; ;; Use the correct face. (if mismatch - (setq face 'show-paren-mismatch-face) + (progn + (if show-paren-ring-bell-on-mismatch + (beep)) + (setq face 'show-paren-mismatch-face)) (setq face 'show-paren-match-face)) ;; ;; If matching backwards, highlight the closeparen -- 2.39.5