aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Raeburn2002-05-20 08:05:55 +0000
committerKen Raeburn2002-05-20 08:05:55 +0000
commitc60a57d71ca1e32c2fa6d7561bf129e9d4723d7f (patch)
treeec5ec30a3e790b70babef1da2cb80705c8b9f969
parent7c2379772d5d7be68e0557a1d923d41e39e2c787 (diff)
downloademacs-c60a57d71ca1e32c2fa6d7561bf129e9d4723d7f.tar.gz
emacs-c60a57d71ca1e32c2fa6d7561bf129e9d4723d7f.zip
* keyboard.c (echo_char, record_char, parse_modifiers_uncached)
(parse_modifiers, apply_modifiers, Fevent_convert_list) (parse_solitary_modifier, Fexecute_extended_command): Use SYMBOL_NAME and XSTRING instead of XSYMBOL and name field.
-rw-r--r--src/keyboard.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 5e0871f445f..25e0c69af1d 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -741,7 +741,7 @@ echo_char (c)
741 } 741 }
742 else if (SYMBOLP (c)) 742 else if (SYMBOLP (c))
743 { 743 {
744 struct Lisp_String *name = XSYMBOL (c)->name; 744 struct Lisp_String *name = XSTRING (SYMBOL_NAME (c));
745 int nbytes = STRING_BYTES (name); 745 int nbytes = STRING_BYTES (name);
746 746
747 if (size - (ptr - buffer) < nbytes) 747 if (size - (ptr - buffer) < nbytes)
@@ -3139,8 +3139,8 @@ record_char (c)
3139 if (SYMBOLP (dribblee)) 3139 if (SYMBOLP (dribblee))
3140 { 3140 {
3141 putc ('<', dribble); 3141 putc ('<', dribble);
3142 fwrite (XSYMBOL (dribblee)->name->data, sizeof (char), 3142 fwrite (XSTRING (SYMBOL_NAME (dribblee))->data, sizeof (char),
3143 STRING_BYTES (XSYMBOL (dribblee)->name), 3143 STRING_BYTES (XSTRING (SYMBOL_NAME (dribblee))),
3144 dribble); 3144 dribble);
3145 putc ('>', dribble); 3145 putc ('>', dribble);
3146 } 3146 }
@@ -5527,7 +5527,7 @@ parse_modifiers_uncached (symbol, modifier_end)
5527 CHECK_SYMBOL (symbol); 5527 CHECK_SYMBOL (symbol);
5528 5528
5529 modifiers = 0; 5529 modifiers = 0;
5530 name = XSYMBOL (symbol)->name; 5530 name = XSTRING (SYMBOL_NAME (symbol));
5531 5531
5532 for (i = 0; i+2 <= STRING_BYTES (name); ) 5532 for (i = 0; i+2 <= STRING_BYTES (name); )
5533 { 5533 {
@@ -5704,8 +5704,8 @@ parse_modifiers (symbol)
5704 Lisp_Object unmodified; 5704 Lisp_Object unmodified;
5705 Lisp_Object mask; 5705 Lisp_Object mask;
5706 5706
5707 unmodified = Fintern (make_string (XSYMBOL (symbol)->name->data + end, 5707 unmodified = Fintern (make_string (XSTRING (SYMBOL_NAME (symbol))->data + end,
5708 STRING_BYTES (XSYMBOL (symbol)->name) - end), 5708 STRING_BYTES (XSTRING (SYMBOL_NAME (symbol))) - end),
5709 Qnil); 5709 Qnil);
5710 5710
5711 if (modifiers & ~VALMASK) 5711 if (modifiers & ~VALMASK)
@@ -5758,9 +5758,9 @@ apply_modifiers (modifiers, base)
5758 { 5758 {
5759 /* We have to create the symbol ourselves. */ 5759 /* We have to create the symbol ourselves. */
5760 new_symbol = apply_modifiers_uncached (modifiers, 5760 new_symbol = apply_modifiers_uncached (modifiers,
5761 XSYMBOL (base)->name->data, 5761 XSTRING (SYMBOL_NAME (base))->data,
5762 XSYMBOL (base)->name->size, 5762 XSTRING (SYMBOL_NAME (base))->size,
5763 STRING_BYTES (XSYMBOL (base)->name)); 5763 STRING_BYTES (XSTRING (SYMBOL_NAME (base))));
5764 5764
5765 /* Add the new symbol to the base's cache. */ 5765 /* Add the new symbol to the base's cache. */
5766 entry = Fcons (index, new_symbol); 5766 entry = Fcons (index, new_symbol);
@@ -5981,8 +5981,8 @@ has the same base event type and all the specified modifiers. */)
5981 } 5981 }
5982 5982
5983 /* Let the symbol A refer to the character A. */ 5983 /* Let the symbol A refer to the character A. */
5984 if (SYMBOLP (base) && XSYMBOL (base)->name->size == 1) 5984 if (SYMBOLP (base) && XSTRING (SYMBOL_NAME (base))->size == 1)
5985 XSETINT (base, XSYMBOL (base)->name->data[0]); 5985 XSETINT (base, XSTRING (SYMBOL_NAME (base))->data[0]);
5986 5986
5987 if (INTEGERP (base)) 5987 if (INTEGERP (base))
5988 { 5988 {
@@ -6017,7 +6017,7 @@ static int
6017parse_solitary_modifier (symbol) 6017parse_solitary_modifier (symbol)
6018 Lisp_Object symbol; 6018 Lisp_Object symbol;
6019{ 6019{
6020 struct Lisp_String *name = XSYMBOL (symbol)->name; 6020 struct Lisp_String *name = XSTRING (SYMBOL_NAME (symbol));
6021 6021
6022 switch (name->data[0]) 6022 switch (name->data[0])
6023 { 6023 {
@@ -9478,11 +9478,11 @@ DEFUN ("execute-extended-command", Fexecute_extended_command, Sexecute_extended_
9478 binding = Fkey_description (bindings); 9478 binding = Fkey_description (bindings);
9479 9479
9480 newmessage 9480 newmessage
9481 = (char *) alloca (XSYMBOL (function)->name->size 9481 = (char *) alloca (XSTRING (SYMBOL_NAME (function))->size
9482 + STRING_BYTES (XSTRING (binding)) 9482 + STRING_BYTES (XSTRING (binding))
9483 + 100); 9483 + 100);
9484 sprintf (newmessage, "You can run the command `%s' with %s", 9484 sprintf (newmessage, "You can run the command `%s' with %s",
9485 XSYMBOL (function)->name->data, 9485 XSTRING (SYMBOL_NAME (function))->data,
9486 XSTRING (binding)->data); 9486 XSTRING (binding)->data);
9487 message2_nolog (newmessage, 9487 message2_nolog (newmessage,
9488 strlen (newmessage), 9488 strlen (newmessage),