diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/derived.el | 24 |
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 |
| 316 | This function requires internal knowledge of how abbrev tables work, | 320 | (mapatoms |
| 317 | presuming that they are obarrays with the abbrev as the symbol, the expansion | 321 | (function |
| 318 | as the value of the symbol, and the hook as the function definition. | 322 | (lambda (symbol) |
| 319 | This 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 | ||