Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
4eebd7fe
Commit
4eebd7fe
authored
Nov 09, 2007
by
Stefan Monnier
Browse files
(define-abbrev-table): Record the variable definition.
parent
07131283
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
lisp/ChangeLog
lisp/ChangeLog
+2
-0
lisp/abbrev.el
lisp/abbrev.el
+4
-2
No files found.
lisp/ChangeLog
View file @
4eebd7fe
2007-11-09 Stefan Monnier <monnier@iro.umontreal.ca>
* abbrev.el (define-abbrev-table): Record the variable definition.
* emacs-lisp/bytecomp.el (byte-compile-file-form-define-abbrev-table):
New function.
...
...
lisp/abbrev.el
View file @
4eebd7fe
...
...
@@ -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
))))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment