aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorGerd Moellmann2000-03-20 12:24:57 +0000
committerGerd Moellmann2000-03-20 12:24:57 +0000
commit8ec01c70fa334531d0c0f634433f3b8bf1ccb450 (patch)
tree1ecd3e772b9b1caf42ad3dce608a86545d0f1bd3 /src/buffer.c
parent15e26c76c968d85f2f27ea899d3cadc28a1e10c6 (diff)
downloademacs-8ec01c70fa334531d0c0f634433f3b8bf1ccb450.tar.gz
emacs-8ec01c70fa334531d0c0f634433f3b8bf1ccb450.zip
(Fset_buffer_modified_p): Set update_mode_lines
only if buffer is displayed in some window.
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 59487962008..878a81c47c7 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -806,6 +806,7 @@ A non-nil FLAG means mark the buffer modified.")
806{ 806{
807 register int already; 807 register int already;
808 register Lisp_Object fn; 808 register Lisp_Object fn;
809 Lisp_Object buffer, window;
809 810
810#ifdef CLASH_DETECTION 811#ifdef CLASH_DETECTION
811 /* If buffer becoming modified, lock the file. 812 /* If buffer becoming modified, lock the file.
@@ -824,7 +825,23 @@ A non-nil FLAG means mark the buffer modified.")
824#endif /* CLASH_DETECTION */ 825#endif /* CLASH_DETECTION */
825 826
826 SAVE_MODIFF = NILP (flag) ? MODIFF : 0; 827 SAVE_MODIFF = NILP (flag) ? MODIFF : 0;
827 update_mode_lines++; 828
829 /* Set update_mode_lines only if buffer is displayed in some window.
830 Packages like jit-lock or lazy-lock preserve a buffer's modified
831 state by recording/restoring the state around blocks of code.
832 Setting update_mode_lines makes redisplay consider all windows
833 (on all frames). Stealth fontification of buffers not displayed
834 would incur additional redisplay costs if we'd set
835 update_modes_lines unconditionally.
836
837 Ideally, I think there should be another mechanism for fontifying
838 buffers without "modifying" buffers, or redisplay should be
839 smarter about updating the `*' in mode lines. --gerd */
840 XSETBUFFER (buffer, current_buffer);
841 window = Fget_buffer_window (buffer, Qt);
842 if (WINDOWP (window))
843 update_mode_lines++;
844
828 return flag; 845 return flag;
829} 846}
830 847