(defvar command-line-processed nil
"Non-nil once command line has been processed.")
+(defvar window-system initial-window-system
+ "Name of window system the selected frame is displaying through.
+The value is a symbol--for instance, `x' for X windows.
+The value is nil if the selected frame is on a text-only-terminal.")
+
+(make-variable-frame-local 'window-system)
+
(defgroup initialization nil
- "Emacs start-up procedure"
+ "Emacs start-up procedure."
:group 'internal)
(defcustom inhibit-startup-message nil
;; intelligent way than the default guesswork in startup.el.
(defun rxvt-set-background-mode ()
"Set background mode as appropriate for the default rxvt colors."
- (let ((fgbg (getenv "COLORFGBG"))
+ (let ((fgbg (server-getenv "COLORFGBG"))
bg rgb)
- (setq frame-background-mode 'light) ; default
+ (setq default-frame-background-mode 'light)
(when (and fgbg
(string-match ".*;\\([0-9][0-9]?\\)\\'" fgbg))
(setq bg (string-to-number (substring fgbg (match-beginning 1))))
;; intelligent way than the default guesswork in startup.el.
(defun xterm-rxvt-set-background-mode ()
"Set background mode as appropriate for the default rxvt colors."
- (let ((fgbg (getenv "COLORFGBG"))
+ (let ((fgbg (server-getenv "COLORFGBG"))
bg rgb)
- (setq frame-background-mode 'light) ; default
+ (setq default-frame-background-mode 'light)
(when (and fgbg
(string-match ".*;\\([0-9][0-9]?\\)\\'" fgbg))
(setq bg (string-to-number (substring fgbg (match-beginning 1))))
{
char *p;
- if (fg >= 0 && TS_set_foreground)
+ if (fg >= 0 && tty->TS_set_foreground)
{
- p = tparam (tty->TS_set_foreground, NULL, 0, (int) fg);
- if (standout_mode)
- p = tparam (TS_set_background, NULL, 0, (int) fg);
- else
- p = tparam (TS_set_foreground, NULL, 0, (int) fg);
- OUTPUT (p);
++ if (tty->standout_mode)
++ p = tparam (tty->TS_set_background, NULL, 0, (int) fg);
++ else
++ p = tparam (tty->TS_set_foreground, NULL, 0, (int) fg);
+ OUTPUT (tty, p);
xfree (p);
}
- if (bg >= 0 && TS_set_background)
+ if (bg >= 0 && tty->TS_set_background)
{
- p = tparam (tty->TS_set_background, NULL, 0, (int) bg);
- if (standout_mode)
- p = tparam (TS_set_foreground, NULL, 0, (int) bg);
- else
- p = tparam (TS_set_background, NULL, 0, (int) bg);
- OUTPUT (p);
++ if (tty->standout_mode)
++ p = tparam (tty->TS_set_foreground, NULL, 0, (int) bg);
++ else
++ p = tparam (tty->TS_set_background, NULL, 0, (int) bg);
+ OUTPUT (tty, p);
xfree (p);
}
}
window_box_edges (w, -1, &x0, &y0, &x1, &y1);
y1 -= 1;
- x1 -= 1;
+ if (WINDOW_LEFT_FRINGE_WIDTH (w) == 0)
- rif->draw_vertical_window_border (w, x1, y0, y1);
++ x1 -= 1;
+
+ FRAME_RIF (f)->draw_vertical_window_border (w, x1, y0, y1);
}
else if (!WINDOW_LEFTMOST_P (w)
&& !WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w))
window_box_edges (w, -1, &x0, &y0, &x1, &y1);
y1 -= 1;
- x0 -= 1;
+ if (WINDOW_LEFT_FRINGE_WIDTH (w) == 0)
- rif->draw_vertical_window_border (w, x0, y0, y1);
++ x0 -= 1;
+
+ FRAME_RIF (f)->draw_vertical_window_border (w, x0, y0, y1);
}
}
if (compose_status.chars_matched > 0 && nbytes == 0)
break;
+ bzero (&compose_status, sizeof (compose_status));
orig_keysym = keysym;
- /* Common for all keysym input events. */
- XSETFRAME (inev.ie.frame_or_window, f);
- inev.ie.modifiers
- = x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f), modifiers);
- inev.ie.timestamp = event.xkey.time;
-
- /* First deal with keysyms which have defined
- translations to characters. */
- if (keysym >= 32 && keysym < 128)
- /* Avoid explicitly decoding each ASCII character. */
- {
- inev.ie.kind = ASCII_KEYSTROKE_EVENT;
- inev.ie.code = keysym;
- goto done_keysym;
- }
-
- /* Now non-ASCII. */
- if (HASH_TABLE_P (Vx_keysym_table)
- && (NATNUMP (c = Fgethash (make_number (keysym),
- Vx_keysym_table,
- Qnil))))
- {
- inev.ie.kind = (SINGLE_BYTE_CHAR_P (XFASTINT (c))
- ? ASCII_KEYSTROKE_EVENT
- : MULTIBYTE_CHAR_KEYSTROKE_EVENT);
- inev.ie.code = XFASTINT (c);
- goto done_keysym;
- }
-
- /* Random non-modifier sorts of keysyms. */
- if (((keysym >= XK_BackSpace && keysym <= XK_Escape)
+ /* Common for all keysym input events. */
+ XSETFRAME (inev.ie.frame_or_window, f);
+ inev.ie.modifiers
+ = x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f), modifiers);
+ inev.ie.timestamp = event.xkey.time;
+
+ /* First deal with keysyms which have defined
+ translations to characters. */
+ if (keysym >= 32 && keysym < 128)
+ /* Avoid explicitly decoding each ASCII character. */
+ {
+ inev.ie.kind = ASCII_KEYSTROKE_EVENT;
+ inev.ie.code = keysym;
+ goto done_keysym;
+ }
+
+ /* Now non-ASCII. */
+ if (HASH_TABLE_P (Vx_keysym_table)
+ && (NATNUMP (c = Fgethash (make_number (keysym),
+ Vx_keysym_table,
+ Qnil))))
+ {
+ inev.ie.kind = (SINGLE_BYTE_CHAR_P (XFASTINT (c))
+ ? ASCII_KEYSTROKE_EVENT
+ : MULTIBYTE_CHAR_KEYSTROKE_EVENT);
+ inev.ie.code = XFASTINT (c);
+ goto done_keysym;
+ }
+
+ /* Random non-modifier sorts of keysyms. */
+ if (((keysym >= XK_BackSpace && keysym <= XK_Escape)
|| keysym == XK_Delete
#ifdef XK_ISO_Left_Tab
|| (keysym >= XK_ISO_Left_Tab