mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-02 08:22:22 +00:00
Use SYMBOL_VALUE/SET_SYMBOL_VALUE macros instead of accessing
symbols' value directly.
This commit is contained in:
parent
44c6c0191f
commit
f5c1dd0dc5
14
src/buffer.c
14
src/buffer.c
@ -1683,7 +1683,7 @@ set_buffer_internal_1 (b)
|
||||
|
||||
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,
|
||||
@ -1698,7 +1698,7 @@ set_buffer_internal_1 (b)
|
||||
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,
|
||||
@ -2260,26 +2260,26 @@ swap_out_buffer_local_variables (b)
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -4110,7 +4110,7 @@ detect_coding (coding, src, src_bytes)
|
||||
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)
|
||||
{
|
||||
@ -6881,7 +6881,7 @@ call this function")
|
||||
{
|
||||
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])
|
||||
|
@ -5020,7 +5020,7 @@ guesswork fails. Normally, an error is signaled in such case.")
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -1915,7 +1915,7 @@ store_frame_param (f, prop, val)
|
||||
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
|
||||
|
@ -602,7 +602,7 @@ read_minibuf (map, initial, prompt, backup_n, expflag,
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user