aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-06-05 15:17:16 +0000
committerRichard M. Stallman1994-06-05 15:17:16 +0000
commit56152e17443b1bc1fa1774693dfa3ea4c73fa413 (patch)
tree1ae9f80891058faedfc2813a3c563cad873a7458
parentad0dae07104cd4a8b7cffc0b4712f5d6baa06183 (diff)
downloademacs-56152e17443b1bc1fa1774693dfa3ea4c73fa413.tar.gz
emacs-56152e17443b1bc1fa1774693dfa3ea4c73fa413.zip
(derived-mode-merge-abbrev-tables):
Do nothing if OLD is nil.
-rw-r--r--lisp/derived.el24
1 files changed, 12 insertions, 12 deletions
diff --git a/lisp/derived.el b/lisp/derived.el
index 90983cd820d..83b114c0f1f 100644
--- a/lisp/derived.el
+++ b/lisp/derived.el
@@ -311,19 +311,19 @@ Where the new table already has an entry, nothing is copied from the old one."
311 (aset new idx (aref old idx))) 311 (aset new idx (aref old idx)))
312 (setq idx (1+ idx))))) 312 (setq idx (1+ idx)))))
313 313
314;; Merge an old abbrev table into a new one.
315;; This function requires internal knowledge of how abbrev tables work,
316;; presuming that they are obarrays with the abbrev as the symbol, the expansion
317;; as the value of the symbol, and the hook as the function definition.
314(defun derived-mode-merge-abbrev-tables (old new) 318(defun derived-mode-merge-abbrev-tables (old new)
315 "Merge an old abbrev table into a new one. 319 (if old
316This function requires internal knowledge of how abbrev tables work, 320 (mapatoms
317presuming that they are obarrays with the abbrev as the symbol, the expansion 321 (function
318as the value of the symbol, and the hook as the function definition. 322 (lambda (symbol)
319This could well break with some future version of Gnu Emacs." 323 (or (intern-soft (symbol-name symbol) new)
320 (mapatoms 324 (define-abbrev new (symbol-name symbol)
321 (function 325 (symbol-value symbol) (symbol-function symbol)))))
322 (lambda (symbol) 326 old)))
323 (or (intern-soft (symbol-name symbol) new)
324 (define-abbrev new (symbol-name symbol)
325 (symbol-value symbol) (symbol-function symbol)))))
326 old))
327 327
328(provide 'derived) 328(provide 'derived)
329 329