+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).
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)
{
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;
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);
};
/* 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;
}
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);