diff options
| author | Dmitry Antipov | 2012-08-20 11:42:06 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2012-08-20 11:42:06 +0400 |
| commit | 4ce60d2ec56748e74fb56487b7761a2bdba1d644 (patch) | |
| tree | 6dc415220c4199b029e638bca3dcb10c493f4b67 /src/data.c | |
| parent | 36e8d1eb27b39ea35e9a57575858cb86a8784f2a (diff) | |
| download | emacs-4ce60d2ec56748e74fb56487b7761a2bdba1d644.tar.gz emacs-4ce60d2ec56748e74fb56487b7761a2bdba1d644.zip | |
Inline getter and setter functions for per-buffer values.
* buffer.h (per_buffer_default, set_per_buffer_default)
(per_buffer_value, set_per_buffer_value): New functions.
(PER_BUFFER_VALUE, PER_BUFFER_DEFAULT): Remove.
* buffer.c, data.c: Adjust users.
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/data.c b/src/data.c index 6dd852dd710..f812c280b40 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -847,7 +847,7 @@ do_symval_forwarding (register union Lisp_Fwd *valcontents) | |||
| 847 | return *XOBJFWD (valcontents)->objvar; | 847 | return *XOBJFWD (valcontents)->objvar; |
| 848 | 848 | ||
| 849 | case Lisp_Fwd_Buffer_Obj: | 849 | case Lisp_Fwd_Buffer_Obj: |
| 850 | return PER_BUFFER_VALUE (current_buffer, | 850 | return per_buffer_value (current_buffer, |
| 851 | XBUFFER_OBJFWD (valcontents)->offset); | 851 | XBUFFER_OBJFWD (valcontents)->offset); |
| 852 | 852 | ||
| 853 | case Lisp_Fwd_Kboard_Obj: | 853 | case Lisp_Fwd_Kboard_Obj: |
| @@ -919,7 +919,7 @@ store_symval_forwarding (union Lisp_Fwd *valcontents, register Lisp_Object newva | |||
| 919 | b = XBUFFER (lbuf); | 919 | b = XBUFFER (lbuf); |
| 920 | 920 | ||
| 921 | if (! PER_BUFFER_VALUE_P (b, idx)) | 921 | if (! PER_BUFFER_VALUE_P (b, idx)) |
| 922 | PER_BUFFER_VALUE (b, offset) = newval; | 922 | set_per_buffer_value (b, offset, newval); |
| 923 | } | 923 | } |
| 924 | } | 924 | } |
| 925 | break; | 925 | break; |
| @@ -937,7 +937,7 @@ store_symval_forwarding (union Lisp_Fwd *valcontents, register Lisp_Object newva | |||
| 937 | 937 | ||
| 938 | if (buf == NULL) | 938 | if (buf == NULL) |
| 939 | buf = current_buffer; | 939 | buf = current_buffer; |
| 940 | PER_BUFFER_VALUE (buf, offset) = newval; | 940 | set_per_buffer_value (buf, offset, newval); |
| 941 | } | 941 | } |
| 942 | break; | 942 | break; |
| 943 | 943 | ||
| @@ -1309,7 +1309,7 @@ default_value (Lisp_Object symbol) | |||
| 1309 | { | 1309 | { |
| 1310 | int offset = XBUFFER_OBJFWD (valcontents)->offset; | 1310 | int offset = XBUFFER_OBJFWD (valcontents)->offset; |
| 1311 | if (PER_BUFFER_IDX (offset) != 0) | 1311 | if (PER_BUFFER_IDX (offset) != 0) |
| 1312 | return PER_BUFFER_DEFAULT (offset); | 1312 | return per_buffer_default (offset); |
| 1313 | } | 1313 | } |
| 1314 | 1314 | ||
| 1315 | /* For other variables, get the current value. */ | 1315 | /* For other variables, get the current value. */ |
| @@ -1396,7 +1396,7 @@ for this variable. */) | |||
| 1396 | int offset = XBUFFER_OBJFWD (valcontents)->offset; | 1396 | int offset = XBUFFER_OBJFWD (valcontents)->offset; |
| 1397 | int idx = PER_BUFFER_IDX (offset); | 1397 | int idx = PER_BUFFER_IDX (offset); |
| 1398 | 1398 | ||
| 1399 | PER_BUFFER_DEFAULT (offset) = value; | 1399 | set_per_buffer_default (offset, value); |
| 1400 | 1400 | ||
| 1401 | /* If this variable is not always local in all buffers, | 1401 | /* If this variable is not always local in all buffers, |
| 1402 | set it in the buffers that don't nominally have a local value. */ | 1402 | set it in the buffers that don't nominally have a local value. */ |
| @@ -1406,7 +1406,7 @@ for this variable. */) | |||
| 1406 | 1406 | ||
| 1407 | FOR_EACH_BUFFER (b) | 1407 | FOR_EACH_BUFFER (b) |
| 1408 | if (!PER_BUFFER_VALUE_P (b, idx)) | 1408 | if (!PER_BUFFER_VALUE_P (b, idx)) |
| 1409 | PER_BUFFER_VALUE (b, offset) = value; | 1409 | set_per_buffer_value (b, offset, value); |
| 1410 | } | 1410 | } |
| 1411 | return value; | 1411 | return value; |
| 1412 | } | 1412 | } |
| @@ -1705,8 +1705,8 @@ From now on the default value will apply in this buffer. Return VARIABLE. */) | |||
| 1705 | if (idx > 0) | 1705 | if (idx > 0) |
| 1706 | { | 1706 | { |
| 1707 | SET_PER_BUFFER_VALUE_P (current_buffer, idx, 0); | 1707 | SET_PER_BUFFER_VALUE_P (current_buffer, idx, 0); |
| 1708 | PER_BUFFER_VALUE (current_buffer, offset) | 1708 | set_per_buffer_value (current_buffer, offset, |
| 1709 | = PER_BUFFER_DEFAULT (offset); | 1709 | per_buffer_default (offset)); |
| 1710 | } | 1710 | } |
| 1711 | } | 1711 | } |
| 1712 | return variable; | 1712 | return variable; |