changeset 1578:e2ddc2a2b794

[xemacs-hg @ 2003-07-18 07:42:47 by stephent] fix derived-mode-merge-syntax-tables <8765m0jnb1.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Fri, 18 Jul 2003 07:42:48 +0000
parents 8030dd524aac
children aebc80e1f056
files lisp/ChangeLog lisp/derived.el
diffstat 2 files changed, 19 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Jul 17 21:52:19 2003 +0000
+++ b/lisp/ChangeLog	Fri Jul 18 07:42:48 2003 +0000
@@ -1,3 +1,8 @@
+2003-07-18  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* derived.el (derived-mode-merge-syntax-tables): Reverse map
+	logic.  Fixes "do-nothing" bug.
+
 2003-07-16  Jerry James  <james@xemacs.org>
 
 	* window-xemacs.el (restore-saved-window): Follow first-hchild and
--- a/lisp/derived.el	Thu Jul 17 21:52:19 2003 +0000
+++ b/lisp/derived.el	Fri Jul 18 07:42:48 2003 +0000
@@ -342,12 +342,20 @@
       ;; check for inheritance.
       (map-char-table
        #'(lambda (key value)
-	   (if (eq ?@ (char-syntax-from-code value))
-	       (map-char-table #'(lambda (key1 value1)
-				   (put-char-table key1 value1 new))
-			       old
-			       key)))
-       new)
+	   (let ((newval (get-range-char-table key new 'multi)))
+	     (cond ((eq newval 'multi)	; OK, dive into the class hierarchy
+		    (map-char-table
+		     #'(lambda (key1 value1)
+			 (when (eq ?@ (char-syntax-from-code
+				       (get-range-char-table key new ?@)))
+			   (put-char-table key1 value new))
+			 nil)
+		     new
+		     key))
+		   ((eq ?@ (char-syntax-from-code newval)) ;; class at once
+		    (put-char-table key value new))))
+	   nil)
+       old)
     ;; pre-20.0
     (let ((idx 0)
 	  (end (min (length new) (length old))))