diff options
| author | Dmitry Antipov | 2013-08-05 08:14:43 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2013-08-05 08:14:43 +0400 |
| commit | 8f3a2c2659ddee1ae84b4b8bb28f6c388f87fd0f (patch) | |
| tree | 36980f65ace0a9492e3a28473a89428d6f45c44f /src/data.c | |
| parent | 3e2cd454fdc04a1afefa23cdfe241c11862eaa8d (diff) | |
| download | emacs-8f3a2c2659ddee1ae84b4b8bb28f6c388f87fd0f.tar.gz emacs-8f3a2c2659ddee1ae84b4b8bb28f6c388f87fd0f.zip | |
New macro to iterate over live buffers similar to frames.
* buffer.h (FOR_EACH_LIVE_BUFFER): New macro.
(Vbuffer_alist, Qpriority, Qbefore_string, Qafter_string):
Declare buffer-related variables here to offload lisp.h.
* buffer.c (Vbuffer_alist): Adjust comment.
(Fget_file_buffer, get_truename_buffer, Fother_buffer)
(other_buffer_safely):
* data.c (store_symval_forwarding):
* dispnew.c (Fframe_or_buffer_changed_p):
* fileio.c (Fdo_auto_save):
* filelock.c (unlock_all_files):
* minibuf.c (read_minibuf): Use FOR_EACH_LIVE_BUFFER.
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/data.c b/src/data.c index d1e43ac1b5f..ef3a6965779 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -981,19 +981,14 @@ store_symval_forwarding (union Lisp_Fwd *valcontents, register Lisp_Object newva | |||
| 981 | - (char *) &buffer_defaults); | 981 | - (char *) &buffer_defaults); |
| 982 | int idx = PER_BUFFER_IDX (offset); | 982 | int idx = PER_BUFFER_IDX (offset); |
| 983 | 983 | ||
| 984 | Lisp_Object tail; | 984 | Lisp_Object tail, buf; |
| 985 | 985 | ||
| 986 | if (idx <= 0) | 986 | if (idx <= 0) |
| 987 | break; | 987 | break; |
| 988 | 988 | ||
| 989 | for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail)) | 989 | FOR_EACH_LIVE_BUFFER (tail, buf) |
| 990 | { | 990 | { |
| 991 | Lisp_Object lbuf; | 991 | struct buffer *b = XBUFFER (buf); |
| 992 | struct buffer *b; | ||
| 993 | |||
| 994 | lbuf = Fcdr (XCAR (tail)); | ||
| 995 | if (!BUFFERP (lbuf)) continue; | ||
| 996 | b = XBUFFER (lbuf); | ||
| 997 | 992 | ||
| 998 | if (! PER_BUFFER_VALUE_P (b, idx)) | 993 | if (! PER_BUFFER_VALUE_P (b, idx)) |
| 999 | set_per_buffer_value (b, offset, newval); | 994 | set_per_buffer_value (b, offset, newval); |