/[emacs]/emacs/lisp/paren.el
ViewVC logotype

Diff of /emacs/lisp/paren.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.51 by rms, Mon Mar 11 09:14:28 2002 UTC revision 1.51.2.1 by miles, Fri Apr 4 06:20:10 2003 UTC
# Line 64  otherwise)." Line 64  otherwise)."
64    :type 'integer    :type 'integer
65    :group 'paren-showing    :group 'paren-showing
66    :version "21.1")    :version "21.1")
67      
68  (defcustom show-paren-ring-bell-on-mismatch nil  (defcustom show-paren-ring-bell-on-mismatch nil
69    "*If non-nil, beep if mismatched paren is detected."    "*If non-nil, beep if mismatched paren is detected."
70    :type 'boolean    :type 'boolean
71    :group 'paren-showing    :group 'paren-showing
72    :version "20.3")    :version "20.3")
73      
74  (defface show-paren-match-face  (defface show-paren-match-face
75    '((((class color) (background light))    '((((class color) (background light))
76       :background "turquoise")           ; looks OK on tty (becomes cyan)       :background "turquoise")           ; looks OK on tty (becomes cyan)
# Line 86  otherwise)." Line 86  otherwise)."
86    
87  (defface show-paren-mismatch-face  (defface show-paren-mismatch-face
88    '((((class color)) (:foreground "white" :background "purple"))    '((((class color)) (:foreground "white" :background "purple"))
89      (t (:reverse-video t)))      (t (:inverse-video t)))
90    "Show Paren mode face used for a mismatching paren."    "Show Paren mode face used for a mismatching paren."
91    :group 'faces    :group 'faces
92    :group 'paren-showing)    :group 'paren-showing)
# Line 135  in `show-paren-style' after `show-paren- Line 135  in `show-paren-style' after `show-paren-
135  ;; and show it until input arrives.  ;; and show it until input arrives.
136  (defun show-paren-function ()  (defun show-paren-function ()
137    (if show-paren-mode    (if show-paren-mode
138        (let (pos dir mismatch face (oldpos (point)))        (let ((oldpos (point))
139          (cond ((eq (char-syntax (preceding-char)) ?\))              (dir (cond ((eq (car (syntax-after (1- (point)))) 5) -1)
140                 (setq dir -1))                         ((eq (car (syntax-after (point))) 4) 1)))
141                ((eq (char-syntax (following-char)) ?\()              pos mismatch face)
                (setq dir 1)))  
142          ;;          ;;
143          ;; Find the other end of the sexp.          ;; Find the other end of the sexp.
144          (when dir          (when dir

Legend:
Removed from v.1.51  
changed lines
  Added in v.1.51.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26