aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/abbrev.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/abbrev.el')
-rw-r--r--lisp/abbrev.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/abbrev.el b/lisp/abbrev.el
index 145ec223951..0c140a84159 100644
--- a/lisp/abbrev.el
+++ b/lisp/abbrev.el
@@ -895,13 +895,15 @@ Properties with special meaning:
895- `:enable-function' can be set to a function of no argument which returns 895- `:enable-function' can be set to a function of no argument which returns
896 non-nil iff the abbrevs in this table should be used for this instance 896 non-nil iff the abbrevs in this table should be used for this instance
897 of `expand-abbrev'." 897 of `expand-abbrev'."
898 ;; We used to manually add the docstring, but we also want to record this
899 ;; location as the definition of the variable (in load-history), so we may
900 ;; as well just use `defvar'.
901 (eval `(defvar ,tablename nil ,@(if (stringp docstring) (list docstring))))
898 (let ((table (if (boundp tablename) (symbol-value tablename)))) 902 (let ((table (if (boundp tablename) (symbol-value tablename))))
899 (unless table 903 (unless table
900 (setq table (make-abbrev-table props)) 904 (setq table (make-abbrev-table props))
901 (set tablename table) 905 (set tablename table)
902 (push tablename abbrev-table-name-list)) 906 (push tablename abbrev-table-name-list))
903 (when (stringp docstring)
904 (put tablename 'variable-documentation docstring))
905 (dolist (elt definitions) 907 (dolist (elt definitions)
906 (apply 'define-abbrev table elt)))) 908 (apply 'define-abbrev table elt))))
907 909