;;; The initial value given here for used to ask for a minibuffer.
;;; But that's not necessary, because the default is to have one.
;;; By not specifying it here, we let an X resource specify it.
-(defvar initial-frame-alist nil
+(defcustom initial-frame-alist nil
"Alist of frame parameters for creating the initial X window frame.
You can set this in your `.emacs' file; for example,
(setq initial-frame-alist '((top . 1) (left . 1) (width . 80) (height . 55)))
* Set `default-frame-alist' to override these options so that they
don't affect subsequent frames.
* Set `initial-frame-alist' in a way that matches the X resources,
- to override what you put in `default-frame-alist'.")
+ to override what you put in `default-frame-alist'."
+ :type '(repeat (cons :format "%v"
+ (symbol :tag "Parameter")
+ (sexp :tag "Value")))
+ :group 'frames)
(defvar minibuffer-frame-alist '((width . 80) (height . 2))
"Alist of frame parameters for initially creating a minibuffer frame.
"Make a frame on display DISPLAY.
The optional second argument PARAMETERS specifies additional frame parameters."
(interactive "sMake frame on display: ")
+ (or (string-match "\\`[^:]*:[0-9]+\\(\\.[0-9]+\\)?\\'" display)
+ (error "Invalid display, not HOST:SERVER or HOST:SERVER.SCREEN"))
(make-frame (cons (cons 'display display) parameters)))
(defun make-frame-command ()
(error "There is no frame named `%s'" name))
(make-frame-visible frame)
(raise-frame frame)
- (select-frame frame)))
+ (select-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)))))
\f
;;;; Frame configurations
(defun frame-parameter (frame parameter)
"Return FRAME's value for parameter PARAMETER.
-If FRAME is omitted, describe the currently selected frame."
+If FRAME is nil, describe the currently selected frame."
(cdr (assq parameter (frame-parameters frame))))
(defun frame-height (&optional frame)