From: Richard M. Stallman Date: Fri, 1 May 1998 05:33:39 +0000 (+0000) Subject: (show-paren-ring-bell-on-mismatch): New option. X-Git-Tag: emacs-20.3~1186 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2fe66dda68f9c6927c1a6fd40a1e51d495639f5f;p=emacs.git (show-paren-ring-bell-on-mismatch): New option. (show-paren-function): Beep on mismatch, if requested. --- 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