diff options
| author | Stefan Monnier | 2008-06-10 16:08:48 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2008-06-10 16:08:48 +0000 |
| commit | a1562258dcd1634303dae465232d87c6505d26d1 (patch) | |
| tree | 914320d89d7de21b7eb0895baea7336fca42dd25 /src/window.c | |
| parent | 12b139e9a83173b9461e22cc908721b2b3a04245 (diff) | |
| download | emacs-a1562258dcd1634303dae465232d87c6505d26d1.tar.gz emacs-a1562258dcd1634303dae465232d87c6505d26d1.zip | |
* window.c (Vwindow_point_insertion_type): New var.
(set_window_buffer): Use it.
(syms_of_window): Init and export it to Lisp.
* progmodes/compile.el (compilation-mode):
Set window-point-insertion-type.
(compilation-filter): Don't use insert-before-markers any more.
* emacs-lisp/trace.el (trace-make-advice):
Set window-point-insertion-type in the trace buffer.
* startup.el (normal-top-level): Set window-point-insertion-type in
*Messages*.
* net/telnet.el (telnet-mode): Set window-point-insertion-type.
(telnet-filter): Don't use insert-before-markers any more.
* comint.el (comint-mode): Set window-point-insertion-type.
(comint-output-filter): Don't use insert-before-markers any more.
* button.el (make-text-button): Allow `start' to be a string.
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/window.c b/src/window.c index 7af0c6db711..27db0296dcf 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -167,6 +167,10 @@ static Lisp_Object Vwindow_configuration_change_hook; | |||
| 167 | 167 | ||
| 168 | Lisp_Object Vscroll_preserve_screen_position; | 168 | Lisp_Object Vscroll_preserve_screen_position; |
| 169 | 169 | ||
| 170 | /* Non-nil means that text is inserted before window's markers. */ | ||
| 171 | |||
| 172 | Lisp_Object Vwindow_point_insertion_type; | ||
| 173 | |||
| 170 | /* Incremented by 1 whenever a window is deleted. */ | 174 | /* Incremented by 1 whenever a window is deleted. */ |
| 171 | 175 | ||
| 172 | int window_deletion_count; | 176 | int window_deletion_count; |
| @@ -3420,6 +3424,8 @@ set_window_buffer (window, buffer, run_hooks_p, keep_margins_p) | |||
| 3420 | Fset_buffer (buffer); | 3424 | Fset_buffer (buffer); |
| 3421 | } | 3425 | } |
| 3422 | 3426 | ||
| 3427 | XMARKER (w->pointm)->insertion_type = !NILP (Vwindow_point_insertion_type); | ||
| 3428 | |||
| 3423 | if (!keep_margins_p) | 3429 | if (!keep_margins_p) |
| 3424 | { | 3430 | { |
| 3425 | /* Set left and right marginal area width etc. from buffer. */ | 3431 | /* Set left and right marginal area width etc. from buffer. */ |
| @@ -3486,9 +3492,11 @@ This function runs the hook `window-scroll-functions'. */) | |||
| 3486 | else if (! EQ (tem, Qt)) /* w->buffer is t when the window | 3492 | else if (! EQ (tem, Qt)) /* w->buffer is t when the window |
| 3487 | is first being set up. */ | 3493 | is first being set up. */ |
| 3488 | { | 3494 | { |
| 3489 | if (!NILP (w->dedicated) && !EQ (tem, buffer)) | 3495 | if (!EQ (tem, buffer)) |
| 3490 | error ("Window is dedicated to `%s'", | 3496 | if (EQ (w->dedicated, Qt)) |
| 3491 | SDATA (XBUFFER (tem)->name)); | 3497 | error ("Window is dedicated to `%s'", SDATA (XBUFFER (tem)->name)); |
| 3498 | else | ||
| 3499 | w->dedicated = Qnil; | ||
| 3492 | 3500 | ||
| 3493 | unshow_buffer (w); | 3501 | unshow_buffer (w); |
| 3494 | } | 3502 | } |
| @@ -7151,6 +7159,10 @@ by full screens. | |||
| 7151 | Any other value means point always keeps its screen position. */); | 7159 | Any other value means point always keeps its screen position. */); |
| 7152 | Vscroll_preserve_screen_position = Qnil; | 7160 | Vscroll_preserve_screen_position = Qnil; |
| 7153 | 7161 | ||
| 7162 | DEFVAR_LISP ("window-point-insertion-type", &Vwindow_point_insertion_type, | ||
| 7163 | doc: /* Type of marker to use for `window-point'. */); | ||
| 7164 | Vwindow_point_insertion_type = Qnil; | ||
| 7165 | |||
| 7154 | DEFVAR_LISP ("window-configuration-change-hook", | 7166 | DEFVAR_LISP ("window-configuration-change-hook", |
| 7155 | &Vwindow_configuration_change_hook, | 7167 | &Vwindow_configuration_change_hook, |
| 7156 | doc: /* Functions to call when window configuration changes. | 7168 | doc: /* Functions to call when window configuration changes. |