summaryrefslogtreecommitdiff
path: root/lisp/abbrev.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2015-04-02 10:00:48 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2015-04-02 10:00:48 -0400
commit0c2ea36d2032ef47a0d6520b3e513459e072a553 (patch)
treeb21dbe2bb967d25c5f74a64835e27782f3353e28 /lisp/abbrev.el
parent5e41a51e5cc45ca7289fc120f26ad90f45eb2682 (diff)
downloademacs-0c2ea36d2032ef47a0d6520b3e513459e072a553.tar.gz
* lisp/abbrev.el (define-abbrev-table): Treat a non-string "docstring" as
part of the "props" arguments rather than silently ignoring it.
Diffstat (limited to 'lisp/abbrev.el')
-rw-r--r--lisp/abbrev.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/abbrev.el b/lisp/abbrev.el
index 7aa46e0073e..424d9c4f30b 100644
--- a/lisp/abbrev.el
+++ b/lisp/abbrev.el
@@ -976,7 +976,8 @@ Properties with special meaning:
;; We used to manually add the docstring, but we also want to record this
;; location as the definition of the variable (in load-history), so we may
;; as well just use `defvar'.
- (eval `(defvar ,tablename nil ,@(if (stringp docstring) (list docstring))))
+ (eval `(defvar ,tablename nil ,@(if (stringp docstring) (list docstring)
+ (when props (push docstring props) nil))))
(let ((table (if (boundp tablename) (symbol-value tablename))))
(unless table
(setq table (make-abbrev-table))
@@ -987,6 +988,7 @@ Properties with special meaning:
;; if the table was pre-existing as is the case if it was created by
;; loading the user's abbrev file.
(while (consp props)
+ (unless (cdr props) (error "Missing value for property %S" (car props)))
(abbrev-table-put table (pop props) (pop props)))
(dolist (elt definitions)
(apply 'define-abbrev table elt))))