all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* caml-mode and show-paren-mode
@ 2005-04-19  5:19 Karl Chen
  2005-04-19 16:13 ` Richard Stallman
  2005-04-19 18:04 ` Stefan Monnier
  0 siblings, 2 replies; 4+ messages in thread
From: Karl Chen @ 2005-04-19  5:19 UTC (permalink / raw)



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.


-- 
Karl 2005-04-18 22:18

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: caml-mode and show-paren-mode
  2005-04-19  5:19 caml-mode and show-paren-mode Karl Chen
@ 2005-04-19 16:13 ` Richard Stallman
  2005-04-19 18:04 ` Stefan Monnier
  1 sibling, 0 replies; 4+ messages in thread
From: Richard Stallman @ 2005-04-19 16:13 UTC (permalink / raw)
  Cc: emacs-devel

So that people who don't know CAML could try to debug this,
can you send a precise, self-contained test case?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: caml-mode and show-paren-mode
  2005-04-19  5:19 caml-mode and show-paren-mode Karl Chen
  2005-04-19 16:13 ` Richard Stallman
@ 2005-04-19 18:04 ` Stefan Monnier
  2005-04-20  1:03   ` Karl Chen
  1 sibling, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2005-04-19 18:04 UTC (permalink / raw)
  Cc: emacs-devel

> 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: rms@gnu.org
 ;; 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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: caml-mode and show-paren-mode
  2005-04-19 18:04 ` Stefan Monnier
@ 2005-04-20  1:03   ` Karl Chen
  0 siblings, 0 replies; 4+ messages in thread
From: Karl Chen @ 2005-04-20  1:03 UTC (permalink / raw)
  Cc: emacs-devel

>>>>> On 2005-04-19 11:04 PDT, Stefan Monnier writes:

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

Yes, that fixes it!

-- 
Karl 2005-04-19 18:02

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-04-20  1:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-19  5:19 caml-mode and show-paren-mode Karl Chen
2005-04-19 16:13 ` Richard Stallman
2005-04-19 18:04 ` Stefan Monnier
2005-04-20  1:03   ` Karl Chen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.