]> git.eshelyaron.com Git - emacs.git/commitdiff
(show-paren-ring-bell-on-mismatch): New option.
authorRichard M. Stallman <rms@gnu.org>
Fri, 1 May 1998 05:33:39 +0000 (05:33 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 1 May 1998 05:33:39 +0000 (05:33 +0000)
(show-paren-function): Beep on mismatch, if requested.

lisp/paren.el

index 9d3c94f88dc79ba4987adf5e61a5e19fb31607fb..d3e3df0046ebcb080c85ee5f05ae1b2f6d73e749 100644 (file)
@@ -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