[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r117282: * src/window.c (Frecenter): Signal an error
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] trunk r117282: * src/window.c (Frecenter): Signal an error if window-buffer is not |
Date: |
Fri, 06 Jun 2014 14:37:14 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117282
revision-id: address@hidden
parent: address@hidden
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Fri 2014-06-06 10:37:05 -0400
message:
* src/window.c (Frecenter): Signal an error if window-buffer is not
current-buffer.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/window.c window.c-20091113204419-o5vbwnq5f7feedwu-231
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-06-06 00:39:22 +0000
+++ b/lisp/ChangeLog 2014-06-06 14:37:05 +0000
@@ -1,3 +1,8 @@
+2014-06-06 Stefan Monnier <address@hidden>
+
+ * mouse.el (mouse-posn-property): Ignore buffer position info when the
+ even happened elsewhere.
+
2014-06-06 Mario Lang <address@hidden>
* emacs-lisp/tabulated-list.el (tabulated-list-print): Only call
@@ -9,8 +14,8 @@
2014-06-05 Michal Nazarewicz <address@hidden>
- * textmodes/tildify.el (tildify-foreach-region-outside-env): New
- function which calls a callback on portions of the buffer that are
+ * textmodes/tildify.el (tildify-foreach-region-outside-env):
+ New function which calls a callback on portions of the buffer that are
outside of ignored environments.
(tildify-build-regexp): Remove function since it is now
incorporated in `tildify-foreach-region-outside-env' where it is
@@ -243,14 +248,14 @@
2014-05-30 Ken Olum <address@hidden> (tiny change)
- * mail/rmail.el (rmail-delete-forward, rmail-delete-backward): The
- argument COUNT is now optional, to be more backward-compatible.
+ * mail/rmail.el (rmail-delete-forward, rmail-delete-backward):
+ The argument COUNT is now optional, to be more backward-compatible.
Doc fix. (Bug#17560)
2014-05-29 Reuben Thomas <address@hidden>
- * whitespace.el (whitespace-report-region): Simplify
- documentation.
+ * whitespace.el (whitespace-report-region):
+ Simplify documentation.
(whitespace-report-region): Allow report-if-bogus to take the
value `never', for non-interactive use.
(whitespace-report): Refer to whitespace-report-region's
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-06-06 02:35:17 +0000
+++ b/src/ChangeLog 2014-06-06 14:37:05 +0000
@@ -1,5 +1,8 @@
2014-06-06 Stefan Monnier <address@hidden>
+ * window.c (Frecenter): Signal an error if window-buffer is not
+ current-buffer.
+
* keyboard.c (make_lispy_position): Don't include a buffer position in
mode/header-line mouse events.
=== modified file 'src/window.c'
--- a/src/window.c 2014-04-29 15:16:07 +0000
+++ b/src/window.c 2014-06-06 14:37:05 +0000
@@ -4867,7 +4867,7 @@
/* If PT is not visible in WINDOW, move back one half of
the screen. Allow PT to be partially visible, otherwise
something like (scroll-down 1) with PT in the line before
- the partially visible one would recenter. */
+ the partially visible one would recenter. */
if (!pos_visible_p (w, PT, &x, &y, &rtop, &rbot, &rowh, &vpos))
{
@@ -4896,7 +4896,7 @@
}
else if (auto_window_vscroll_p)
{
- if (rtop || rbot) /* partially visible */
+ if (rtop || rbot) /* Partially visible. */
{
int px;
int dy = frame_line_height;
@@ -5643,14 +5643,16 @@
{
struct window *w = XWINDOW (selected_window);
struct buffer *buf = XBUFFER (w->contents);
- struct buffer *obuf = current_buffer;
bool center_p = 0;
ptrdiff_t charpos, bytepos;
EMACS_INT iarg IF_LINT (= 0);
int this_scroll_margin;
+ if (buf != current_buffer)
+ error ("`recenter'ing a window that does not display current-buffer.");
+
/* If redisplay is suppressed due to an error, try again. */
- obuf->display_error_modiff = 0;
+ buf->display_error_modiff = 0;
if (NILP (arg))
{
@@ -5672,7 +5674,7 @@
center_p = 1;
}
- else if (CONSP (arg)) /* Just C-u. */
+ else if (CONSP (arg)) /* Just C-u. */
center_p = 1;
else
{
@@ -5681,12 +5683,10 @@
iarg = XINT (arg);
}
- set_buffer_internal (buf);
-
/* Do this after making BUF current
in case scroll_margin is buffer-local. */
- this_scroll_margin =
- max (0, min (scroll_margin, w->total_lines / 4));
+ this_scroll_margin
+ = max (0, min (scroll_margin, w->total_lines / 4));
/* Handle centering on a graphical frame specially. Such frames can
have variable-height lines and centering point on the basis of
@@ -5734,7 +5734,7 @@
h -= it.current_y;
else
{
- /* Last line has no newline */
+ /* Last line has no newline. */
h -= line_bottom_y (&it);
it.vpos++;
}
@@ -5813,10 +5813,9 @@
w->optional_new_start = 1;
- w->start_at_line_beg = (bytepos == BEGV_BYTE ||
- FETCH_BYTE (bytepos - 1) == '\n');
+ w->start_at_line_beg = (bytepos == BEGV_BYTE
+ || FETCH_BYTE (bytepos - 1) == '\n');
- set_buffer_internal (obuf);
return Qnil;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r117282: * src/window.c (Frecenter): Signal an error if window-buffer is not,
Stefan Monnier <=