comparison lisp/derived.el @ 3162:6e11554a16aa

[xemacs-hg @ 2005-12-23 11:40:32 by stephent] Add rename function to buffer mode. <87hd902gcp.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Fri, 23 Dec 2005 11:40:39 +0000
parents fd1acd2f457a
children 04a435415e1d
comparison
equal deleted inserted replaced
3161:78cf83b934a0 3162:6e11554a16aa
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 422 (map-char-table #'(lambda (range value)
423 #'(lambda (key value) 423 (when (eq ?@ (char-syntax-from-code value))
424 (let ((newval (get-range-char-table key new 'multi))) 424 (map-char-table #'(lambda (rng val)
425 (cond ((eq newval 'multi) ; OK, dive into the class hierarchy 425 (put-char-table rng val new))
426 (map-char-table 426 old
427 #'(lambda (key1 value1) 427 range)))
428 (when (eq ?@ (char-syntax-from-code 428 new))
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))
438 429
439 ;; Merge an old abbrev table into a new one. 430 ;; Merge an old abbrev table into a new one.
440 ;; This function requires internal knowledge of how abbrev tables work, 431 ;; This function requires internal knowledge of how abbrev tables work,
441 ;; presuming that they are obarrays with the abbrev as the symbol, the expansion 432 ;; presuming that they are obarrays with the abbrev as the symbol, the expansion
442 ;; as the value of the symbol, and the hook as the function definition. 433 ;; as the value of the symbol, and the hook as the function definition.