diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2007-11-09 16:07:18 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2007-11-09 16:07:18 +0000 |
commit | 4eebd7fe045c50c8dcd3faf6ea87f2c1197df565 (patch) | |
tree | c600a9bfb50eececc6f0e04de3a8f57bc8d816ea /lisp/abbrev.el | |
parent | 0713128329924c857a7cb04f55d27b274d401a0d (diff) | |
download | emacs-4eebd7fe045c50c8dcd3faf6ea87f2c1197df565.tar.gz |
(define-abbrev-table): Record the variable definition.
Diffstat (limited to 'lisp/abbrev.el')
-rw-r--r-- | lisp/abbrev.el | 6 |
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: - `:enable-function' can be set to a function of no argument which returns non-nil iff the abbrevs in this table should be used for this instance of `expand-abbrev'." + ;; 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)))) (let ((table (if (boundp tablename) (symbol-value tablename)))) (unless table (setq table (make-abbrev-table props)) (set tablename table) (push tablename abbrev-table-name-list)) - (when (stringp docstring) - (put tablename 'variable-documentation docstring)) (dolist (elt definitions) (apply 'define-abbrev table elt)))) |