diff options
| author | Tom Tromey | 2013-01-05 19:36:45 -0700 |
|---|---|---|
| committer | Tom Tromey | 2013-01-05 19:36:45 -0700 |
| commit | e078a23febca14bc919c5806670479c395e3253e (patch) | |
| tree | e9e4ed91feef744d525264c31974c3ed00146bcd /src/buffer.c | |
| parent | 63d535c829a930207b64fe733228f15a554644b1 (diff) | |
| parent | 7a2657fa3bedbd977f4e11fe030cb4a210c04ab4 (diff) | |
| download | emacs-e078a23febca14bc919c5806670479c395e3253e.tar.gz emacs-e078a23febca14bc919c5806670479c395e3253e.zip | |
merge from trunk
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/buffer.c b/src/buffer.c index c8864419076..61b457e4558 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | /* Buffer manipulation primitives for GNU Emacs. | 1 | /* Buffer manipulation primitives for GNU Emacs. |
| 2 | 2 | ||
| 3 | Copyright (C) 1985-1989, 1993-1995, 1997-2012 Free Software Foundation, Inc. | 3 | Copyright (C) 1985-1989, 1993-1995, 1997-2013 Free Software Foundation, |
| 4 | Inc. | ||
| 4 | 5 | ||
| 5 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| 6 | 7 | ||
| @@ -573,6 +574,7 @@ even if it is dead. The return value is never nil. */) | |||
| 573 | BUF_CHARS_MODIFF (b) = 1; | 574 | BUF_CHARS_MODIFF (b) = 1; |
| 574 | BUF_OVERLAY_MODIFF (b) = 1; | 575 | BUF_OVERLAY_MODIFF (b) = 1; |
| 575 | BUF_SAVE_MODIFF (b) = 1; | 576 | BUF_SAVE_MODIFF (b) = 1; |
| 577 | BUF_COMPACT (b) = 1; | ||
| 576 | set_buffer_intervals (b, NULL); | 578 | set_buffer_intervals (b, NULL); |
| 577 | BUF_UNCHANGED_MODIFIED (b) = 1; | 579 | BUF_UNCHANGED_MODIFIED (b) = 1; |
| 578 | BUF_OVERLAY_UNCHANGED_MODIFIED (b) = 1; | 580 | BUF_OVERLAY_UNCHANGED_MODIFIED (b) = 1; |
| @@ -1338,7 +1340,7 @@ DEFUN ("set-buffer-modified-p", Fset_buffer_modified_p, Sset_buffer_modified_p, | |||
| 1338 | A non-nil FLAG means mark the buffer modified. */) | 1340 | A non-nil FLAG means mark the buffer modified. */) |
| 1339 | (Lisp_Object flag) | 1341 | (Lisp_Object flag) |
| 1340 | { | 1342 | { |
| 1341 | Lisp_Object fn, buffer, window; | 1343 | Lisp_Object fn; |
| 1342 | 1344 | ||
| 1343 | #ifdef CLASH_DETECTION | 1345 | #ifdef CLASH_DETECTION |
| 1344 | /* If buffer becoming modified, lock the file. | 1346 | /* If buffer becoming modified, lock the file. |
| @@ -1391,9 +1393,7 @@ A non-nil FLAG means mark the buffer modified. */) | |||
| 1391 | Ideally, I think there should be another mechanism for fontifying | 1393 | Ideally, I think there should be another mechanism for fontifying |
| 1392 | buffers without "modifying" buffers, or redisplay should be | 1394 | buffers without "modifying" buffers, or redisplay should be |
| 1393 | smarter about updating the `*' in mode lines. --gerd */ | 1395 | smarter about updating the `*' in mode lines. --gerd */ |
| 1394 | XSETBUFFER (buffer, current_buffer); | 1396 | if (buffer_window_count (current_buffer)) |
| 1395 | window = Fget_buffer_window (buffer, Qt); | ||
| 1396 | if (WINDOWP (window)) | ||
| 1397 | { | 1397 | { |
| 1398 | ++update_mode_lines; | 1398 | ++update_mode_lines; |
| 1399 | current_buffer->prevent_redisplay_optimizations_p = 1; | 1399 | current_buffer->prevent_redisplay_optimizations_p = 1; |
| @@ -1667,7 +1667,7 @@ compact_buffer (struct buffer *buffer) | |||
| 1667 | which aren't changed since last compaction. */ | 1667 | which aren't changed since last compaction. */ |
| 1668 | if (BUFFER_LIVE_P (buffer) | 1668 | if (BUFFER_LIVE_P (buffer) |
| 1669 | && (buffer->base_buffer == NULL) | 1669 | && (buffer->base_buffer == NULL) |
| 1670 | && (buffer->text->compact != buffer->text->modiff)) | 1670 | && (BUF_COMPACT (buffer) != BUF_MODIFF (buffer))) |
| 1671 | { | 1671 | { |
| 1672 | /* If a buffer's undo list is Qt, that means that undo is | 1672 | /* If a buffer's undo list is Qt, that means that undo is |
| 1673 | turned off in that buffer. Calling truncate_undo_list on | 1673 | turned off in that buffer. Calling truncate_undo_list on |
| @@ -1692,7 +1692,7 @@ compact_buffer (struct buffer *buffer) | |||
| 1692 | current_buffer = save_current; | 1692 | current_buffer = save_current; |
| 1693 | } | 1693 | } |
| 1694 | } | 1694 | } |
| 1695 | buffer->text->compact = buffer->text->modiff; | 1695 | BUF_COMPACT (buffer) = BUF_MODIFF (buffer); |
| 1696 | } | 1696 | } |
| 1697 | } | 1697 | } |
| 1698 | 1698 | ||
| @@ -2047,7 +2047,7 @@ DEFUN ("bury-buffer-internal", Fbury_buffer_internal, Sbury_buffer_internal, | |||
| 2047 | DEFUN ("set-buffer-major-mode", Fset_buffer_major_mode, Sset_buffer_major_mode, 1, 1, 0, | 2047 | DEFUN ("set-buffer-major-mode", Fset_buffer_major_mode, Sset_buffer_major_mode, 1, 1, 0, |
| 2048 | doc: /* Set an appropriate major mode for BUFFER. | 2048 | doc: /* Set an appropriate major mode for BUFFER. |
| 2049 | For the *scratch* buffer, use `initial-major-mode', otherwise choose a mode | 2049 | For the *scratch* buffer, use `initial-major-mode', otherwise choose a mode |
| 2050 | according to `default-major-mode'. | 2050 | according to the default value of `major-mode'. |
| 2051 | Use this function before selecting the buffer, since it may need to inspect | 2051 | Use this function before selecting the buffer, since it may need to inspect |
| 2052 | the current buffer's major mode. */) | 2052 | the current buffer's major mode. */) |
| 2053 | (Lisp_Object buffer) | 2053 | (Lisp_Object buffer) |