[Define to 1 if personality LINUX32 can be set.])
fi
- fi
+ if test "$ac_cv_header_sys_sysinfo_h" = yes; then
+ AC_MSG_CHECKING([if Linux sysinfo may be used])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/sysinfo.h>]],
+ [[struct sysinfo si; sysinfo (&si)]])],
+ emacs_cv_linux_sysinfo=yes, emacs_cv_linux_sysinfo=no)
+ AC_MSG_RESULT($emacs_cv_linux_sysinfo)
+ if test $emacs_cv_linux_sysinfo = yes; then
+ AC_DEFINE([HAVE_LINUX_SYSINFO], 1, [Define to 1 if you have Linux sysinfo function.])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/sysinfo.h>]],
+ [[struct sysinfo si; return si.mem_unit]])],
+ AC_DEFINE(LINUX_SYSINFO_UNIT, 1,
+ [Define to 1 if Linux sysinfo sizes are in multiples of mem_unit bytes.]))
+ fi
++ fi
+
dnl On Solaris 8 there's a compilation warning for term.h because
dnl it doesn't define `bool'.
AC_CHECK_HEADERS(term.h, , , -)
(setq command-line-args (delete key command-line-args))
(desktop-save-mode 0)))
(when desktop-save-mode
- (desktop-read)
- (setq inhibit-startup-screen t))))
+ ;; People don't expect emacs -nw, or --daemon,
+ ;; to create graphical frames (bug#17693).
+ ;; TODO perhaps there should be a separate value
+ ;; for desktop-restore-frames to control this startup behavior?
+ (let ((desktop-restore-frames (and desktop-restore-frames
+ initial-window-system
+ (not (daemonp)))))
+ (desktop-read)
+ (setq inhibit-startup-screen t)))))
--;; So we can restore vc-dir buffers.
--(autoload 'vc-dir-mode "vc-dir" nil t)
--
(provide 'desktop)
;;; desktop.el ends here
Lisp_Object Qinsert_in_front_hooks;
Lisp_Object Qinsert_behind_hooks;
- Lisp_Object Qchoice, Qrange, Qleft, Qright, Qvertical_scroll_bar;
++ Lisp_Object Qchoice, Qrange, Qleft, Qright;
++ Lisp_Object Qvertical_scroll_bar, Qhorizontal_scroll_bar;
+ static Lisp_Object Qoverwrite_mode, Qfraction;
+
static void alloc_buffer_text (struct buffer *, ptrdiff_t);
static void free_buffer_text (struct buffer *b);
static struct Lisp_Overlay * copy_overlays (struct buffer *, struct Lisp_Overlay *);
DEFSYM (Qafter_change_functions, "after-change-functions");
DEFSYM (Qkill_buffer_query_functions, "kill-buffer-query-functions");
+ DEFSYM (Qvertical_scroll_bar, "vertical-scroll-bar");
+ Fput (Qvertical_scroll_bar, Qchoice, list4 (Qnil, Qt, Qleft, Qright));
++ DEFSYM (Qhorizontal_scroll_bar, "horizontal-scroll-bar");
+
+ DEFSYM (Qfraction, "fraction");
+ Fput (Qfraction, Qrange, Fcons (make_float (0.0), make_float (1.0)));
+
+ DEFSYM (Qoverwrite_mode, "overwrite-mode");
+ Fput (Qoverwrite_mode, Qchoice,
+ list3 (Qnil, intern ("overwrite-mode-textual"),
+ intern ("overwrite-mode-binary")));
+
Fput (Qprotected_field, Qerror_conditions,
listn (CONSTYPE_PURE, 2, Qprotected_field, Qerror));
Fput (Qprotected_field, Qerror_message,
doc: /* Width of this buffer's scroll bars in pixels.
A value of nil means to use the scroll bar width from the window's frame. */);
++ DEFVAR_PER_BUFFER ("scroll-bar-height", &BVAR (current_buffer, scroll_bar_height),
++ Qintegerp,
++ doc: /* Height of this buffer's scroll bars in pixels.
++ A value of nil means to use the scroll bar heiht from the window's frame. */);
++
DEFVAR_PER_BUFFER ("vertical-scroll-bar", &BVAR (current_buffer, vertical_scroll_bar_type),
- Qnil,
+ Qvertical_scroll_bar,
doc: /* Position of this buffer's vertical scroll bar.
The value takes effect whenever you tell a window to display this buffer;
for instance, with `set-window-buffer' or when `display-buffer' displays it.
}
else
{
-- new_cols = (new_width == 0) ? FRAME_COLS (f) : new_width;
-- new_lines = (new_height == 0) ? FRAME_LINES (f) : new_height;
-- new_text_width = new_cols * FRAME_COLUMN_WIDTH (f);
-- new_text_height = new_lines * FRAME_LINE_HEIGHT (f);
-- }
--
-- /* Compute width of windows in F. */
-- /* Round up to the smallest acceptable size. */
-- check_frame_size (f, &new_text_width, &new_text_height, 1);
--
-- /* This is the width of the frame without vertical scroll bars and
-- fringe columns. Do this after rounding - see discussion of
-- bug#9723. */
-- new_root_width = (new_text_width
-- + FRAME_SCROLL_BAR_AREA_WIDTH (f)
-- + FRAME_TOTAL_FRINGE_WIDTH (f));
-- /* If we're not changing the frame size, quit now. */
-- /* Frame width may be unchanged but the text portion may change, for
-- example, fullscreen and remove/add scroll bar. */
-- if (new_text_height == FRAME_TEXT_HEIGHT (f)
-- && new_text_width == FRAME_TEXT_WIDTH (f)
-- && new_root_width == old_root_width
-- && (FRAME_PIXEL_HEIGHT (f) ==
-- FRAME_TEXT_TO_PIXEL_HEIGHT (f, new_text_height))
-- && (FRAME_PIXEL_WIDTH (f) ==
-- FRAME_TEXT_TO_PIXEL_WIDTH (f, new_text_width)))
-- return;
-
- block_input ();
++ /* This size-change overrides any pending one for this frame. */
++ f->new_height = 0;
++ f->new_width = 0;
++ f->new_pixelwise = 0;
- block_input ();
-
-- #ifdef MSDOS
-- /* We only can set screen dimensions to certain values supported
-- by our video hardware. Try to find the smallest size greater
-- or equal to the requested dimensions. */
-- dos_set_window_size (&new_lines, &new_cols);
-- #endif
--
-- if (new_text_height != FRAME_TEXT_HEIGHT (f))
-- {
-- resize_frame_windows (f, new_text_height, 0, 1);
--
-- /* MSDOS frames cannot PRETEND, as they change frame size by
-- manipulating video hardware. */
-- if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f))
-- FrameRows (FRAME_TTY (f)) = new_lines;
-- }
--
-- if (new_text_width != FRAME_TEXT_WIDTH (f)
-- || new_root_width != old_root_width)
-- {
-- resize_frame_windows (f, new_root_width, 1, 1);
--
-- /* MSDOS frames cannot PRETEND, as they change frame size by
-- manipulating video hardware. */
-- if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f))
-- FrameCols (FRAME_TTY (f)) = new_cols;
--
-- #if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS)
-- if (WINDOWP (f->tool_bar_window))
++ /* If an argument is zero, set it to the current value. */
++ if (pixelwise)
{
-- XWINDOW (f->tool_bar_window)->total_cols = new_cols;
-- XWINDOW (f->tool_bar_window)->pixel_width = new_root_width;
++ new_width = (new_width <= 0) ? FRAME_TEXT_WIDTH (f) : new_width;
++ new_height = (new_height <= 0) ? FRAME_TEXT_HEIGHT (f) : new_height;
++ }
++ else
++ {
++ new_width = (((new_width <= 0) ? FRAME_COLS (f) : new_width)
++ * FRAME_COLUMN_WIDTH (f));
++ new_height = (((new_height <= 0) ? FRAME_LINES (f) : new_height)
++ * FRAME_LINE_HEIGHT (f));
}
-- #endif
-- }
--
-- SET_FRAME_COLS (f, new_cols);
-- FRAME_LINES (f) = new_lines;
-- FRAME_TEXT_WIDTH (f) = new_text_width;
-- FRAME_TEXT_HEIGHT (f) = new_text_height;
-- FRAME_PIXEL_WIDTH (f) = FRAME_TEXT_TO_PIXEL_WIDTH (f, new_text_width);
-- FRAME_PIXEL_HEIGHT (f) = FRAME_TEXT_TO_PIXEL_HEIGHT (f, new_text_height);
-- {
-- struct window *w = XWINDOW (FRAME_SELECTED_WINDOW (f));
-- int text_area_x, text_area_y, text_area_width, text_area_height;
--
-- window_box (w, TEXT_AREA, &text_area_x, &text_area_y, &text_area_width,
-- &text_area_height);
-- if (w->cursor.x >= text_area_x + text_area_width)
-- w->cursor.hpos = w->cursor.x = 0;
-- if (w->cursor.y >= text_area_y + text_area_height)
-- w->cursor.vpos = w->cursor.y = 0;
-- }
++ /* Adjust frame size but make sure x_set_window_size does not
++ get called. */
++ adjust_frame_size (f, new_width, new_height, 5, pretend);
++ }
++ }
-- adjust_frame_glyphs (f);
-- calculate_costs (f);
-- SET_FRAME_GARBAGED (f);
-- f->resized_p = 1;
-- unblock_input ();
++ /* Change text height/width of frame F. Values may be given as zero to
++ indicate that no change is needed.
-- record_unwind_current_buffer ();
++ If DELAY, assume we're being called from a signal handler, and queue
++ the change for later - perhaps the next redisplay. Since this tries
++ to resize windows, we can't call it from a signal handler.
-- run_window_configuration_change_hook (f);
++ SAFE means this function is called from a place where it's safe to
++ change frame sizes while a redisplay is in progress. */
++ void
++ change_frame_size (struct frame *f, int new_width, int new_height,
++ bool pretend, bool delay, bool safe, bool pixelwise)
++ {
++ Lisp_Object tail, frame;
-- unbind_to (count, Qnil);
++ if (FRAME_MSDOS_P (f))
++ {
++ /* On MS-DOS, all frames use the same screen, so a change in
++ size affects all frames. Termcap now supports multiple
++ ttys. */
++ FOR_EACH_FRAME (tail, frame)
++ if (! FRAME_WINDOW_P (XFRAME (frame)))
++ change_frame_size_1 (XFRAME (frame), new_width, new_height,
++ pretend, delay, safe, pixelwise);
++ }
++ else
++ change_frame_size_1 (f, new_width, new_height, pretend, delay, safe,
++ pixelwise);
}
\f
/***********************************************************************
{
int pixelwidth, pixelheight;
-- check_frame_size (f, &width, &height, pixelwise);
--
-- compute_fringe_widths (f, 0);
--
-- pixelwidth = ((pixelwise
-- ? FRAME_TEXT_TO_PIXEL_WIDTH (f, width)
-- : FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, width))
-- + FRAME_TOOLBAR_WIDTH (f));
++ /** if (pixelwise) **/
++ /** { **/
++ /** pixelwidth = FRAME_TEXT_TO_PIXEL_WIDTH (f, width); **/
++ /** pixelheight = FRAME_TEXT_TO_PIXEL_HEIGHT (f, height); **/
++ /** } **/
++ /** else **/
++ /** { **/
++ /** pixelwidth = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, width); **/
++ /** pixelheight = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, height); **/
++ /** } **/
++
++ /** FRAME_TOOL_BAR_HEIGHT (f) = FRAME_TOOLBAR_HEIGHT (f); **/
++ pixelwidth = (pixelwise
++ ? FRAME_TEXT_TO_PIXEL_WIDTH (f, width)
++ : FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, width));
pixelheight = ((pixelwise
? FRAME_TEXT_TO_PIXEL_HEIGHT (f, height)
-- : FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, height))
-- + FRAME_MENUBAR_HEIGHT (f)
-- + FRAME_TOOLBAR_HEIGHT (f));
++ : FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, height)));
++
++ /** pixelwidth = ((pixelwise ? width : (width * FRAME_COLUMN_WIDTH (f))) **/
++ /** + FRAME_SCROLL_BAR_AREA_WIDTH (f) **/
++ /** + FRAME_TOTAL_FRINGE_WIDTH (f) **/
++ /** + 2 * FRAME_INTERNAL_BORDER_WIDTH (f)); **/
++
++ /** pixelheight = ((pixelwise ? height : (height * FRAME_LINE_HEIGHT (f))) **/
++ /** + FRAME_TOOLBAR_HEIGHT (f) **/
++ /** + FRAME_SCROLL_BAR_AREA_HEIGHT (f) **/
++ /** + 2 * FRAME_INTERNAL_BORDER_WIDTH (f)); **/
++
if (change_gravity) f->win_gravity = NorthWestGravity;
- x_wm_set_size_hint (f, (long) 0, 0);
+ x_wm_set_size_hint (f, 0, 0);
XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
-- pixelwidth, pixelheight);
++ pixelwidth, pixelheight + FRAME_MENUBAR_HEIGHT (f));
/* We've set {FRAME,PIXEL}_{WIDTH,HEIGHT} to the values we hope to