;;; paren.el --- highlight matching paren.
+
;; Copyright (C) 1993 Free Software Foundation, Inc.
;; Author: rms@gnu.ai.mit.edu
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to
-;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
;;; Commentary:
;; Do nothing if no window system to display results with.
;; Do nothing if executing keyboard macro.
;; Do nothing if input is pending.
- (if (and window-system (not executing-kbd-macro) (sit-for 0 100))
+ (if window-system
(let (pos dir mismatch (oldpos (point))
(face show-paren-face))
(cond ((eq (char-syntax (preceding-char)) ?\))
(and (null show-paren-mismatch-face)
(x-display-color-p)
(progn
+ (add-to-list 'facemenu-unlisted-faces
+ 'paren-mismatch)
(make-face 'paren-mismatch)
(or (face-nontrivial-p 'paren-mismatch t)
(progn
(+ (point) dir) (point)
(current-buffer))
(setq show-paren-overlay-1
- (make-overlay (- pos dir) pos)))
+ (make-overlay (+ (point) dir) (point))))
;; Always set the overlay face, since it varies.
(overlay-put show-paren-overlay-1 'face face))
;; Otherwise, turn off any such highlighting.
(if window-system
(progn
- (setq blink-paren-function nil)
- (add-hook 'post-command-hook 'show-paren-command-hook)))
+ (setq blink-matching-paren-on-screen nil)
+ (add-hook 'post-command-idle-hook 'show-paren-command-hook)))
;;; This is in case paren.el is preloaded.
(add-hook 'window-setup-hook
(function (lambda ()
(if window-system
(progn
- (setq blink-paren-function nil)
- (add-hook 'post-command-hook
+ (setq blink-matching-paren-on-screen nil)
+ (add-hook 'post-command-idle-hook
'show-paren-command-hook))))))
(provide 'paren)