summaryrefslogtreecommitdiff
path: root/src/window.h
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2012-12-10 21:34:47 +0400
committerDmitry Antipov <dmantipov@yandex.ru>2012-12-10 21:34:47 +0400
commit98a07056558be8c13945a3a99b4801996af685a4 (patch)
tree657c931f7e1cb73ef5158beda8a429013e3a23cf /src/window.h
parent2b8c906403908a5037b52bfecb72b65d0ce0cd1e (diff)
downloademacs-98a07056558be8c13945a3a99b4801996af685a4.tar.gz
emacs-98a07056558be8c13945a3a99b4801996af685a4.tar.bz2
emacs-98a07056558be8c13945a3a99b4801996af685a4.zip
Per-buffer window counters.
* buffer.h (struct buffer): New member window_count. (buffer_window_count): New function. * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): Initialize window_count. (Fkill_buffer): Verify window_count for the buffer being killed. (modify_overlay): Do not force redisplay if buffer is not shown in any window. (init_buffer_once): Initialize window_count for buffer_defaults and buffer_local_symbols. * window.h (buffer_shared): Remove declaration. (wset_buffer): Convert from inline ... * window.c (wset_buffer): ... to an ordinary function. (adjust_window_count): New function. (make_parent_window): Use it. * xdisp.c (buffer_shared): Remove. (redisplay_internal, redisplay_window): Adjust users. (buffer_shared_and_changed): Use per-buffer window counter.
Diffstat (limited to 'src/window.h')
-rw-r--r--src/window.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/window.h b/src/window.h
index 2a12226c0aa..f4f42a25af4 100644
--- a/src/window.h
+++ b/src/window.h
@@ -351,11 +351,6 @@ struct window
/* Most code should use these functions to set Lisp fields in struct
window. */
WINDOW_INLINE void
-wset_buffer (struct window *w, Lisp_Object val)
-{
- w->buffer = val;
-}
-WINDOW_INLINE void
wset_frame (struct window *w, Lisp_Object val)
{
w->frame = val;
@@ -947,11 +942,6 @@ extern int windows_or_buffers_changed;
extern int cursor_type_changed;
-/* Number of windows displaying the selected buffer. Normally this is
- 1, but it can be more. */
-
-extern int buffer_shared;
-
/* If *ROWS or *COLS are too small a size for FRAME, set them to the
minimum allowable size. */
@@ -997,6 +987,8 @@ extern int window_body_cols (struct window *w);
extern void temp_output_buffer_show (Lisp_Object);
extern void replace_buffer_in_windows (Lisp_Object);
extern void replace_buffer_in_windows_safely (Lisp_Object);
+/* This looks like a setter, but it is a bit special. */
+extern void wset_buffer (struct window *, Lisp_Object);
extern void init_window_once (void);
extern void init_window (void);
extern void syms_of_window (void);