RECOMMEND 21.4
The original patch apparently slipped into 21.4 inadvertantly (see
<87r7hobebk.fsf(a)tleepslib.sk.tsukuba.ac.jp> on XEmacs Beta). This
reverts.
Note that Jerry's test in <pslluyhzan.fsf(a)diannao.ittc.ku.edu>
http://list-archive.xemacs.org/xemacs-beta/200307/msg00153.html
is 99% incorrect; `push' will always return non-nil, causing
`map-char-table' to exit after one iteration. It should be
(let ((keyval nil))
(map-char-table
#'(lambda (key value)
(push (list key value) keyval)
;; force null return
nil)
(make-syntax-table))
keyval)
Jerry's version still shows that map-char-table in 21.5 is broken,
because the test should return a one-element list, and it doesn't.
The revised version of derived.el DTRT's on this test:
(require 'jde)
(let ((my-syntax-table (make-syntax-table)))
(derived-mode-merge-syntax-tables java-mode-syntax-table my-syntax-table)
my-syntax-table)
and cannot throw the wrong-type error Hrvoje observes, so I recommend
application.
Index: lisp/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/ChangeLog,v
retrieving revision 1.515
diff -u -U0 -r1.515 ChangeLog
--- lisp/ChangeLog 17 Jul 2003 14:41:23 -0000 1.515
+++ lisp/ChangeLog 18 Jul 2003 07:19:59 -0000
@@ -0,0 +1,6 @@
+2005-04-06 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * derived.el (derived-mode-merge-syntax-tables):
+ Revert my 21.5-only patch of 2003-07-18 which slipped in
+ through Jerry James's patch of 2004-06-07.
+
Index: lisp/derived.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/derived.el,v
retrieving revision 1.4.2.1
diff -u -r1.4.2.1 derived.el
--- lisp/derived.el 22 Jun 2004 01:49:47 -0000 1.4.2.1
+++ lisp/derived.el 6 Apr 2005 07:01:34 -0000
@@ -421,20 +421,12 @@
;; check for inheritance.
(map-char-table
#'(lambda (key value)
- (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))
+ (if (eq ?@ (char-syntax-from-code value))
+ (map-char-table #'(lambda (key1 value1)
+ (put-char-table key1 value1 new))
+ old
+ key)))
+ new))
;; Merge an old abbrev table into a new one.
;; This function requires internal knowledge of how abbrev tables work,
--
School of Systems and Information Engineering
http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Ask not how you can "do" free software business;
ask what your business can "do for" free software.