summaryrefslogtreecommitdiff
path: root/src/abbrev.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@redhat.com>1992-10-31 04:49:31 +0000
committerJim Blandy <jimb@redhat.com>1992-10-31 04:49:31 +0000
commit2aafec019df0af8e9ffc19c9c0ae7912216a4752 (patch)
tree97c19f8ea8247fb693186243728eda50f3d703ed /src/abbrev.c
parent40d2e4404359ca6c6c529ed3efc116b42ddc14d6 (diff)
downloademacs-2aafec019df0af8e9ffc19c9c0ae7912216a4752.tar.gz
* abbrev.c (Funexpand_abbrev): Just assign the last abbrev's value
to val; don't use XSET. Make sure that the value of the abbrev-symbol is a string.
Diffstat (limited to 'src/abbrev.c')
-rw-r--r--src/abbrev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/abbrev.c b/src/abbrev.c
index f31ccc9edae..f56054bda51 100644
--- a/src/abbrev.c
+++ b/src/abbrev.c
@@ -354,7 +354,9 @@ is not undone.")
/* This isn't correct if Vlast_abbrev->function was used
to do the expansion */
Lisp_Object val;
- XSET (val, Lisp_String, XSYMBOL (Vlast_abbrev)->value);
+ val = XSYMBOL (Vlast_abbrev)->value;
+ if (XTYPE (val) != Lisp_String)
+ error ("value of abbrev-symbol must be a string");
adjust = XSTRING (val)->size;
del_range (point, point + adjust);
insert_from_string (Vlast_abbrev_text, 0,