]> git.eshelyaron.com Git - emacs.git/commitdiff
(define-abbrev-table): Apply props even if the table exists already.
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 26 Apr 2008 01:59:04 +0000 (01:59 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 26 Apr 2008 01:59:04 +0000 (01:59 +0000)
lisp/ChangeLog
lisp/abbrev.el

index 862fa21a680a822d8e814778d5aa3d27f82da14d..c560f7cd84701ff971cc5225918cd46d2d525496 100644 (file)
@@ -1,5 +1,8 @@
 2008-04-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * abbrev.el (define-abbrev-table): Apply props even if the table
+       exists already.
+
        * minibuffer.el (completion-table-with-context): Fix `pred' for the
        various kinds of completion tables.
        (completion-emacs22-try-completion): Place cursor after the /, as was
index 303f03548e0c71a2a8b410fc02c81197c4529176..999cd691bc15633262eaf450bb6879e1722b6370 100644 (file)
@@ -914,9 +914,14 @@ Properties with special meaning:
   (eval `(defvar ,tablename nil ,@(if (stringp docstring) (list docstring))))
   (let ((table (if (boundp tablename) (symbol-value tablename))))
     (unless table
-      (setq table (make-abbrev-table props))
+      (setq table (make-abbrev-table))
       (set tablename table)
       (push tablename abbrev-table-name-list))
+    ;; We used to just pass them to `make-abbrev-table', but that fails
+    ;; if the table was pre-existing as is the case if it was created by
+    ;; loading the user's abbrev file.
+    (while (consp props)
+      (abbrev-table-put table (pop props) (pop props)))
     (dolist (elt definitions)
       (apply 'define-abbrev table elt))))