From: Stefan Monnier Date: Tue, 29 Apr 2014 15:16:07 +0000 (-0400) Subject: * src/window.c (struct saved_window): Remove mark. X-Git-Tag: emacs-25.0.90~2640^2~176 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4d89ee379aae4a0d087fa6734524e59e37b9cbc5;p=emacs.git * src/window.c (struct saved_window): Remove mark. (Fset_window_configuration, save_window_save) (compare_window_configurations): Don't touch marks any more. * doc/lispref/windows.texi (Window Configurations, Window Configurations): Window configs don't store marks any more. --- diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 04b2e91ee4b..9d15f65480c 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,8 +1,12 @@ +2014-04-29 Stefan Monnier + + * windows.texi (Window Configurations, Window Configurations): + Window configs don't store marks any more. + 2014-04-25 Eli Zaretskii - * strings.texi (Text Comparison): Mention - equal-including-properties for when text properties of the strings - matter for comparison. + * strings.texi (Text Comparison): Mention equal-including-properties + for when text properties of the strings matter for comparison. 2014-04-22 Eli Zaretskii diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index e4177836fa8..f2fe5c85a93 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -3655,7 +3655,7 @@ This function returns the top pixel edge of window @var{window}. A @dfn{window configuration} records the entire layout of one frame---all windows, their sizes, which buffers they contain, how those -buffers are scrolled, and their values of point and the mark; also their +buffers are scrolled, and their value of point; also their fringes, margins, and scroll bar settings. It also includes the value of @code{minibuffer-scroll-window}. As a special exception, the window configuration does not record the value of point in the selected window @@ -3731,13 +3731,13 @@ This function returns @code{t} if @var{object} is a window configuration. @defun compare-window-configurations config1 config2 This function compares two window configurations as regards the -structure of windows, but ignores the values of point and mark and the +structure of windows, but ignores the values of point and the saved scrolling positions---it can return @code{t} even if those aspects differ. The function @code{equal} can also compare two window configurations; it regards configurations as unequal if they differ in any respect, even a -saved point or mark. +saved point. @end defun @defun window-configuration-frame config diff --git a/etc/NEWS b/etc/NEWS index 1af924b49d1..15c01607b1f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -85,6 +85,8 @@ protocols as well as for "telnet" and "ftp" are passed to Tramp. * Incompatible Lisp Changes in Emacs 24.5 +** window-configurations do not record the buffers's marks any more. + ** inhibit-modification-hooks now also inhibits lock-file checks as well as active region handling. diff --git a/src/ChangeLog b/src/ChangeLog index 619dce7a731..0fba7894443 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2014-04-29 Stefan Monnier + + * window.c (struct saved_window): Remove mark. + (Fset_window_configuration, save_window_save) + (compare_window_configurations): Don't touch marks any more. + 2014-04-28 Paul Eggert Use bits_word for gcmarkbits. @@ -19,8 +25,7 @@ 2014-04-25 Eli Zaretskii * search.c (Fnewline_cache_check): Don't try to count newlines - outside the buffer's restriction, as find_newline doesn't support - that. + outside the buffer's restriction, as find_newline doesn't support that. 2014-04-24 Stefan Monnier diff --git a/src/window.c b/src/window.c index ebcc41180f3..919cc7b1c4e 100644 --- a/src/window.c +++ b/src/window.c @@ -5953,12 +5953,12 @@ struct save_window_data int frame_menu_bar_height, frame_tool_bar_height; }; -/* This is saved as a Lisp_Vector */ +/* This is saved as a Lisp_Vector. */ struct saved_window { struct vectorlike_header header; - Lisp_Object window, buffer, start, pointm, mark; + Lisp_Object window, buffer, start, pointm; Lisp_Object pixel_left, pixel_top, pixel_height, pixel_width; Lisp_Object left_col, top_line, total_cols, total_lines; Lisp_Object normal_cols, normal_lines; @@ -6260,17 +6260,6 @@ the return value is nil. Otherwise the value is t. */) set_marker_restricted (w->start, p->start, w->contents); set_marker_restricted (w->pointm, p->pointm, w->contents); - if (MARKERP (p->mark) && !XMARKER (p->mark)->buffer - && !NILP (BVAR (XBUFFER (w->contents), mark_active))) - { - struct buffer *old = current_buffer; - extern Lisp_Object Qdeactivate_mark; - set_buffer_internal (XBUFFER (w->contents)); - call0 (Qdeactivate_mark); - set_buffer_internal (old); - } - Fset_marker (BVAR (XBUFFER (w->contents), mark), - p->mark, w->contents); /* As documented in Fcurrent_window_configuration, don't restore the location of point in the buffer which was @@ -6626,27 +6615,16 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, int i) p->start = Fcopy_marker (w->start, Qnil); p->start_at_line_beg = w->start_at_line_beg ? Qt : Qnil; - - tem = BVAR (XBUFFER (w->contents), mark); - p->mark = Fcopy_marker (tem, Qnil); } else { p->pointm = Qnil; p->start = Qnil; - p->mark = Qnil; p->start_at_line_beg = Qnil; } - if (NILP (w->parent)) - p->parent = Qnil; - else - p->parent = XWINDOW (w->parent)->temslot; - - if (NILP (w->prev)) - p->prev = Qnil; - else - p->prev = XWINDOW (w->prev)->temslot; + p->parent = NILP (w->parent) ? Qnil : XWINDOW (w->parent)->temslot; + p->prev = NILP (w->prev) ? Qnil : XWINDOW (w->prev)->temslot; if (WINDOWP (w->contents)) i = save_window_save (w->contents, vector, i); @@ -6660,8 +6638,8 @@ DEFUN ("current-window-configuration", Fcurrent_window_configuration, doc: /* Return an object representing the current window configuration of FRAME. If FRAME is nil or omitted, use the selected frame. This describes the number of windows, their sizes and current buffers, -and for each displayed buffer, where display starts, and the positions of -point and mark. An exception is made for point in the current buffer: +and for each displayed buffer, where display starts, and the position of +point. An exception is made for point in the current buffer: its value is -not- saved. This also records the currently selected frame, and FRAME's focus redirection (see `redirect-frame-focus'). The variable @@ -7105,8 +7083,7 @@ compare_window_configurations (Lisp_Object configuration1, || !EQ (sw1->min_hscroll, sw2->min_hscroll) || !EQ (sw1->start_at_line_beg, sw2->start_at_line_beg) || NILP (Fequal (sw1->start, sw2->start)) - || NILP (Fequal (sw1->pointm, sw2->pointm)) - || NILP (Fequal (sw1->mark, sw2->mark)))) + || NILP (Fequal (sw1->pointm, sw2->pointm)))) || !EQ (sw1->left_margin_cols, sw2->left_margin_cols) || !EQ (sw1->right_margin_cols, sw2->right_margin_cols) || !EQ (sw1->left_fringe_width, sw2->left_fringe_width) @@ -7123,7 +7100,7 @@ compare_window_configurations (Lisp_Object configuration1, DEFUN ("compare-window-configurations", Fcompare_window_configurations, Scompare_window_configurations, 2, 2, 0, doc: /* Compare two window configurations as regards the structure of windows. -This function ignores details such as the values of point and mark +This function ignores details such as the values of point and scrolling positions. */) (Lisp_Object x, Lisp_Object y) {