Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
8ec01c70
Commit
8ec01c70
authored
Mar 20, 2000
by
Gerd Moellmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Fset_buffer_modified_p): Set update_mode_lines
only if buffer is displayed in some window.
parent
15e26c76
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
src/buffer.c
src/buffer.c
+18
-1
No files found.
src/buffer.c
View file @
8ec01c70
...
...
@@ -806,6 +806,7 @@ A non-nil FLAG means mark the buffer modified.")
{
register
int
already
;
register
Lisp_Object
fn
;
Lisp_Object
buffer
,
window
;
#ifdef CLASH_DETECTION
/* If buffer becoming modified, lock the file.
...
...
@@ -824,7 +825,23 @@ A non-nil FLAG means mark the buffer modified.")
#endif
/* CLASH_DETECTION */
SAVE_MODIFF
=
NILP
(
flag
)
?
MODIFF
:
0
;
update_mode_lines
++
;
/* Set update_mode_lines only if buffer is displayed in some window.
Packages like jit-lock or lazy-lock preserve a buffer's modified
state by recording/restoring the state around blocks of code.
Setting update_mode_lines makes redisplay consider all windows
(on all frames). Stealth fontification of buffers not displayed
would incur additional redisplay costs if we'd set
update_modes_lines unconditionally.
Ideally, I think there should be another mechanism for fontifying
buffers without "modifying" buffers, or redisplay should be
smarter about updating the `*' in mode lines. --gerd */
XSETBUFFER
(
buffer
,
current_buffer
);
window
=
Fget_buffer_window
(
buffer
,
Qt
);
if
(
WINDOWP
(
window
))
update_mode_lines
++
;
return
flag
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment