aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2001-10-05 09:49:39 +0000
committerGerd Moellmann2001-10-05 09:49:39 +0000
commitf5c1dd0dc5c566dc4d192dfa04edb4127f45beb8 (patch)
treef09a785800dc85e90ee2d555bf756d079d8740c3 /src
parent44c6c0191f10c4841b6230c77ba7ae007b4cd85e (diff)
downloademacs-f5c1dd0dc5c566dc4d192dfa04edb4127f45beb8.tar.gz
emacs-f5c1dd0dc5c566dc4d192dfa04edb4127f45beb8.zip
Use SYMBOL_VALUE/SET_SYMBOL_VALUE macros instead of accessing
symbols' value directly.
Diffstat (limited to 'src')
-rw-r--r--src/buffer.c14
-rw-r--r--src/coding.c4
-rw-r--r--src/fns.c2
-rw-r--r--src/frame.c2
-rw-r--r--src/minibuf.c2
5 files changed, 12 insertions, 12 deletions
diff --git a/src/buffer.c b/src/buffer.c
index a20b2250209..198139019ea 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1683,7 +1683,7 @@ set_buffer_internal_1 (b)
1683 1683
1684 for (tail = b->local_var_alist; !NILP (tail); tail = XCDR (tail)) 1684 for (tail = b->local_var_alist; !NILP (tail); tail = XCDR (tail))
1685 { 1685 {
1686 valcontents = XSYMBOL (XCAR (XCAR (tail)))->value; 1686 valcontents = SYMBOL_VALUE (XCAR (XCAR (tail)));
1687 if ((BUFFER_LOCAL_VALUEP (valcontents) 1687 if ((BUFFER_LOCAL_VALUEP (valcontents)
1688 || SOME_BUFFER_LOCAL_VALUEP (valcontents)) 1688 || SOME_BUFFER_LOCAL_VALUEP (valcontents))
1689 && (tem = XBUFFER_LOCAL_VALUE (valcontents)->realvalue, 1689 && (tem = XBUFFER_LOCAL_VALUE (valcontents)->realvalue,
@@ -1698,7 +1698,7 @@ set_buffer_internal_1 (b)
1698 if (old_buf) 1698 if (old_buf)
1699 for (tail = old_buf->local_var_alist; !NILP (tail); tail = XCDR (tail)) 1699 for (tail = old_buf->local_var_alist; !NILP (tail); tail = XCDR (tail))
1700 { 1700 {
1701 valcontents = XSYMBOL (XCAR (XCAR (tail)))->value; 1701 valcontents = SYMBOL_VALUE (XCAR (XCAR (tail)));
1702 if ((BUFFER_LOCAL_VALUEP (valcontents) 1702 if ((BUFFER_LOCAL_VALUEP (valcontents)
1703 || SOME_BUFFER_LOCAL_VALUEP (valcontents)) 1703 || SOME_BUFFER_LOCAL_VALUEP (valcontents))
1704 && (tem = XBUFFER_LOCAL_VALUE (valcontents)->realvalue, 1704 && (tem = XBUFFER_LOCAL_VALUE (valcontents)->realvalue,
@@ -2260,26 +2260,26 @@ swap_out_buffer_local_variables (b)
2260 sym = XCAR (XCAR (alist)); 2260 sym = XCAR (XCAR (alist));
2261 2261
2262 /* Need not do anything if some other buffer's binding is now encached. */ 2262 /* Need not do anything if some other buffer's binding is now encached. */
2263 tem = XBUFFER_LOCAL_VALUE (XSYMBOL (sym)->value)->buffer; 2263 tem = XBUFFER_LOCAL_VALUE (SYMBOL_VALUE (sym))->buffer;
2264 if (BUFFERP (tem) && XBUFFER (tem) == current_buffer) 2264 if (BUFFERP (tem) && XBUFFER (tem) == current_buffer)
2265 { 2265 {
2266 /* Symbol is set up for this buffer's old local value. 2266 /* Symbol is set up for this buffer's old local value.
2267 Set it up for the current buffer with the default value. */ 2267 Set it up for the current buffer with the default value. */
2268 2268
2269 tem = XBUFFER_LOCAL_VALUE (XSYMBOL (sym)->value)->cdr; 2269 tem = XBUFFER_LOCAL_VALUE (SYMBOL_VALUE (sym))->cdr;
2270 /* Store the symbol's current value into the alist entry 2270 /* Store the symbol's current value into the alist entry
2271 it is currently set up for. This is so that, if the 2271 it is currently set up for. This is so that, if the
2272 local is marked permanent, and we make it local again 2272 local is marked permanent, and we make it local again
2273 later in Fkill_all_local_variables, we don't lose the value. */ 2273 later in Fkill_all_local_variables, we don't lose the value. */
2274 XCDR (XCAR (tem)) 2274 XCDR (XCAR (tem))
2275 = do_symval_forwarding (XBUFFER_LOCAL_VALUE (XSYMBOL (sym)->value)->realvalue); 2275 = do_symval_forwarding (XBUFFER_LOCAL_VALUE (SYMBOL_VALUE (sym))->realvalue);
2276 /* Switch to the symbol's default-value alist entry. */ 2276 /* Switch to the symbol's default-value alist entry. */
2277 XCAR (tem) = tem; 2277 XCAR (tem) = tem;
2278 /* Mark it as current for buffer B. */ 2278 /* Mark it as current for buffer B. */
2279 XBUFFER_LOCAL_VALUE (XSYMBOL (sym)->value)->buffer = buffer; 2279 XBUFFER_LOCAL_VALUE (SYMBOL_VALUE (sym))->buffer = buffer;
2280 /* Store the current value into any forwarding in the symbol. */ 2280 /* Store the current value into any forwarding in the symbol. */
2281 store_symval_forwarding (sym, 2281 store_symval_forwarding (sym,
2282 XBUFFER_LOCAL_VALUE (XSYMBOL (sym)->value)->realvalue, 2282 XBUFFER_LOCAL_VALUE (SYMBOL_VALUE (sym))->realvalue,
2283 XCDR (tem), NULL); 2283 XCDR (tem), NULL);
2284 } 2284 }
2285 } 2285 }
diff --git a/src/coding.c b/src/coding.c
index b59bbce7edd..43f1867d9f8 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -4110,7 +4110,7 @@ detect_coding (coding, src, src_bytes)
4110 if (! mask) 4110 if (! mask)
4111 idx = CODING_CATEGORY_IDX_RAW_TEXT; 4111 idx = CODING_CATEGORY_IDX_RAW_TEXT;
4112 4112
4113 val = XSYMBOL (XVECTOR (Vcoding_category_table)->contents[idx])->value; 4113 val = SYMBOL_VALUE (XVECTOR (Vcoding_category_table)->contents[idx]);
4114 4114
4115 if (coding->eol_type != CODING_EOL_UNDECIDED) 4115 if (coding->eol_type != CODING_EOL_UNDECIDED)
4116 { 4116 {
@@ -6881,7 +6881,7 @@ call this function")
6881 { 6881 {
6882 Lisp_Object val; 6882 Lisp_Object val;
6883 6883
6884 val = XSYMBOL (XVECTOR (Vcoding_category_table)->contents[i])->value; 6884 val = SYMBOL_VALUE (XVECTOR (Vcoding_category_table)->contents[i]);
6885 if (!NILP (val)) 6885 if (!NILP (val))
6886 { 6886 {
6887 if (! coding_system_table[i]) 6887 if (! coding_system_table[i])
diff --git a/src/fns.c b/src/fns.c
index f99ab151442..b8cc9566d22 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -5020,7 +5020,7 @@ guesswork fails. Normally, an error is signaled in such case.")
5020 5020
5021 if (STRING_MULTIBYTE (object)) 5021 if (STRING_MULTIBYTE (object))
5022 /* use default, we can't guess correct value */ 5022 /* use default, we can't guess correct value */
5023 coding_system = XSYMBOL (XCAR (Vcoding_category_list))->value; 5023 coding_system = SYMBOL_VALUE (XCAR (Vcoding_category_list));
5024 else 5024 else
5025 coding_system = Qraw_text; 5025 coding_system = Qraw_text;
5026 } 5026 }
diff --git a/src/frame.c b/src/frame.c
index 818402bdade..3fb507b7752 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1915,7 +1915,7 @@ store_frame_param (f, prop, val)
1915 if (SYMBOLP (prop)) 1915 if (SYMBOLP (prop))
1916 { 1916 {
1917 Lisp_Object valcontents; 1917 Lisp_Object valcontents;
1918 valcontents = XSYMBOL (prop)->value; 1918 valcontents = SYMBOL_VALUE (prop);
1919 if ((BUFFER_LOCAL_VALUEP (valcontents) 1919 if ((BUFFER_LOCAL_VALUEP (valcontents)
1920 || SOME_BUFFER_LOCAL_VALUEP (valcontents)) 1920 || SOME_BUFFER_LOCAL_VALUEP (valcontents))
1921 && XBUFFER_LOCAL_VALUE (valcontents)->check_frame 1921 && XBUFFER_LOCAL_VALUE (valcontents)->check_frame
diff --git a/src/minibuf.c b/src/minibuf.c
index 51ea67a10e8..da681c39cf2 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -602,7 +602,7 @@ read_minibuf (map, initial, prompt, backup_n, expflag,
602 Lisp_Object histval; 602 Lisp_Object histval;
603 603
604 /* If variable is unbound, make it nil. */ 604 /* If variable is unbound, make it nil. */
605 if (EQ (XSYMBOL (Vminibuffer_history_variable)->value, Qunbound)) 605 if (EQ (SYMBOL_VALUE (Vminibuffer_history_variable), Qunbound))
606 Fset (Vminibuffer_history_variable, Qnil); 606 Fset (Vminibuffer_history_variable, Qnil);
607 607
608 histval = Fsymbol_value (Vminibuffer_history_variable); 608 histval = Fsymbol_value (Vminibuffer_history_variable);