diff options
| author | Joakim Verona | 2012-09-11 17:18:45 +0200 |
|---|---|---|
| committer | Joakim Verona | 2012-09-11 17:18:45 +0200 |
| commit | 0cc36550df4f355a1b46e944fc65e533ff0df90e (patch) | |
| tree | 100e4130dffa88423b6430c2814f740007b72269 /src | |
| parent | b035a30e5cd2f34fedc04c253eeb5a11afed8145 (diff) | |
| parent | 96d0357142bf277e6eb4d957a59b2c655034e2b7 (diff) | |
| download | emacs-0cc36550df4f355a1b46e944fc65e533ff0df90e.tar.gz emacs-0cc36550df4f355a1b46e944fc65e533ff0df90e.zip | |
upstream
Diffstat (limited to 'src')
| -rw-r--r-- | src/alloc.c | 2 | ||||
| -rw-r--r-- | src/buffer.c | 32 | ||||
| -rw-r--r-- | src/buffer.h | 5 | ||||
| -rw-r--r-- | src/data.c | 4 | ||||
| -rw-r--r-- | src/editfns.c | 6 | ||||
| -rw-r--r-- | src/insdel.c | 2 | ||||
| -rw-r--r-- | src/lisp.h | 3 | ||||
| -rw-r--r-- | src/lread.c | 2 | ||||
| -rw-r--r-- | src/marker.c | 8 | ||||
| -rw-r--r-- | src/minibuf.c | 2 | ||||
| -rw-r--r-- | src/nsterm.m | 9 | ||||
| -rw-r--r-- | src/print.c | 2 | ||||
| -rw-r--r-- | src/process.c | 4 | ||||
| -rw-r--r-- | src/w32term.c | 1 | ||||
| -rw-r--r-- | src/xterm.c | 1 |
15 files changed, 48 insertions, 35 deletions
diff --git a/src/alloc.c b/src/alloc.c index 33dc68df48e..7bbc0abcd9a 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -3682,7 +3682,7 @@ build_marker (struct buffer *buf, ptrdiff_t charpos, ptrdiff_t bytepos) | |||
| 3682 | struct Lisp_Marker *m; | 3682 | struct Lisp_Marker *m; |
| 3683 | 3683 | ||
| 3684 | /* No dead buffers here. */ | 3684 | /* No dead buffers here. */ |
| 3685 | eassert (!NILP (BVAR (buf, name))); | 3685 | eassert (BUFFER_LIVE_P (buf)); |
| 3686 | 3686 | ||
| 3687 | /* Every character is at least one byte. */ | 3687 | /* Every character is at least one byte. */ |
| 3688 | eassert (charpos <= bytepos); | 3688 | eassert (charpos <= bytepos); |
diff --git a/src/buffer.c b/src/buffer.c index 3af45122a0d..d512547d34e 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -388,7 +388,7 @@ DEFUN ("buffer-live-p", Fbuffer_live_p, Sbuffer_live_p, 1, 1, 0, | |||
| 388 | Value is nil if OBJECT is not a buffer or if it has been killed. */) | 388 | Value is nil if OBJECT is not a buffer or if it has been killed. */) |
| 389 | (Lisp_Object object) | 389 | (Lisp_Object object) |
| 390 | { | 390 | { |
| 391 | return ((BUFFERP (object) && ! NILP (BVAR (XBUFFER (object), name))) | 391 | return ((BUFFERP (object) && BUFFER_LIVE_P (XBUFFER (object))) |
| 392 | ? Qt : Qnil); | 392 | ? Qt : Qnil); |
| 393 | } | 393 | } |
| 394 | 394 | ||
| @@ -776,7 +776,7 @@ CLONE nil means the indirect buffer's state is reset to default values. */) | |||
| 776 | base_buffer = Fget_buffer (base_buffer); | 776 | base_buffer = Fget_buffer (base_buffer); |
| 777 | if (NILP (base_buffer)) | 777 | if (NILP (base_buffer)) |
| 778 | error ("No such buffer: `%s'", SDATA (tem)); | 778 | error ("No such buffer: `%s'", SDATA (tem)); |
| 779 | if (NILP (BVAR (XBUFFER (base_buffer), name))) | 779 | if (!BUFFER_LIVE_P (XBUFFER (base_buffer))) |
| 780 | error ("Base buffer has been killed"); | 780 | error ("Base buffer has been killed"); |
| 781 | 781 | ||
| 782 | if (SCHARS (name) == 0) | 782 | if (SCHARS (name) == 0) |
| @@ -1553,7 +1553,7 @@ exists, return the buffer `*scratch*' (creating it if necessary). */) | |||
| 1553 | { | 1553 | { |
| 1554 | buf = XCAR (tail); | 1554 | buf = XCAR (tail); |
| 1555 | if (BUFFERP (buf) && !EQ (buf, buffer) | 1555 | if (BUFFERP (buf) && !EQ (buf, buffer) |
| 1556 | && !NILP (BVAR (XBUFFER (buf), name)) | 1556 | && BUFFER_LIVE_P (XBUFFER (buf)) |
| 1557 | && (SREF (BVAR (XBUFFER (buf), name), 0) != ' ') | 1557 | && (SREF (BVAR (XBUFFER (buf), name), 0) != ' ') |
| 1558 | /* If the frame has a buffer_predicate, disregard buffers that | 1558 | /* If the frame has a buffer_predicate, disregard buffers that |
| 1559 | don't fit the predicate. */ | 1559 | don't fit the predicate. */ |
| @@ -1573,7 +1573,7 @@ exists, return the buffer `*scratch*' (creating it if necessary). */) | |||
| 1573 | { | 1573 | { |
| 1574 | buf = Fcdr (XCAR (tail)); | 1574 | buf = Fcdr (XCAR (tail)); |
| 1575 | if (BUFFERP (buf) && !EQ (buf, buffer) | 1575 | if (BUFFERP (buf) && !EQ (buf, buffer) |
| 1576 | && !NILP (BVAR (XBUFFER (buf), name)) | 1576 | && BUFFER_LIVE_P (XBUFFER (buf)) |
| 1577 | && (SREF (BVAR (XBUFFER (buf), name), 0) != ' ') | 1577 | && (SREF (BVAR (XBUFFER (buf), name), 0) != ' ') |
| 1578 | /* If the frame has a buffer_predicate, disregard buffers that | 1578 | /* If the frame has a buffer_predicate, disregard buffers that |
| 1579 | don't fit the predicate. */ | 1579 | don't fit the predicate. */ |
| @@ -1615,7 +1615,7 @@ other_buffer_safely (Lisp_Object buffer) | |||
| 1615 | { | 1615 | { |
| 1616 | buf = Fcdr (XCAR (tail)); | 1616 | buf = Fcdr (XCAR (tail)); |
| 1617 | if (BUFFERP (buf) && !EQ (buf, buffer) | 1617 | if (BUFFERP (buf) && !EQ (buf, buffer) |
| 1618 | && !NILP (BVAR (XBUFFER (buf), name)) | 1618 | && BUFFER_LIVE_P (XBUFFER (buf)) |
| 1619 | && (SREF (BVAR (XBUFFER (buf), name), 0) != ' ')) | 1619 | && (SREF (BVAR (XBUFFER (buf), name), 0) != ' ')) |
| 1620 | return buf; | 1620 | return buf; |
| 1621 | } | 1621 | } |
| @@ -1734,7 +1734,7 @@ cleaning up all windows currently displaying the buffer to be killed. */) | |||
| 1734 | b = XBUFFER (buffer); | 1734 | b = XBUFFER (buffer); |
| 1735 | 1735 | ||
| 1736 | /* Avoid trouble for buffer already dead. */ | 1736 | /* Avoid trouble for buffer already dead. */ |
| 1737 | if (NILP (BVAR (b, name))) | 1737 | if (!BUFFER_LIVE_P (b)) |
| 1738 | return Qnil; | 1738 | return Qnil; |
| 1739 | 1739 | ||
| 1740 | /* Query if the buffer is still modified. */ | 1740 | /* Query if the buffer is still modified. */ |
| @@ -1770,7 +1770,7 @@ cleaning up all windows currently displaying the buffer to be killed. */) | |||
| 1770 | } | 1770 | } |
| 1771 | 1771 | ||
| 1772 | /* If the hooks have killed the buffer, exit now. */ | 1772 | /* If the hooks have killed the buffer, exit now. */ |
| 1773 | if (NILP (BVAR (b, name))) | 1773 | if (!BUFFER_LIVE_P (b)) |
| 1774 | return Qt; | 1774 | return Qt; |
| 1775 | 1775 | ||
| 1776 | /* We have no more questions to ask. Verify that it is valid | 1776 | /* We have no more questions to ask. Verify that it is valid |
| @@ -1802,7 +1802,7 @@ cleaning up all windows currently displaying the buffer to be killed. */) | |||
| 1802 | UNGCPRO; | 1802 | UNGCPRO; |
| 1803 | 1803 | ||
| 1804 | /* Exit if we now have killed the base buffer (Bug#11665). */ | 1804 | /* Exit if we now have killed the base buffer (Bug#11665). */ |
| 1805 | if (NILP (BVAR (b, name))) | 1805 | if (!BUFFER_LIVE_P (b)) |
| 1806 | return Qt; | 1806 | return Qt; |
| 1807 | } | 1807 | } |
| 1808 | 1808 | ||
| @@ -1813,7 +1813,7 @@ cleaning up all windows currently displaying the buffer to be killed. */) | |||
| 1813 | replace_buffer_in_windows (buffer); | 1813 | replace_buffer_in_windows (buffer); |
| 1814 | 1814 | ||
| 1815 | /* Exit if replacing the buffer in windows has killed our buffer. */ | 1815 | /* Exit if replacing the buffer in windows has killed our buffer. */ |
| 1816 | if (NILP (BVAR (b, name))) | 1816 | if (!BUFFER_LIVE_P (b)) |
| 1817 | return Qt; | 1817 | return Qt; |
| 1818 | 1818 | ||
| 1819 | /* Make this buffer not be current. Exit if it is the sole visible | 1819 | /* Make this buffer not be current. Exit if it is the sole visible |
| @@ -1846,7 +1846,7 @@ cleaning up all windows currently displaying the buffer to be killed. */) | |||
| 1846 | 1846 | ||
| 1847 | /* Killing buffer processes may run sentinels which may have killed | 1847 | /* Killing buffer processes may run sentinels which may have killed |
| 1848 | our buffer. */ | 1848 | our buffer. */ |
| 1849 | if (NILP (BVAR (b, name))) | 1849 | if (!BUFFER_LIVE_P (b)) |
| 1850 | return Qt; | 1850 | return Qt; |
| 1851 | 1851 | ||
| 1852 | /* These may run Lisp code and into infinite loops (if someone | 1852 | /* These may run Lisp code and into infinite loops (if someone |
| @@ -1878,7 +1878,7 @@ cleaning up all windows currently displaying the buffer to be killed. */) | |||
| 1878 | } | 1878 | } |
| 1879 | 1879 | ||
| 1880 | /* Deleting an auto-save file could have killed our buffer. */ | 1880 | /* Deleting an auto-save file could have killed our buffer. */ |
| 1881 | if (NILP (BVAR (b, name))) | 1881 | if (!BUFFER_LIVE_P (b)) |
| 1882 | return Qt; | 1882 | return Qt; |
| 1883 | 1883 | ||
| 1884 | if (b->base_buffer) | 1884 | if (b->base_buffer) |
| @@ -2047,7 +2047,7 @@ the current buffer's major mode. */) | |||
| 2047 | 2047 | ||
| 2048 | CHECK_BUFFER (buffer); | 2048 | CHECK_BUFFER (buffer); |
| 2049 | 2049 | ||
| 2050 | if (NILP (BVAR (XBUFFER (buffer), name))) | 2050 | if (!BUFFER_LIVE_P (XBUFFER (buffer))) |
| 2051 | error ("Attempt to set major mode for a dead buffer"); | 2051 | error ("Attempt to set major mode for a dead buffer"); |
| 2052 | 2052 | ||
| 2053 | if (strcmp (SSDATA (BVAR (XBUFFER (buffer), name)), "*scratch*") == 0) | 2053 | if (strcmp (SSDATA (BVAR (XBUFFER (buffer), name)), "*scratch*") == 0) |
| @@ -2183,7 +2183,7 @@ ends when the current command terminates. Use `switch-to-buffer' or | |||
| 2183 | buffer = Fget_buffer (buffer_or_name); | 2183 | buffer = Fget_buffer (buffer_or_name); |
| 2184 | if (NILP (buffer)) | 2184 | if (NILP (buffer)) |
| 2185 | nsberror (buffer_or_name); | 2185 | nsberror (buffer_or_name); |
| 2186 | if (NILP (BVAR (XBUFFER (buffer), name))) | 2186 | if (!BUFFER_LIVE_P (XBUFFER (buffer))) |
| 2187 | error ("Selecting deleted buffer"); | 2187 | error ("Selecting deleted buffer"); |
| 2188 | set_buffer_internal (XBUFFER (buffer)); | 2188 | set_buffer_internal (XBUFFER (buffer)); |
| 2189 | return buffer; | 2189 | return buffer; |
| @@ -2194,7 +2194,7 @@ ends when the current command terminates. Use `switch-to-buffer' or | |||
| 2194 | Lisp_Object | 2194 | Lisp_Object |
| 2195 | set_buffer_if_live (Lisp_Object buffer) | 2195 | set_buffer_if_live (Lisp_Object buffer) |
| 2196 | { | 2196 | { |
| 2197 | if (! NILP (BVAR (XBUFFER (buffer), name))) | 2197 | if (BUFFER_LIVE_P (XBUFFER (buffer))) |
| 2198 | set_buffer_internal (XBUFFER (buffer)); | 2198 | set_buffer_internal (XBUFFER (buffer)); |
| 2199 | return Qnil; | 2199 | return Qnil; |
| 2200 | } | 2200 | } |
| @@ -2289,7 +2289,7 @@ DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text, | |||
| 2289 | CHECK_BUFFER (buffer); | 2289 | CHECK_BUFFER (buffer); |
| 2290 | other_buffer = XBUFFER (buffer); | 2290 | other_buffer = XBUFFER (buffer); |
| 2291 | 2291 | ||
| 2292 | if (NILP (BVAR (other_buffer, name))) | 2292 | if (!BUFFER_LIVE_P (other_buffer)) |
| 2293 | error ("Cannot swap a dead buffer's text"); | 2293 | error ("Cannot swap a dead buffer's text"); |
| 2294 | 2294 | ||
| 2295 | /* Actually, it probably works just fine. | 2295 | /* Actually, it probably works just fine. |
| @@ -2685,7 +2685,7 @@ current buffer is cleared. */) | |||
| 2685 | /* Copy this buffer's new multibyte status | 2685 | /* Copy this buffer's new multibyte status |
| 2686 | into all of its indirect buffers. */ | 2686 | into all of its indirect buffers. */ |
| 2687 | FOR_EACH_BUFFER (other) | 2687 | FOR_EACH_BUFFER (other) |
| 2688 | if (other->base_buffer == current_buffer && !NILP (BVAR (other, name))) | 2688 | if (other->base_buffer == current_buffer && BUFFER_LIVE_P (other)) |
| 2689 | { | 2689 | { |
| 2690 | BVAR (other, enable_multibyte_characters) | 2690 | BVAR (other, enable_multibyte_characters) |
| 2691 | = BVAR (current_buffer, enable_multibyte_characters); | 2691 | = BVAR (current_buffer, enable_multibyte_characters); |
diff --git a/src/buffer.h b/src/buffer.h index da40a7ce3d8..d18ef30ea38 100644 --- a/src/buffer.h +++ b/src/buffer.h | |||
| @@ -959,7 +959,10 @@ bset_width_table (struct buffer *b, Lisp_Object val) | |||
| 959 | b->INTERNAL_FIELD (width_table) = val; | 959 | b->INTERNAL_FIELD (width_table) = val; |
| 960 | } | 960 | } |
| 961 | 961 | ||
| 962 | 962 | /* Convenient check whether buffer B is live. */ | |
| 963 | |||
| 964 | #define BUFFER_LIVE_P(b) (!NILP (BVAR (b, name))) | ||
| 965 | |||
| 963 | /* Chain of all buffers, including killed ones. */ | 966 | /* Chain of all buffers, including killed ones. */ |
| 964 | 967 | ||
| 965 | extern struct buffer *all_buffers; | 968 | extern struct buffer *all_buffers; |
diff --git a/src/data.c b/src/data.c index a4cca0a3ee5..4678ac1208c 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -71,8 +71,8 @@ Lisp_Object Qchar_table_p, Qvector_or_char_table_p; | |||
| 71 | Lisp_Object Qcdr; | 71 | Lisp_Object Qcdr; |
| 72 | static Lisp_Object Qad_advice_info, Qad_activate_internal; | 72 | static Lisp_Object Qad_advice_info, Qad_activate_internal; |
| 73 | 73 | ||
| 74 | Lisp_Object Qrange_error, Qdomain_error, Qsingularity_error; | 74 | static Lisp_Object Qdomain_error, Qsingularity_error, Qunderflow_error; |
| 75 | Lisp_Object Qoverflow_error, Qunderflow_error; | 75 | Lisp_Object Qrange_error, Qoverflow_error; |
| 76 | 76 | ||
| 77 | Lisp_Object Qfloatp; | 77 | Lisp_Object Qfloatp; |
| 78 | Lisp_Object Qnumberp, Qnumber_or_marker_p; | 78 | Lisp_Object Qnumberp, Qnumber_or_marker_p; |
diff --git a/src/editfns.c b/src/editfns.c index 65baaf4e3f8..299cad07fd7 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -2613,7 +2613,7 @@ They default to the values of (point-min) and (point-max) in BUFFER. */) | |||
| 2613 | if (NILP (buf)) | 2613 | if (NILP (buf)) |
| 2614 | nsberror (buffer); | 2614 | nsberror (buffer); |
| 2615 | bp = XBUFFER (buf); | 2615 | bp = XBUFFER (buf); |
| 2616 | if (NILP (BVAR (bp, name))) | 2616 | if (!BUFFER_LIVE_P (bp)) |
| 2617 | error ("Selecting deleted buffer"); | 2617 | error ("Selecting deleted buffer"); |
| 2618 | 2618 | ||
| 2619 | if (NILP (start)) | 2619 | if (NILP (start)) |
| @@ -2677,7 +2677,7 @@ determines whether case is significant or ignored. */) | |||
| 2677 | if (NILP (buf1)) | 2677 | if (NILP (buf1)) |
| 2678 | nsberror (buffer1); | 2678 | nsberror (buffer1); |
| 2679 | bp1 = XBUFFER (buf1); | 2679 | bp1 = XBUFFER (buf1); |
| 2680 | if (NILP (BVAR (bp1, name))) | 2680 | if (!BUFFER_LIVE_P (bp1)) |
| 2681 | error ("Selecting deleted buffer"); | 2681 | error ("Selecting deleted buffer"); |
| 2682 | } | 2682 | } |
| 2683 | 2683 | ||
| @@ -2715,7 +2715,7 @@ determines whether case is significant or ignored. */) | |||
| 2715 | if (NILP (buf2)) | 2715 | if (NILP (buf2)) |
| 2716 | nsberror (buffer2); | 2716 | nsberror (buffer2); |
| 2717 | bp2 = XBUFFER (buf2); | 2717 | bp2 = XBUFFER (buf2); |
| 2718 | if (NILP (BVAR (bp2, name))) | 2718 | if (!BUFFER_LIVE_P (bp2)) |
| 2719 | error ("Selecting deleted buffer"); | 2719 | error ("Selecting deleted buffer"); |
| 2720 | } | 2720 | } |
| 2721 | 2721 | ||
diff --git a/src/insdel.c b/src/insdel.c index 604a9bbf3df..b12a390633e 100644 --- a/src/insdel.c +++ b/src/insdel.c | |||
| @@ -2107,7 +2107,7 @@ DEFUN ("combine-after-change-execute", Fcombine_after_change_execute, | |||
| 2107 | non-nil, and insertion calls a file handler (e.g. through | 2107 | non-nil, and insertion calls a file handler (e.g. through |
| 2108 | lock_file) which scribbles into a temp file -- cyd */ | 2108 | lock_file) which scribbles into a temp file -- cyd */ |
| 2109 | if (!BUFFERP (combine_after_change_buffer) | 2109 | if (!BUFFERP (combine_after_change_buffer) |
| 2110 | || NILP (BVAR (XBUFFER (combine_after_change_buffer), name))) | 2110 | || !BUFFER_LIVE_P (XBUFFER (combine_after_change_buffer))) |
| 2111 | { | 2111 | { |
| 2112 | combine_after_change_list = Qnil; | 2112 | combine_after_change_list = Qnil; |
| 2113 | return Qnil; | 2113 | return Qnil; |
diff --git a/src/lisp.h b/src/lisp.h index 0470e452899..0163a9bcdbc 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -2564,8 +2564,7 @@ extern Lisp_Object Qchar_table_p, Qvector_or_char_table_p; | |||
| 2564 | 2564 | ||
| 2565 | extern Lisp_Object Qcdr; | 2565 | extern Lisp_Object Qcdr; |
| 2566 | 2566 | ||
| 2567 | extern Lisp_Object Qrange_error, Qdomain_error, Qsingularity_error; | 2567 | extern Lisp_Object Qrange_error, Qoverflow_error; |
| 2568 | extern Lisp_Object Qoverflow_error, Qunderflow_error; | ||
| 2569 | 2568 | ||
| 2570 | extern Lisp_Object Qfloatp; | 2569 | extern Lisp_Object Qfloatp; |
| 2571 | extern Lisp_Object Qnumberp, Qnumber_or_marker_p; | 2570 | extern Lisp_Object Qnumberp, Qnumber_or_marker_p; |
diff --git a/src/lread.c b/src/lread.c index 02b13affb6a..08a2e856c00 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -1734,7 +1734,7 @@ readevalloop (Lisp_Object readcharfun, | |||
| 1734 | { | 1734 | { |
| 1735 | ptrdiff_t count1 = SPECPDL_INDEX (); | 1735 | ptrdiff_t count1 = SPECPDL_INDEX (); |
| 1736 | 1736 | ||
| 1737 | if (b != 0 && NILP (BVAR (b, name))) | 1737 | if (b != 0 && !BUFFER_LIVE_P (b)) |
| 1738 | error ("Reading from killed buffer"); | 1738 | error ("Reading from killed buffer"); |
| 1739 | 1739 | ||
| 1740 | if (!NILP (start)) | 1740 | if (!NILP (start)) |
diff --git a/src/marker.c b/src/marker.c index de3c19c3bcb..bfbb161a71d 100644 --- a/src/marker.c +++ b/src/marker.c | |||
| @@ -407,7 +407,7 @@ Returns nil if MARKER points into a dead buffer. */) | |||
| 407 | does not preserve the buffer from being GC'd (it's weak), so | 407 | does not preserve the buffer from being GC'd (it's weak), so |
| 408 | markers have to be unlinked from their buffer as soon as the buffer | 408 | markers have to be unlinked from their buffer as soon as the buffer |
| 409 | is killed. */ | 409 | is killed. */ |
| 410 | eassert (!NILP (BVAR (XBUFFER (buf), name))); | 410 | eassert (BUFFER_LIVE_P (XBUFFER (buf))); |
| 411 | return buf; | 411 | return buf; |
| 412 | } | 412 | } |
| 413 | return Qnil; | 413 | return Qnil; |
| @@ -462,13 +462,13 @@ live_buffer (Lisp_Object buffer) | |||
| 462 | if (NILP (buffer)) | 462 | if (NILP (buffer)) |
| 463 | { | 463 | { |
| 464 | b = current_buffer; | 464 | b = current_buffer; |
| 465 | eassert (!NILP (BVAR (b, name))); | 465 | eassert (BUFFER_LIVE_P (b)); |
| 466 | } | 466 | } |
| 467 | else | 467 | else |
| 468 | { | 468 | { |
| 469 | CHECK_BUFFER (buffer); | 469 | CHECK_BUFFER (buffer); |
| 470 | b = XBUFFER (buffer); | 470 | b = XBUFFER (buffer); |
| 471 | if (NILP (BVAR (b, name))) | 471 | if (!BUFFER_LIVE_P (b)) |
| 472 | b = NULL; | 472 | b = NULL; |
| 473 | } | 473 | } |
| 474 | return b; | 474 | return b; |
| @@ -595,7 +595,7 @@ unchain_marker (register struct Lisp_Marker *marker) | |||
| 595 | register struct Lisp_Marker *tail, **prev; | 595 | register struct Lisp_Marker *tail, **prev; |
| 596 | 596 | ||
| 597 | /* No dead buffers here. */ | 597 | /* No dead buffers here. */ |
| 598 | eassert (!NILP (BVAR (b, name))); | 598 | eassert (BUFFER_LIVE_P (b)); |
| 599 | 599 | ||
| 600 | marker->buffer = NULL; | 600 | marker->buffer = NULL; |
| 601 | prev = &BUF_MARKERS (b); | 601 | prev = &BUF_MARKERS (b); |
diff --git a/src/minibuf.c b/src/minibuf.c index 655a02f5eca..4ed480a8408 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -798,7 +798,7 @@ get_minibuffer (EMACS_INT depth) | |||
| 798 | Vminibuffer_list = nconc2 (Vminibuffer_list, tail); | 798 | Vminibuffer_list = nconc2 (Vminibuffer_list, tail); |
| 799 | } | 799 | } |
| 800 | buf = Fcar (tail); | 800 | buf = Fcar (tail); |
| 801 | if (NILP (buf) || NILP (BVAR (XBUFFER (buf), name))) | 801 | if (NILP (buf) || !BUFFER_LIVE_P (XBUFFER (buf))) |
| 802 | { | 802 | { |
| 803 | buf = Fget_buffer_create | 803 | buf = Fget_buffer_create |
| 804 | (make_formatted_string (name, " *Minibuf-%"pI"d*", depth)); | 804 | (make_formatted_string (name, " *Minibuf-%"pI"d*", depth)); |
diff --git a/src/nsterm.m b/src/nsterm.m index 74a3d858710..798c9758376 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -627,6 +627,8 @@ ns_update_begin (struct frame *f) | |||
| 627 | -------------------------------------------------------------------------- */ | 627 | -------------------------------------------------------------------------- */ |
| 628 | { | 628 | { |
| 629 | NSView *view = FRAME_NS_VIEW (f); | 629 | NSView *view = FRAME_NS_VIEW (f); |
| 630 | NSRect r = [view frame]; | ||
| 631 | NSBezierPath *bp = [NSBezierPath bezierPath]; | ||
| 630 | NSTRACE (ns_update_begin); | 632 | NSTRACE (ns_update_begin); |
| 631 | 633 | ||
| 632 | ns_update_auto_hide_menu_bar (); | 634 | ns_update_auto_hide_menu_bar (); |
| @@ -634,6 +636,13 @@ ns_update_begin (struct frame *f) | |||
| 634 | ns_updating_frame = f; | 636 | ns_updating_frame = f; |
| 635 | [view lockFocus]; | 637 | [view lockFocus]; |
| 636 | 638 | ||
| 639 | /* drawRect may have been called for say the minibuffer, and then clip path | ||
| 640 | is for the minibuffer. But the display engine may draw more because | ||
| 641 | we have set the frame as garbaged. So reset clip path to the whole | ||
| 642 | view. */ | ||
| 643 | [bp appendBezierPathWithRect: r]; | ||
| 644 | [bp setClip]; | ||
| 645 | |||
| 637 | #ifdef NS_IMPL_GNUSTEP | 646 | #ifdef NS_IMPL_GNUSTEP |
| 638 | uRect = NSMakeRect (0, 0, 0, 0); | 647 | uRect = NSMakeRect (0, 0, 0, 0); |
| 639 | #endif | 648 | #endif |
diff --git a/src/print.c b/src/print.c index c1b60c97d9e..5643ff06774 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -1882,7 +1882,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1882 | } | 1882 | } |
| 1883 | else if (BUFFERP (obj)) | 1883 | else if (BUFFERP (obj)) |
| 1884 | { | 1884 | { |
| 1885 | if (NILP (BVAR (XBUFFER (obj), name))) | 1885 | if (!BUFFER_LIVE_P (XBUFFER (obj))) |
| 1886 | strout ("#<killed buffer>", -1, -1, printcharfun); | 1886 | strout ("#<killed buffer>", -1, -1, printcharfun); |
| 1887 | else if (escapeflag) | 1887 | else if (escapeflag) |
| 1888 | { | 1888 | { |
diff --git a/src/process.c b/src/process.c index 0cc9bc353a1..0ae68567d6b 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -5298,7 +5298,7 @@ read_process_output (Lisp_Object proc, register int channel) | |||
| 5298 | } | 5298 | } |
| 5299 | 5299 | ||
| 5300 | /* If no filter, write into buffer if it isn't dead. */ | 5300 | /* If no filter, write into buffer if it isn't dead. */ |
| 5301 | else if (!NILP (p->buffer) && !NILP (BVAR (XBUFFER (p->buffer), name))) | 5301 | else if (!NILP (p->buffer) && BUFFER_LIVE_P (XBUFFER (p->buffer))) |
| 5302 | { | 5302 | { |
| 5303 | Lisp_Object old_read_only; | 5303 | Lisp_Object old_read_only; |
| 5304 | ptrdiff_t old_begv, old_zv; | 5304 | ptrdiff_t old_begv, old_zv; |
| @@ -6722,7 +6722,7 @@ status_notify (struct Lisp_Process *deleting_process) | |||
| 6722 | 6722 | ||
| 6723 | /* Avoid error if buffer is deleted | 6723 | /* Avoid error if buffer is deleted |
| 6724 | (probably that's why the process is dead, too) */ | 6724 | (probably that's why the process is dead, too) */ |
| 6725 | if (NILP (BVAR (XBUFFER (buffer), name))) | 6725 | if (!BUFFER_LIVE_P (XBUFFER (buffer))) |
| 6726 | continue; | 6726 | continue; |
| 6727 | Fset_buffer (buffer); | 6727 | Fset_buffer (buffer); |
| 6728 | 6728 | ||
diff --git a/src/w32term.c b/src/w32term.c index 571db3cbe8e..28c1c593cf6 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -2591,6 +2591,7 @@ x_draw_glyph_string (struct glyph_string *s) | |||
| 2591 | w32_set_clip_rectangle (next->hdc, NULL); | 2591 | w32_set_clip_rectangle (next->hdc, NULL); |
| 2592 | next->hl = save; | 2592 | next->hl = save; |
| 2593 | next->num_clips = 0; | 2593 | next->num_clips = 0; |
| 2594 | next->clip_head = s->next; | ||
| 2594 | } | 2595 | } |
| 2595 | } | 2596 | } |
| 2596 | } | 2597 | } |
diff --git a/src/xterm.c b/src/xterm.c index 4ce87142c1a..8a702800c38 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -2984,6 +2984,7 @@ x_draw_glyph_string (struct glyph_string *s) | |||
| 2984 | XSetClipMask (next->display, next->gc, None); | 2984 | XSetClipMask (next->display, next->gc, None); |
| 2985 | next->hl = save; | 2985 | next->hl = save; |
| 2986 | next->num_clips = 0; | 2986 | next->num_clips = 0; |
| 2987 | next->clip_head = s->next; | ||
| 2987 | } | 2988 | } |
| 2988 | } | 2989 | } |
| 2989 | } | 2990 | } |