Commit 080db47f authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

Switch cache-long-scans to t by default.

 src/xdisp.c (message_dolog): Make sure the *Messages* buffer has its
 cache-long-scans disabled, since we don't want to call
 prepare_to_modify_buffer (in insert_1_both) for each message we
 display.
 src/buffer.h (bset_cache_long_scans): New INLINE function, moved
 from buffer.c.  Improve commentary to the buffer field setter
 functions.
 src/buffer.c (bset_cache_long_scans): Static function deleted.
 Improve commentary to the buffer field setter functions.
 (init_buffer_once): Default for cache-long-scans changed to t.
 (Bug#15797)
parent 1606c2d3
2013-11-08 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (message_dolog): Make sure the *Messages* buffer has its
cache-long-scans disabled, since we don't want to call
prepare_to_modify_buffer (in insert_1_both) for each message we
display.
* buffer.h (bset_cache_long_scans): New INLINE function, moved
from buffer.c. Improve commentary to the buffer field setter
functions.
* buffer.c (bset_cache_long_scans): Static function deleted.
Improve commentary to the buffer field setter functions.
(init_buffer_once): Default for cache-long-scans changed to t.
(Bug#15797)
2013-11-08 Paul Eggert <eggert@cs.ucla.edu>
* chartab.c (make_sub_char_table): Fix size typo (Bug#15825).
......
......@@ -154,7 +154,8 @@ CHECK_OVERLAY (Lisp_Object x)
CHECK_TYPE (OVERLAYP (x), Qoverlayp, x);
}
/* These setters are used only in this file, so they can be private. */
/* These setters are used only in this file, so they can be private.
The public setters are inline functions defined in buffer.h. */
static void
bset_abbrev_mode (struct buffer *b, Lisp_Object val)
{
......@@ -201,11 +202,6 @@ bset_buffer_file_coding_system (struct buffer *b, Lisp_Object val)
b->INTERNAL_FIELD (buffer_file_coding_system) = val;
}
static void
bset_cache_long_scans (struct buffer *b, Lisp_Object val)
{
b->INTERNAL_FIELD (cache_long_scans) = val;
}
static void
bset_case_fold_search (struct buffer *b, Lisp_Object val)
{
b->INTERNAL_FIELD (case_fold_search) = val;
......@@ -5185,7 +5181,7 @@ init_buffer_once (void)
bset_buffer_file_coding_system (&buffer_defaults, Qnil);
XSETFASTINT (BVAR (&buffer_defaults, fill_column), 70);
XSETFASTINT (BVAR (&buffer_defaults, left_margin), 0);
bset_cache_long_scans (&buffer_defaults, Qnil);
bset_cache_long_scans (&buffer_defaults, Qt);
bset_file_truename (&buffer_defaults, Qnil);
XSETFASTINT (BVAR (&buffer_defaults, display_count), 0);
XSETFASTINT (BVAR (&buffer_defaults, left_margin_cols), 0);
......
......@@ -871,13 +871,19 @@ struct buffer
};
/* Most code should use these functions to set Lisp fields in struct
buffer. */
buffer. (Some setters that are priviate to a single .c file are
defined as static in those files.) */
INLINE void
bset_bidi_paragraph_direction (struct buffer *b, Lisp_Object val)
{
b->INTERNAL_FIELD (bidi_paragraph_direction) = val;
}
INLINE void
bset_cache_long_scans (struct buffer *b, Lisp_Object val)
{
b->INTERNAL_FIELD (cache_long_scans) = val;
}
INLINE void
bset_case_canon_table (struct buffer *b, Lisp_Object val)
{
b->INTERNAL_FIELD (case_canon_table) = val;
......
......@@ -9488,6 +9488,7 @@ message_dolog (const char *m, ptrdiff_t nbytes, bool nlflag, bool multibyte)
}
 
bset_undo_list (current_buffer, Qt);
bset_cache_long_scans (current_buffer, Qnil);
 
oldpoint = message_dolog_marker1;
set_marker_restricted_both (oldpoint, Qnil, PT, PT_BYTE);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment