[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r115033: Switch cache-long-scans to t by default.
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] trunk r115033: Switch cache-long-scans to t by default. |
Date: |
Fri, 08 Nov 2013 10:22:39 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 115033
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/15797
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Fri 2013-11-08 12:21:35 +0200
message:
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)
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/buffer.c buffer.c-20091113204419-o5vbwnq5f7feedwu-264
src/buffer.h buffer.h-20091113204419-o5vbwnq5f7feedwu-196
src/xdisp.c xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-11-08 07:28:21 +0000
+++ b/src/ChangeLog 2013-11-08 10:21:35 +0000
@@ -1,3 +1,19 @@
+2013-11-08 Eli Zaretskii <address@hidden>
+
+ * 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 <address@hidden>
* chartab.c (make_sub_char_table): Fix size typo (Bug#15825).
=== modified file 'src/buffer.c'
--- a/src/buffer.c 2013-11-06 18:41:31 +0000
+++ b/src/buffer.c 2013-11-08 10:21:35 +0000
@@ -154,7 +154,8 @@
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 @@
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 @@
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);
=== modified file 'src/buffer.h'
--- a/src/buffer.h 2013-09-20 15:34:36 +0000
+++ b/src/buffer.h 2013-11-08 10:21:35 +0000
@@ -871,13 +871,19 @@
};
/* 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;
=== modified file 'src/xdisp.c'
--- a/src/xdisp.c 2013-11-06 21:17:26 +0000
+++ b/src/xdisp.c 2013-11-08 10:21:35 +0000
@@ -9488,6 +9488,7 @@
}
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);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r115033: Switch cache-long-scans to t by default.,
Eli Zaretskii <=