aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.h
diff options
context:
space:
mode:
authorXue Fuqiao2013-09-04 08:39:34 +0800
committerXue Fuqiao2013-09-04 08:39:34 +0800
commitadf2fc4a01efe77d73cd52bc9173914ed56ff531 (patch)
treea5a280a5554a7bffeaf94fccae29fa3ac1a5d066 /src/buffer.h
parent63191d9f2043d2e67657e85a7b3842805dd1dad6 (diff)
parent38726039b77db432989fed106c88e9f1aa463281 (diff)
downloademacs-adf2fc4a01efe77d73cd52bc9173914ed56ff531.tar.gz
emacs-adf2fc4a01efe77d73cd52bc9173914ed56ff531.zip
Merge from mainline.
Diffstat (limited to 'src/buffer.h')
-rw-r--r--src/buffer.h30
1 files changed, 21 insertions, 9 deletions
diff --git a/src/buffer.h b/src/buffer.h
index 641a561cafc..169a15c7d0f 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -18,8 +18,8 @@ GNU General Public License for more details.
18You should have received a copy of the GNU General Public License 18You should have received a copy of the GNU General Public License
19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21#include <sys/types.h> /* for off_t, time_t */ 21#include <sys/types.h>
22#include "systime.h" /* for EMACS_TIME */ 22#include <time.h>
23 23
24INLINE_HEADER_BEGIN 24INLINE_HEADER_BEGIN
25#ifndef BUFFER_INLINE 25#ifndef BUFFER_INLINE
@@ -249,6 +249,7 @@ extern void temp_set_point (struct buffer *, ptrdiff_t);
249extern void set_point_both (ptrdiff_t, ptrdiff_t); 249extern void set_point_both (ptrdiff_t, ptrdiff_t);
250extern void temp_set_point_both (struct buffer *, 250extern void temp_set_point_both (struct buffer *,
251 ptrdiff_t, ptrdiff_t); 251 ptrdiff_t, ptrdiff_t);
252extern void set_point_from_marker (Lisp_Object);
252extern void enlarge_buffer_text (struct buffer *, ptrdiff_t); 253extern void enlarge_buffer_text (struct buffer *, ptrdiff_t);
253 254
254 255
@@ -632,9 +633,9 @@ struct buffer
632 /* List of symbols naming the file format used for auto-save file. */ 633 /* List of symbols naming the file format used for auto-save file. */
633 Lisp_Object INTERNAL_FIELD (auto_save_file_format); 634 Lisp_Object INTERNAL_FIELD (auto_save_file_format);
634 635
635 /* True if the newline position cache and width run cache are 636 /* True if the newline position cache, width run cache and BIDI paragraph
636 enabled. See search.c and indent.c. */ 637 cache are enabled. See search.c, indent.c and bidi.c for details. */
637 Lisp_Object INTERNAL_FIELD (cache_long_line_scans); 638 Lisp_Object INTERNAL_FIELD (cache_long_scans);
638 639
639 /* If the width run cache is enabled, this table contains the 640 /* If the width run cache is enabled, this table contains the
640 character widths width_run_cache (see above) assumes. When we 641 character widths width_run_cache (see above) assumes. When we
@@ -794,13 +795,13 @@ struct buffer
794 char local_flags[MAX_PER_BUFFER_VARS]; 795 char local_flags[MAX_PER_BUFFER_VARS];
795 796
796 /* Set to the modtime of the visited file when read or written. 797 /* Set to the modtime of the visited file when read or written.
797 EMACS_NSECS (modtime) == NONEXISTENT_MODTIME_NSECS means 798 modtime.tv_nsec == NONEXISTENT_MODTIME_NSECS means
798 visited file was nonexistent. EMACS_NSECS (modtime) == 799 visited file was nonexistent. modtime.tv_nsec ==
799 UNKNOWN_MODTIME_NSECS means visited file modtime unknown; 800 UNKNOWN_MODTIME_NSECS means visited file modtime unknown;
800 in no case complain about any mismatch on next save attempt. */ 801 in no case complain about any mismatch on next save attempt. */
801#define NONEXISTENT_MODTIME_NSECS (-1) 802#define NONEXISTENT_MODTIME_NSECS (-1)
802#define UNKNOWN_MODTIME_NSECS (-2) 803#define UNKNOWN_MODTIME_NSECS (-2)
803 EMACS_TIME modtime; 804 struct timespec modtime;
804 805
805 /* Size of the file when modtime was set. This is used to detect the 806 /* Size of the file when modtime was set. This is used to detect the
806 case where the file grew while we were reading it, so the modtime 807 case where the file grew while we were reading it, so the modtime
@@ -839,9 +840,12 @@ struct buffer
839 the character's width; if it maps a character to zero, we don't 840 the character's width; if it maps a character to zero, we don't
840 know what its width is. This allows compute_motion to process 841 know what its width is. This allows compute_motion to process
841 such regions very quickly, using algebra instead of inspecting 842 such regions very quickly, using algebra instead of inspecting
842 each character. See also width_table, below. */ 843 each character. See also width_table, below.
844
845 The latter cache is used to speedup bidi_find_paragraph_start. */
843 struct region_cache *newline_cache; 846 struct region_cache *newline_cache;
844 struct region_cache *width_run_cache; 847 struct region_cache *width_run_cache;
848 struct region_cache *bidi_paragraph_cache;
845 849
846 /* Non-zero means don't use redisplay optimizations for 850 /* Non-zero means don't use redisplay optimizations for
847 displaying this buffer. */ 851 displaying this buffer. */
@@ -1120,9 +1124,17 @@ record_unwind_current_buffer (void)
1120 } \ 1124 } \
1121 } while (0) 1125 } while (0)
1122 1126
1127extern Lisp_Object Vbuffer_alist;
1123extern Lisp_Object Qbefore_change_functions; 1128extern Lisp_Object Qbefore_change_functions;
1124extern Lisp_Object Qafter_change_functions; 1129extern Lisp_Object Qafter_change_functions;
1125extern Lisp_Object Qfirst_change_hook; 1130extern Lisp_Object Qfirst_change_hook;
1131extern Lisp_Object Qpriority, Qbefore_string, Qafter_string;
1132
1133/* FOR_EACH_LIVE_BUFFER (LIST_VAR, BUF_VAR) followed by a statement is
1134 a `for' loop which iterates over the buffers from Vbuffer_alist. */
1135
1136#define FOR_EACH_LIVE_BUFFER(list_var, buf_var) \
1137 FOR_EACH_ALIST_VALUE (Vbuffer_alist, list_var, buf_var)
1126 1138
1127/* Get text properties of B. */ 1139/* Get text properties of B. */
1128 1140