diff options
| author | Stefan Monnier | 2014-04-29 11:16:07 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2014-04-29 11:16:07 -0400 |
| commit | 4d89ee379aae4a0d087fa6734524e59e37b9cbc5 (patch) | |
| tree | 72cf01645c99e0eda276f7d8b15e9d5532da0acb /src/window.c | |
| parent | 9c23779a9d8474af16cfadb1a08d2c05ececcbec (diff) | |
| download | emacs-4d89ee379aae4a0d087fa6734524e59e37b9cbc5.tar.gz emacs-4d89ee379aae4a0d087fa6734524e59e37b9cbc5.zip | |
* 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.
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 39 |
1 files changed, 8 insertions, 31 deletions
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 | |||
| 5953 | int frame_menu_bar_height, frame_tool_bar_height; | 5953 | int frame_menu_bar_height, frame_tool_bar_height; |
| 5954 | }; | 5954 | }; |
| 5955 | 5955 | ||
| 5956 | /* This is saved as a Lisp_Vector */ | 5956 | /* This is saved as a Lisp_Vector. */ |
| 5957 | struct saved_window | 5957 | struct saved_window |
| 5958 | { | 5958 | { |
| 5959 | struct vectorlike_header header; | 5959 | struct vectorlike_header header; |
| 5960 | 5960 | ||
| 5961 | Lisp_Object window, buffer, start, pointm, mark; | 5961 | Lisp_Object window, buffer, start, pointm; |
| 5962 | Lisp_Object pixel_left, pixel_top, pixel_height, pixel_width; | 5962 | Lisp_Object pixel_left, pixel_top, pixel_height, pixel_width; |
| 5963 | Lisp_Object left_col, top_line, total_cols, total_lines; | 5963 | Lisp_Object left_col, top_line, total_cols, total_lines; |
| 5964 | Lisp_Object normal_cols, normal_lines; | 5964 | Lisp_Object normal_cols, normal_lines; |
| @@ -6260,17 +6260,6 @@ the return value is nil. Otherwise the value is t. */) | |||
| 6260 | set_marker_restricted (w->start, p->start, w->contents); | 6260 | set_marker_restricted (w->start, p->start, w->contents); |
| 6261 | set_marker_restricted (w->pointm, p->pointm, | 6261 | set_marker_restricted (w->pointm, p->pointm, |
| 6262 | w->contents); | 6262 | w->contents); |
| 6263 | if (MARKERP (p->mark) && !XMARKER (p->mark)->buffer | ||
| 6264 | && !NILP (BVAR (XBUFFER (w->contents), mark_active))) | ||
| 6265 | { | ||
| 6266 | struct buffer *old = current_buffer; | ||
| 6267 | extern Lisp_Object Qdeactivate_mark; | ||
| 6268 | set_buffer_internal (XBUFFER (w->contents)); | ||
| 6269 | call0 (Qdeactivate_mark); | ||
| 6270 | set_buffer_internal (old); | ||
| 6271 | } | ||
| 6272 | Fset_marker (BVAR (XBUFFER (w->contents), mark), | ||
| 6273 | p->mark, w->contents); | ||
| 6274 | 6263 | ||
| 6275 | /* As documented in Fcurrent_window_configuration, don't | 6264 | /* As documented in Fcurrent_window_configuration, don't |
| 6276 | restore the location of point in the buffer which was | 6265 | 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) | |||
| 6626 | 6615 | ||
| 6627 | p->start = Fcopy_marker (w->start, Qnil); | 6616 | p->start = Fcopy_marker (w->start, Qnil); |
| 6628 | p->start_at_line_beg = w->start_at_line_beg ? Qt : Qnil; | 6617 | p->start_at_line_beg = w->start_at_line_beg ? Qt : Qnil; |
| 6629 | |||
| 6630 | tem = BVAR (XBUFFER (w->contents), mark); | ||
| 6631 | p->mark = Fcopy_marker (tem, Qnil); | ||
| 6632 | } | 6618 | } |
| 6633 | else | 6619 | else |
| 6634 | { | 6620 | { |
| 6635 | p->pointm = Qnil; | 6621 | p->pointm = Qnil; |
| 6636 | p->start = Qnil; | 6622 | p->start = Qnil; |
| 6637 | p->mark = Qnil; | ||
| 6638 | p->start_at_line_beg = Qnil; | 6623 | p->start_at_line_beg = Qnil; |
| 6639 | } | 6624 | } |
| 6640 | 6625 | ||
| 6641 | if (NILP (w->parent)) | 6626 | p->parent = NILP (w->parent) ? Qnil : XWINDOW (w->parent)->temslot; |
| 6642 | p->parent = Qnil; | 6627 | p->prev = NILP (w->prev) ? Qnil : XWINDOW (w->prev)->temslot; |
| 6643 | else | ||
| 6644 | p->parent = XWINDOW (w->parent)->temslot; | ||
| 6645 | |||
| 6646 | if (NILP (w->prev)) | ||
| 6647 | p->prev = Qnil; | ||
| 6648 | else | ||
| 6649 | p->prev = XWINDOW (w->prev)->temslot; | ||
| 6650 | 6628 | ||
| 6651 | if (WINDOWP (w->contents)) | 6629 | if (WINDOWP (w->contents)) |
| 6652 | i = save_window_save (w->contents, vector, i); | 6630 | i = save_window_save (w->contents, vector, i); |
| @@ -6660,8 +6638,8 @@ DEFUN ("current-window-configuration", Fcurrent_window_configuration, | |||
| 6660 | doc: /* Return an object representing the current window configuration of FRAME. | 6638 | doc: /* Return an object representing the current window configuration of FRAME. |
| 6661 | If FRAME is nil or omitted, use the selected frame. | 6639 | If FRAME is nil or omitted, use the selected frame. |
| 6662 | This describes the number of windows, their sizes and current buffers, | 6640 | This describes the number of windows, their sizes and current buffers, |
| 6663 | and for each displayed buffer, where display starts, and the positions of | 6641 | and for each displayed buffer, where display starts, and the position of |
| 6664 | point and mark. An exception is made for point in the current buffer: | 6642 | point. An exception is made for point in the current buffer: |
| 6665 | its value is -not- saved. | 6643 | its value is -not- saved. |
| 6666 | This also records the currently selected frame, and FRAME's focus | 6644 | This also records the currently selected frame, and FRAME's focus |
| 6667 | redirection (see `redirect-frame-focus'). The variable | 6645 | redirection (see `redirect-frame-focus'). The variable |
| @@ -7105,8 +7083,7 @@ compare_window_configurations (Lisp_Object configuration1, | |||
| 7105 | || !EQ (sw1->min_hscroll, sw2->min_hscroll) | 7083 | || !EQ (sw1->min_hscroll, sw2->min_hscroll) |
| 7106 | || !EQ (sw1->start_at_line_beg, sw2->start_at_line_beg) | 7084 | || !EQ (sw1->start_at_line_beg, sw2->start_at_line_beg) |
| 7107 | || NILP (Fequal (sw1->start, sw2->start)) | 7085 | || NILP (Fequal (sw1->start, sw2->start)) |
| 7108 | || NILP (Fequal (sw1->pointm, sw2->pointm)) | 7086 | || NILP (Fequal (sw1->pointm, sw2->pointm)))) |
| 7109 | || NILP (Fequal (sw1->mark, sw2->mark)))) | ||
| 7110 | || !EQ (sw1->left_margin_cols, sw2->left_margin_cols) | 7087 | || !EQ (sw1->left_margin_cols, sw2->left_margin_cols) |
| 7111 | || !EQ (sw1->right_margin_cols, sw2->right_margin_cols) | 7088 | || !EQ (sw1->right_margin_cols, sw2->right_margin_cols) |
| 7112 | || !EQ (sw1->left_fringe_width, sw2->left_fringe_width) | 7089 | || !EQ (sw1->left_fringe_width, sw2->left_fringe_width) |
| @@ -7123,7 +7100,7 @@ compare_window_configurations (Lisp_Object configuration1, | |||
| 7123 | DEFUN ("compare-window-configurations", Fcompare_window_configurations, | 7100 | DEFUN ("compare-window-configurations", Fcompare_window_configurations, |
| 7124 | Scompare_window_configurations, 2, 2, 0, | 7101 | Scompare_window_configurations, 2, 2, 0, |
| 7125 | doc: /* Compare two window configurations as regards the structure of windows. | 7102 | doc: /* Compare two window configurations as regards the structure of windows. |
| 7126 | This function ignores details such as the values of point and mark | 7103 | This function ignores details such as the values of point |
| 7127 | and scrolling positions. */) | 7104 | and scrolling positions. */) |
| 7128 | (Lisp_Object x, Lisp_Object y) | 7105 | (Lisp_Object x, Lisp_Object y) |
| 7129 | { | 7106 | { |