aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Rudalics2011-06-12 12:16:46 +0200
committerMartin Rudalics2011-06-12 12:16:46 +0200
commite10ac9f13ab251789fd0232ea10259a0110d4a45 (patch)
treebd898bc08af1516855b3a1065dbe6e3bdd6d1fe6 /src
parentacb8e1dd7d23dfb33ed4df0ecb0fb8099547361b (diff)
downloademacs-e10ac9f13ab251789fd0232ea10259a0110d4a45.tar.gz
emacs-e10ac9f13ab251789fd0232ea10259a0110d4a45.zip
Fix make_frame, introduce Vtemp_buffer_show_specifiers, cleanup doc-strings.
* frame.c (make_frame): Call other_buffer_safely instead of other_buffer. * window.c (temp_output_buffer_show): Call display_buffer with second argument Vtemp_buffer_show_specifiers and reset latter immediately after the call. (Vtemp_buffer_show_specifiers): New variable. (auto_window_vscroll_p, next_screen_context_lines) (Vscroll_preserve_screen_position): Remove leading asterisks from doc-strings.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog13
-rw-r--r--src/frame.c2
-rw-r--r--src/window.c21
3 files changed, 31 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 51b7b863ff0..15b6bf6baf2 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,16 @@
12011-06-12 Martin Rudalics <rudalics@gmx.at>
2
3 * frame.c (make_frame): Call other_buffer_safely instead of
4 other_buffer.
5
6 * window.c (temp_output_buffer_show): Call display_buffer with
7 second argument Vtemp_buffer_show_specifiers and reset latter
8 immediately after the call.
9 (Vtemp_buffer_show_specifiers): New variable.
10 (auto_window_vscroll_p, next_screen_context_lines)
11 (Vscroll_preserve_screen_position): Remove leading asterisks from
12 doc-strings.
13
12011-06-12 Paul Eggert <eggert@cs.ucla.edu> 142011-06-12 Paul Eggert <eggert@cs.ucla.edu>
2 15
3 Fix minor problems found by GCC 4.6.0 static checking. 16 Fix minor problems found by GCC 4.6.0 static checking.
diff --git a/src/frame.c b/src/frame.c
index 66e0078d382..34474417efa 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -370,7 +370,7 @@ make_frame (int mini_p)
370 /* If buf is a 'hidden' buffer (i.e. one whose name starts with 370 /* If buf is a 'hidden' buffer (i.e. one whose name starts with
371 a space), try to find another one. */ 371 a space), try to find another one. */
372 if (SREF (Fbuffer_name (buf), 0) == ' ') 372 if (SREF (Fbuffer_name (buf), 0) == ' ')
373 buf = Fother_buffer (buf, Qnil, Qnil); 373 buf = other_buffer_safely (buf);
374 374
375 /* Use set_window_buffer, not Fset_window_buffer, and don't let 375 /* Use set_window_buffer, not Fset_window_buffer, and don't let
376 hooks be run by it. The reason is that the whole frame/window 376 hooks be run by it. The reason is that the whole frame/window
diff --git a/src/window.c b/src/window.c
index 4345a13ea59..65df9f26e64 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3224,7 +3224,10 @@ temp_output_buffer_show (register Lisp_Object buf)
3224 call1 (Vtemp_buffer_show_function, buf); 3224 call1 (Vtemp_buffer_show_function, buf);
3225 else 3225 else
3226 { 3226 {
3227 window = display_buffer (buf, Qnil, Qnil); 3227 window = display_buffer (buf, Vtemp_buffer_show_specifiers, Qnil);
3228 /* Reset Vtemp_buffer_show_specifiers immediately so it won't
3229 affect subsequent calls. */
3230 Vtemp_buffer_show_specifiers = Qnil;
3228 3231
3229 if (!EQ (XWINDOW (window)->frame, selected_frame)) 3232 if (!EQ (XWINDOW (window)->frame, selected_frame))
3230 Fmake_frame_visible (WINDOW_FRAME (XWINDOW (window))); 3233 Fmake_frame_visible (WINDOW_FRAME (XWINDOW (window)));
@@ -6520,6 +6523,16 @@ If this function is used, then it must do the entire job of showing
6520the buffer; `temp-buffer-show-hook' is not run unless this function runs it. */); 6523the buffer; `temp-buffer-show-hook' is not run unless this function runs it. */);
6521 Vtemp_buffer_show_function = Qnil; 6524 Vtemp_buffer_show_function = Qnil;
6522 6525
6526 DEFVAR_LISP ("temp-buffer-show-specifiers", Vtemp_buffer_show_specifiers,
6527 doc: /* Buffer display specifiers used by `with-output-to-temp-buffer'.
6528These specifiers are passed by `with-output-to-temp-buffer' as second
6529argument to `display-buffer'. Applications should only let-bind this
6530around a call to `with-output-to-temp-buffer'.
6531
6532For a description of buffer display specifiers see the variable
6533`display-buffer-alist'. */);
6534 Vtemp_buffer_show_specifiers = Qnil;
6535
6523 DEFVAR_LISP ("minibuffer-scroll-window", Vminibuf_scroll_window, 6536 DEFVAR_LISP ("minibuffer-scroll-window", Vminibuf_scroll_window,
6524 doc: /* Non-nil means it is the window that C-M-v in minibuffer should scroll. */); 6537 doc: /* Non-nil means it is the window that C-M-v in minibuffer should scroll. */);
6525 Vminibuf_scroll_window = Qnil; 6538 Vminibuf_scroll_window = Qnil;
@@ -6535,16 +6548,16 @@ is displayed in the `mode-line' face. */);
6535 Vother_window_scroll_buffer = Qnil; 6548 Vother_window_scroll_buffer = Qnil;
6536 6549
6537 DEFVAR_BOOL ("auto-window-vscroll", auto_window_vscroll_p, 6550 DEFVAR_BOOL ("auto-window-vscroll", auto_window_vscroll_p,
6538 doc: /* *Non-nil means to automatically adjust `window-vscroll' to view tall lines. */); 6551 doc: /* Non-nil means to automatically adjust `window-vscroll' to view tall lines. */);
6539 auto_window_vscroll_p = 1; 6552 auto_window_vscroll_p = 1;
6540 6553
6541 DEFVAR_INT ("next-screen-context-lines", next_screen_context_lines, 6554 DEFVAR_INT ("next-screen-context-lines", next_screen_context_lines,
6542 doc: /* *Number of lines of continuity when scrolling by screenfuls. */); 6555 doc: /* Number of lines of continuity when scrolling by screenfuls. */);
6543 next_screen_context_lines = 2; 6556 next_screen_context_lines = 2;
6544 6557
6545 DEFVAR_LISP ("scroll-preserve-screen-position", 6558 DEFVAR_LISP ("scroll-preserve-screen-position",
6546 Vscroll_preserve_screen_position, 6559 Vscroll_preserve_screen_position,
6547 doc: /* *Controls if scroll commands move point to keep its screen position unchanged. 6560 doc: /* Controls if scroll commands move point to keep its screen position unchanged.
6548A value of nil means point does not keep its screen position except 6561A value of nil means point does not keep its screen position except
6549at the scroll margin or window boundary respectively. 6562at the scroll margin or window boundary respectively.
6550A value of t means point keeps its screen position if the scroll 6563A value of t means point keeps its screen position if the scroll