symbols' value directly.
/* Primitives for word-abbrev mode.
- Copyright (C) 1985, 1986, 1993, 1996, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1985, 1986, 1993, 1996, 1998, 2001
+ Free Software Foundation, Inc.
This file is part of GNU Emacs.
sym = Fintern (name, table);
- oexp = XSYMBOL (sym)->value;
+ oexp = SYMBOL_VALUE (sym);
ohook = XSYMBOL (sym)->function;
if (!((EQ (oexp, expansion)
|| (STRINGP (oexp) && STRINGP (expansion)
sym = Qnil;
if (!NILP (current_buffer->abbrev_table))
sym = Fintern_soft (abbrev, current_buffer->abbrev_table);
- if (NILP (XSYMBOL (sym)->value))
+ if (NILP (SYMBOL_VALUE (sym)))
sym = Qnil;
if (NILP (sym))
sym = Fintern_soft (abbrev, Vglobal_abbrev_table);
}
- if (NILP (XSYMBOL (sym)->value)) return Qnil;
+ if (NILP (SYMBOL_VALUE (sym)))
+ return Qnil;
return sym;
}
wordend - wordstart, wordend_byte - wordstart_byte);
else
XSETFASTINT (sym, 0);
- if (INTEGERP (sym) || NILP (XSYMBOL (sym)->value))
+ if (INTEGERP (sym) || NILP (SYMBOL_VALUE (sym)))
sym = oblookup (Vglobal_abbrev_table, buffer,
wordend - wordstart, wordend_byte - wordstart_byte);
- if (INTEGERP (sym) || NILP (XSYMBOL (sym)->value))
+ if (INTEGERP (sym) || NILP (SYMBOL_VALUE (sym)))
return value;
if (INTERACTIVE && !EQ (minibuf_window, selected_window))
/* If this abbrev has an expansion, delete the abbrev
and insert the expansion. */
- expansion = XSYMBOL (sym)->value;
+ expansion = SYMBOL_VALUE (sym);
if (STRINGP (expansion))
{
SET_PT (wordstart);
Lisp_Object val;
int zv_before;
- val = XSYMBOL (Vlast_abbrev)->value;
+ val = SYMBOL_VALUE (Vlast_abbrev);
if (!STRINGP (val))
error ("value of abbrev-symbol must be a string");
zv_before = ZV;
Lisp_Object sym, stream;
{
Lisp_Object name;
- if (NILP (XSYMBOL (sym)->value))
+ if (NILP (SYMBOL_VALUE (sym)))
return;
insert (" (", 5);
XSETSTRING (name, XSYMBOL (sym)->name);
Fprin1 (name, stream);
insert (" ", 1);
- Fprin1 (XSYMBOL (sym)->value, stream);
+ Fprin1 (SYMBOL_VALUE (sym), stream);
insert (" ", 1);
Fprin1 (XSYMBOL (sym)->function, stream);
insert (" ", 1);
{
Lisp_Object one;
- if (NILP (XSYMBOL (sym)->value))
+ if (NILP (SYMBOL_VALUE (sym)))
return;
one = make_number (1);
Fprin1 (Fsymbol_name (sym), stream);
Findent_to (make_number (15), one);
Fprin1 (XSYMBOL (sym)->plist, stream);
Findent_to (make_number (20), one);
- Fprin1 (XSYMBOL (sym)->value, stream);
+ Fprin1 (SYMBOL_VALUE (sym), stream);
if (!NILP (XSYMBOL (sym)->function))
{
Findent_to (make_number (45), one);
for (tail = b->local_var_alist; !NILP (tail); tail = XCDR (tail))
{
- valcontents = XSYMBOL (XCAR (XCAR (tail)))->value;
+ valcontents = SYMBOL_VALUE (XCAR (XCAR (tail)));
if ((BUFFER_LOCAL_VALUEP (valcontents)
|| SOME_BUFFER_LOCAL_VALUEP (valcontents))
&& (tem = XBUFFER_LOCAL_VALUE (valcontents)->realvalue,
if (old_buf)
for (tail = old_buf->local_var_alist; !NILP (tail); tail = XCDR (tail))
{
- valcontents = XSYMBOL (XCAR (XCAR (tail)))->value;
+ valcontents = SYMBOL_VALUE (XCAR (XCAR (tail)));
if ((BUFFER_LOCAL_VALUEP (valcontents)
|| SOME_BUFFER_LOCAL_VALUEP (valcontents))
&& (tem = XBUFFER_LOCAL_VALUE (valcontents)->realvalue,
sym = XCAR (XCAR (alist));
/* Need not do anything if some other buffer's binding is now encached. */
- tem = XBUFFER_LOCAL_VALUE (XSYMBOL (sym)->value)->buffer;
+ tem = XBUFFER_LOCAL_VALUE (SYMBOL_VALUE (sym))->buffer;
if (BUFFERP (tem) && XBUFFER (tem) == current_buffer)
{
/* Symbol is set up for this buffer's old local value.
Set it up for the current buffer with the default value. */
- tem = XBUFFER_LOCAL_VALUE (XSYMBOL (sym)->value)->cdr;
+ tem = XBUFFER_LOCAL_VALUE (SYMBOL_VALUE (sym))->cdr;
/* Store the symbol's current value into the alist entry
it is currently set up for. This is so that, if the
local is marked permanent, and we make it local again
later in Fkill_all_local_variables, we don't lose the value. */
XCDR (XCAR (tem))
- = do_symval_forwarding (XBUFFER_LOCAL_VALUE (XSYMBOL (sym)->value)->realvalue);
+ = do_symval_forwarding (XBUFFER_LOCAL_VALUE (SYMBOL_VALUE (sym))->realvalue);
/* Switch to the symbol's default-value alist entry. */
XCAR (tem) = tem;
/* Mark it as current for buffer B. */
- XBUFFER_LOCAL_VALUE (XSYMBOL (sym)->value)->buffer = buffer;
+ XBUFFER_LOCAL_VALUE (SYMBOL_VALUE (sym))->buffer = buffer;
/* Store the current value into any forwarding in the symbol. */
store_symval_forwarding (sym,
- XBUFFER_LOCAL_VALUE (XSYMBOL (sym)->value)->realvalue,
+ XBUFFER_LOCAL_VALUE (SYMBOL_VALUE (sym))->realvalue,
XCDR (tem), NULL);
}
}
/* Coding system handler (conversion, detection, and etc).
Copyright (C) 1995, 1997, 1998 Electrotechnical Laboratory, JAPAN.
Licensed to the Free Software Foundation.
+ Copyright (C) 2001 Free Software Foundation, Inc.
This file is part of GNU Emacs.
if (! mask)
idx = CODING_CATEGORY_IDX_RAW_TEXT;
- val = XSYMBOL (XVECTOR (Vcoding_category_table)->contents[idx])->value;
+ val = SYMBOL_VALUE (XVECTOR (Vcoding_category_table)->contents[idx]);
if (coding->eol_type != CODING_EOL_UNDECIDED)
{
{
Lisp_Object val;
- val = XSYMBOL (XVECTOR (Vcoding_category_table)->contents[i])->value;
+ val = SYMBOL_VALUE (XVECTOR (Vcoding_category_table)->contents[i]);
if (!NILP (val))
{
if (! coding_system_table[i])
if (STRING_MULTIBYTE (object))
/* use default, we can't guess correct value */
- coding_system = XSYMBOL (XCAR (Vcoding_category_list))->value;
+ coding_system = SYMBOL_VALUE (XCAR (Vcoding_category_list));
else
coding_system = Qraw_text;
}
if (SYMBOLP (prop))
{
Lisp_Object valcontents;
- valcontents = XSYMBOL (prop)->value;
+ valcontents = SYMBOL_VALUE (prop);
if ((BUFFER_LOCAL_VALUEP (valcontents)
|| SOME_BUFFER_LOCAL_VALUEP (valcontents))
&& XBUFFER_LOCAL_VALUE (valcontents)->check_frame
"Normal hook run when clearing the echo area.");
#endif
Qecho_area_clear_hook = intern ("echo-area-clear-hook");
- XSYMBOL (Qecho_area_clear_hook)->value = Qnil;
+ SET_SYMBOL_VALUE (Qecho_area_clear_hook, Qnil);
DEFVAR_LISP ("lucid-menu-bar-dirty-flag", &Vlucid_menu_bar_dirty_flag,
"t means menu bar, specified Lucid style, needs to be recomputed.");
Lisp_Object histval;
/* If variable is unbound, make it nil. */
- if (EQ (XSYMBOL (Vminibuffer_history_variable)->value, Qunbound))
+ if (EQ (SYMBOL_VALUE (Vminibuffer_history_variable), Qunbound))
Fset (Vminibuffer_history_variable, Qnil);
histval = Fsymbol_value (Vminibuffer_history_variable);
/* Functions for Sun Windows menus and selection buffer.
- Copyright (C) 1987, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1987, 1999, 2001 Free Software Foundation, Inc.
This file is probably totally obsolete. In any case, the FSF is
unwilling to support it. We agreed to include it in our distribution
CHECK_STRING(String, 0);
Value = Fcdr(Pair);
if (SYMBOLP (Value))
- Value = XSYMBOL(Value)->value;
+ Value = SYMBOL_VALUE (Value);
if (VECTORP (Value)) {
submenu = sun_menu_create (Value);
menu_item = menu_create_item
/* 16-bit Windows Selection processing for emacs on MS-Windows
- Copyright (C) 1996, 1997 Free Software Foundation.
+ Copyright (C) 1996, 1997, 2001 Free Software Foundation.
This file is part of GNU Emacs.
into the clipboard if we run under Windows, so we cannot check
the clipboard alone.) */
if ((EQ (selection, Qnil) || EQ (selection, QPRIMARY))
- && ! NILP (XSYMBOL (Fintern_soft (build_string ("kill-ring"),
- Qnil))->value))
+ && ! NILP (SYMBOL_VALUE (Fintern_soft (build_string ("kill-ring"),
+ Qnil))))
return Qt;
if (EQ (selection, QCLIPBOARD))