diff options
| author | Stefan Monnier | 2008-04-26 01:59:04 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2008-04-26 01:59:04 +0000 |
| commit | 9e2a4d4d37107749d30751a6694a65d41ec798b7 (patch) | |
| tree | ec486729cce74ecd69badfec33f0fb10d29a933c | |
| parent | 3420078700003d6a21e34c5f116516bdd642df90 (diff) | |
| download | emacs-9e2a4d4d37107749d30751a6694a65d41ec798b7.tar.gz emacs-9e2a4d4d37107749d30751a6694a65d41ec798b7.zip | |
(define-abbrev-table): Apply props even if the table exists already.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/abbrev.el | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 862fa21a680..c560f7cd847 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2008-04-26 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2008-04-26 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * abbrev.el (define-abbrev-table): Apply props even if the table | ||
| 4 | exists already. | ||
| 5 | |||
| 3 | * minibuffer.el (completion-table-with-context): Fix `pred' for the | 6 | * minibuffer.el (completion-table-with-context): Fix `pred' for the |
| 4 | various kinds of completion tables. | 7 | various kinds of completion tables. |
| 5 | (completion-emacs22-try-completion): Place cursor after the /, as was | 8 | (completion-emacs22-try-completion): Place cursor after the /, as was |
diff --git a/lisp/abbrev.el b/lisp/abbrev.el index 303f03548e0..999cd691bc1 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el | |||
| @@ -914,9 +914,14 @@ Properties with special meaning: | |||
| 914 | (eval `(defvar ,tablename nil ,@(if (stringp docstring) (list docstring)))) | 914 | (eval `(defvar ,tablename nil ,@(if (stringp docstring) (list docstring)))) |
| 915 | (let ((table (if (boundp tablename) (symbol-value tablename)))) | 915 | (let ((table (if (boundp tablename) (symbol-value tablename)))) |
| 916 | (unless table | 916 | (unless table |
| 917 | (setq table (make-abbrev-table props)) | 917 | (setq table (make-abbrev-table)) |
| 918 | (set tablename table) | 918 | (set tablename table) |
| 919 | (push tablename abbrev-table-name-list)) | 919 | (push tablename abbrev-table-name-list)) |
| 920 | ;; We used to just pass them to `make-abbrev-table', but that fails | ||
| 921 | ;; if the table was pre-existing as is the case if it was created by | ||
| 922 | ;; loading the user's abbrev file. | ||
| 923 | (while (consp props) | ||
| 924 | (abbrev-table-put table (pop props) (pop props))) | ||
| 920 | (dolist (elt definitions) | 925 | (dolist (elt definitions) |
| 921 | (apply 'define-abbrev table elt)))) | 926 | (apply 'define-abbrev table elt)))) |
| 922 | 927 | ||