diff options
| author | Martin Rudalics | 2018-12-30 15:47:16 +0100 |
|---|---|---|
| committer | Martin Rudalics | 2018-12-30 15:47:16 +0100 |
| commit | d82e73f08f8c12cfa144ff2e404a65e8bff1ab2e (patch) | |
| tree | 19d4f25859887f951ab165d541739f2eb7a7855e /src | |
| parent | b0e6ecfc33077fb2dce904d315c8ef24e3649c9b (diff) | |
| download | emacs-d82e73f08f8c12cfa144ff2e404a65e8bff1ab2e.tar.gz emacs-d82e73f08f8c12cfa144ff2e404a65e8bff1ab2e.zip | |
Handle 'unbound' like nil for 'window-point-insertion-type' (Bug#33871)
* src/window.c (save_window_save): When setting the marker
insertion type of saved window points treat a buffer local
value of 'unbound' for 'window-point-insertion-type' like
nil (Bug#33871).
Diffstat (limited to 'src')
| -rw-r--r-- | src/window.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/window.c b/src/window.c index 14b3364477e..a69b115e4bb 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -6965,6 +6965,12 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, ptrdiff_t i) | |||
| 6965 | 6965 | ||
| 6966 | if (BUFFERP (w->contents)) | 6966 | if (BUFFERP (w->contents)) |
| 6967 | { | 6967 | { |
| 6968 | Lisp_Object buffer_local_window_point_insertion_type | ||
| 6969 | = (buffer_local_value (Qwindow_point_insertion_type, w->contents)); | ||
| 6970 | bool window_point_insertion_type | ||
| 6971 | = (!NILP (buffer_local_window_point_insertion_type) | ||
| 6972 | && !EQ (buffer_local_window_point_insertion_type, Qunbound)); | ||
| 6973 | |||
| 6968 | /* Save w's value of point in the window configuration. If w | 6974 | /* Save w's value of point in the window configuration. If w |
| 6969 | is the selected window, then get the value of point from | 6975 | is the selected window, then get the value of point from |
| 6970 | the buffer; pointm is garbage in the selected window. */ | 6976 | the buffer; pointm is garbage in the selected window. */ |
| @@ -6975,12 +6981,8 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, ptrdiff_t i) | |||
| 6975 | else | 6981 | else |
| 6976 | p->pointm = Fcopy_marker (w->pointm, Qnil); | 6982 | p->pointm = Fcopy_marker (w->pointm, Qnil); |
| 6977 | p->old_pointm = Fcopy_marker (w->old_pointm, Qnil); | 6983 | p->old_pointm = Fcopy_marker (w->old_pointm, Qnil); |
| 6978 | XMARKER (p->pointm)->insertion_type | 6984 | XMARKER (p->pointm)->insertion_type = window_point_insertion_type; |
| 6979 | = !NILP (buffer_local_value /* Don't signal error if void. */ | 6985 | XMARKER (p->old_pointm)->insertion_type = window_point_insertion_type; |
| 6980 | (Qwindow_point_insertion_type, w->contents)); | ||
| 6981 | XMARKER (p->old_pointm)->insertion_type | ||
| 6982 | = !NILP (buffer_local_value /* Don't signal error if void. */ | ||
| 6983 | (Qwindow_point_insertion_type, w->contents)); | ||
| 6984 | 6986 | ||
| 6985 | p->start = Fcopy_marker (w->start, Qnil); | 6987 | p->start = Fcopy_marker (w->start, Qnil); |
| 6986 | p->start_at_line_beg = w->start_at_line_beg ? Qt : Qnil; | 6988 | p->start_at_line_beg = w->start_at_line_beg ? Qt : Qnil; |