;;; frame.el --- multi-frame management independent of window systems.
-;; Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1994, 1996, 1997, 2000 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: internal
;; when we first made the frame.
(setq parms (cons '(reverse) (delq (assq 'reverse parms) parms)))
(if (assq 'height frame-initial-geometry-arguments)
- (setq parms (assoc-delete-all 'height parms)))
+ (setq parms (assq-delete-all 'height parms)))
(if (assq 'width frame-initial-geometry-arguments)
- (setq parms (assoc-delete-all 'width parms)))
+ (setq parms (assq-delete-all 'width parms)))
(if (assq 'left frame-initial-geometry-arguments)
- (setq parms (assoc-delete-all 'left parms)))
+ (setq parms (assq-delete-all 'left parms)))
(if (assq 'top frame-initial-geometry-arguments)
- (setq parms (assoc-delete-all 'top parms)))
+ (setq parms (assq-delete-all 'top parms)))
(setq new
(make-frame
;; Use the geometry args that created the existing
(setq allparms (append initial-frame-alist
default-frame-alist))
(if (assq 'height frame-initial-geometry-arguments)
- (setq allparms (assoc-delete-all 'height allparms)))
+ (setq allparms (assq-delete-all 'height allparms)))
(if (assq 'width frame-initial-geometry-arguments)
- (setq allparms (assoc-delete-all 'width allparms)))
+ (setq allparms (assq-delete-all 'width allparms)))
(if (assq 'left frame-initial-geometry-arguments)
- (setq allparms (assoc-delete-all 'left allparms)))
+ (setq allparms (assq-delete-all 'left allparms)))
(if (assq 'top frame-initial-geometry-arguments)
- (setq allparms (assoc-delete-all 'top allparms)))
+ (setq allparms (assq-delete-all 'top allparms)))
(setq tail allparms)
;; Find just the parms that have changed since we first
;; made this frame. Those are the ones actually set by
(while (not (eq (frame-visible-p frame) t))
(setq frame (previous-frame frame)))
(setq arg (1+ arg)))
- (raise-frame frame)
(select-frame frame)
+ (raise-frame frame)
;; Ensure, if possible, that frame gets input focus.
- (if (eq window-system 'w32)
- (w32-focus-frame frame)
- (when focus-follows-mouse
- (set-mouse-position (selected-frame) (1- (frame-width)) 0)))))
+ (when (eq window-system 'w32)
+ (w32-focus-frame frame))
+ (cond (focus-follows-mouse
+ (unless (eq window-system 'w32)
+ (set-mouse-position (selected-frame) (1- (frame-width)) 0)))
+ (t
+ (when (eq window-system 'x)
+ (x-focus-frame frame))))))
(defun make-frame-names-alist ()
(let* ((current-frame (selected-frame))
((memq frame-type '(x mac))
t) ;; We assume X and Mac *always* have a pointing device
(t
- (featurep 'xt-mouse)))))
+ (or (and (featurep 'xt-mouse)
+ xterm-mouse-mode)
+ ;; t-mouse is distributed with the GPM package. It doesn't have
+ ;; a toggle.
+ (featurep 't-mouse))))))
(defun display-popup-menus-p (&optional display)
"Return non-nil if popup menus are supported on DISPLAY.
:group 'font-lock)
+\f
+;;; Scrolling
+
+(defgroup scrolling nil
+ "Scrolling windows."
+ :version "21.1"
+ :group 'frames)
+
+(defcustom automatic-hscrolling t
+ "*Allow or disallow autmatic scrolling windows horizontally.
+If non-nil, windows are automatically scrolled horizontally to make
+point visible."
+ :version "21.1"
+ :type 'boolean
+ :group 'scrolling)
+
\f
;;; Blinking cursor
(run-with-idle-timer blink-cursor-delay
blink-cursor-delay
'blink-cursor-start))
- (setq blink-cursor-mode t)))))
+ (setq blink-cursor-mode t))
+ (internal-show-cursor nil t))))
(defcustom blink-cursor (not (eq system-type 'ms-dos))
"*Non-nil means blinking cursor mode is active."
(set-default symbol value)
(setq display-busy-cursor value)))
+(defcustom busy-cursor-delay-seconds 1
+ "*Seconds to wait before displaying a busy-cursor."
+ :tag "Busy-cursor delay"
+ :type 'number
+ :group 'cursor
+ :get #'(lambda (symbol) busy-cursor-delay)
+ :set #'(lambda (symbol value)
+ (set-default symbol value)
+ (setq busy-cursor-delay value)))
+\f
+(defcustom show-cursor-in-non-selected-windows t
+ "*Non-nil means show a hollow box cursor in non-selected-windows.
+If nil, don't show a cursor except in the selected window."
+ :tag "Cursor in non-selected windows"
+ :type 'boolean
+ :group 'cursor
+ :get #'(lambda (symbol) cursor-in-non-selected-windows)
+ :set #'(lambda (symbol value)
+ (set-default symbol value)
+ (setq cursor-in-non-selected-windows value)
+ (force-mode-line-update t)))
+
\f
;;;; Key bindings