> Does anyone use both caml-mode and show-paren-mode?
> Show-paren-mode in caml-mode in Emacs CVS HEAD doesn't highlight
> parens, but in Emacs 21.4 does.

The patch below should fix the problem.  Can you confirm?


        Stefan


--- paren.el    08 d�c 2004 16:41:48 -0500      1.60
+++ paren.el    19 avr 2005 14:03:06 -0400      
@@ -1,6 +1,6 @@
 ;;; paren.el --- highlight matching paren
 
-;; Copyright (C) 1993, 1996, 2001, 2004  Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1996, 2001, 2004, 2005  Free Software Foundation, Inc.
 
 ;; Author: [EMAIL PROTECTED]
 ;; Maintainer: FSF
@@ -139,8 +139,9 @@
 (defun show-paren-function ()
   (if show-paren-mode
       (let ((oldpos (point))
-           (dir (cond ((eq (car (syntax-after (1- (point)))) 5) -1)
-                      ((eq (car (syntax-after (point))) 4) 1)))
+           (dir (cond
+                  ((eq (logand (car (syntax-after (1- (point)))) 255) 5) -1)
+                  ((eq (logand (car (syntax-after (point))) 255) 4) 1)))
            pos mismatch face)
        ;;
        ;; Find the other end of the sexp.
@@ -169,7 +170,7 @@
              ;; kind of paren to match the one we started at.
              (when (integerp pos)
                (let ((beg (min pos oldpos)) (end (max pos oldpos)))
-                 (unless (eq (car (syntax-after beg)) 8) ;Not syntax `$'.
+                 (unless (eq (logand (car (syntax-after beg)) 255) 8)
                    (setq mismatch
                          (not (or (eq (char-before end)
                                       ;; This can give nil.


_______________________________________________
Emacs-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to