comparison lisp/derived.el @ 3163:04a435415e1d

[xemacs-hg @ 2005-12-23 11:42:32 by stephent] undo spurious commit
author stephent
date Fri, 23 Dec 2005 11:42:35 +0000
parents 6e11554a16aa
children 308d34e9f07d
comparison
equal deleted inserted replaced
3162:6e11554a16aa 3163:04a435415e1d
417 Where the new table already has an entry, nothing is copied from the old one." 417 Where the new table already has an entry, nothing is copied from the old one."
418 ;; XEmacs change: on the other hand, Emacs 21.3 just has 418 ;; XEmacs change: on the other hand, Emacs 21.3 just has
419 ;; (set-char-table-parent new old) here. 419 ;; (set-char-table-parent new old) here.
420 ;; We use map-char-table, not map-syntax-table, so we can explicitly 420 ;; We use map-char-table, not map-syntax-table, so we can explicitly
421 ;; check for inheritance. 421 ;; check for inheritance.
422 (map-char-table #'(lambda (range value) 422 (map-char-table
423 (when (eq ?@ (char-syntax-from-code value)) 423 #'(lambda (key value)
424 (map-char-table #'(lambda (rng val) 424 (let ((newval (get-range-char-table key new 'multi)))
425 (put-char-table rng val new)) 425 (cond ((eq newval 'multi) ; OK, dive into the class hierarchy
426 old 426 (map-char-table
427 range))) 427 #'(lambda (key1 value1)
428 new)) 428 (when (eq ?@ (char-syntax-from-code
429 (get-range-char-table key new ?@)))
430 (put-char-table key1 value new))
431 nil)
432 new
433 key))
434 ((eq ?@ (char-syntax-from-code newval)) ;; class at once
435 (put-char-table key value new))))
436 nil)
437 old))
429 438
430 ;; Merge an old abbrev table into a new one. 439 ;; Merge an old abbrev table into a new one.
431 ;; This function requires internal knowledge of how abbrev tables work, 440 ;; This function requires internal knowledge of how abbrev tables work,
432 ;; presuming that they are obarrays with the abbrev as the symbol, the expansion 441 ;; presuming that they are obarrays with the abbrev as the symbol, the expansion
433 ;; as the value of the symbol, and the hook as the function definition. 442 ;; as the value of the symbol, and the hook as the function definition.