Mercurial > emacs
comparison lisp/derived.el @ 14637:89952d6af6c2
(derived-mode-merge-syntax-tables): Use inheritance.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Wed, 21 Feb 1996 21:33:12 +0000 |
parents | 83f275dcd93a |
children | bd56cdc4d07b |
comparison
equal
deleted
inserted
replaced
14636:2edced5a8756 | 14637:89952d6af6c2 |
---|---|
329 (setcdr (nthcdr (1- (length new)) new) old)) | 329 (setcdr (nthcdr (1- (length new)) new) old)) |
330 | 330 |
331 (defun derived-mode-merge-syntax-tables (old new) | 331 (defun derived-mode-merge-syntax-tables (old new) |
332 "Merge an old syntax table into a new one. | 332 "Merge an old syntax table into a new one. |
333 Where the new table already has an entry, nothing is copied from the old one." | 333 Where the new table already has an entry, nothing is copied from the old one." |
334 (map-char-table | 334 (set-char-table-parent new old)) |
335 (function (lambda (key value) | |
336 (or (char-table-range new key) | |
337 (set-char-table-range new key value)))) | |
338 old)) | |
339 | 335 |
340 ;; Merge an old abbrev table into a new one. | 336 ;; Merge an old abbrev table into a new one. |
341 ;; This function requires internal knowledge of how abbrev tables work, | 337 ;; This function requires internal knowledge of how abbrev tables work, |
342 ;; presuming that they are obarrays with the abbrev as the symbol, the expansion | 338 ;; presuming that they are obarrays with the abbrev as the symbol, the expansion |
343 ;; as the value of the symbol, and the hook as the function definition. | 339 ;; as the value of the symbol, and the hook as the function definition. |