gnu-emacs-sources
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

setup-frames.el - define a custom default frame configuration


From: Drew Adams
Subject: setup-frames.el - define a custom default frame configuration
Date: Tue, 16 Jan 2001 21:35:20 -0500

;;; setup-frames.el --- Define default, multi-frame configuration.
;; 
;; Filename: setup-frames.el
;; Description: Define default, multi-frame configuration.
;; Author: Drew Adams
;; Maintainer: Drew Adams
;; Copyright (C) 1999-2001, Drew Adams, all rights reserved.
;; Created: Fri Apr  2 12:34:20 1999
;; Version: $Id: setup-frames.el,v 1.9 2001/01/09 22:15:05 dadams Exp $
;; Last-Updated: Tue Jan  9 14:14:57 2001
;;           By: dadams
;;     Update #: 566
;; Keywords: local, frames
;; Compatibility: GNU Emacs 20.x
;; 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 
;;; Commentary: 
;; 
;;    Define default, multi-frame configuration.
;; 
;;  New functions and macros defined here: 
;;
;;    `color-(in)active-minibuffer-frame',
;;    `color-isearch-minibuffer-frame', `flash-ding-minibuffer-frame',
;;    `minibuffer-frame-width'.
;;
;;  New user options defined here:
;;
;;    `active-minibuffer-frame-background', `create-builtin-frames',
;;    `default-frame-background', `default-frame-cursor-color',
;;    `default-frame-font', `default-frame-foreground',
;;    `default-frame-mouse-color', `default-frame-size',
;;    `default-special-display-frame-size',
;;    `default-special-frame-background',
;;    `default-special-frame-cursor-color',
;;    `default-special-frame-font',
;;    `default-special-frame-foreground',
;;    `default-special-frame-mouse-color',
;;    `display-*Completions*-frame', `display-*Help*-frame',
;;    `inactive-minibuffer-frame-background',
;;    `isearch-minibuffer-frame-background', `menu-bar-lines',
;;    `upper-left-frame-corner-default',
;;    `upper-left-special-display-frame-corner-default'.
;;
;;  Other new variables defined here:
;;
;;    `completions-frame-background',
;;    `completions-frame-mouse+cursor-color', `help-frame-background',
;;    `help-frame-mouse+cursor-color', `minibuffer-frame',
;;    `minibuffer-frame-cursor-color', `minibuffer-frame-font',
;;    `minibuffer-frame-foreground', `minibuffer-frame-height',
;;    `minibuffer-frame-mouse-color', `minibuffer-frame-top/bottom',
;;    `minibuffer-frame-width', `minibuffer-frame-width-percent'.
;;
;;
;;  ***** NOTE: The following EMACS PRIMITIVE has been REDEFINED HERE:
;;
;;  `y-or-n-p' - Temporarily colors minibuffer frame to "active" color.
;;
;;
;;  ***** NOTE: The following Emacs variables have been set here:
;;
;;  `default-frame-alist', `special-display-frame-alist',
;;  `w32-grab-focus-on-raise', `win32-grab-focus-on-raise'.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 
;;; Change log:
;; 
;; RCS $Log: setup-frames.el,v $
;; RCS Revision 1.9  2001/01/09 22:15:05  dadams
;; RCS Adapted file header for Emacs Lisp Archive.
;; RCS
;; RCS Revision 1.8  2001/01/05 21:53:10  dadams
;; RCS 1. minibuffer-frame-width: Use minibuffer-frame arg for frame-char-width.
;; RCS 2. Don't define width when initially set minibuffer-frame-alist. Instead,
;; RCS    use set-frame-width afterward, so minibuffer-frame-width uses correct
;; RCS    character size.
;; RCS
;; RCS Revision 1.7  2001/01/05 00:23:13  dadams
;; RCS 1. These vars no longer user options (interactively changeable):
;; RCS    completions-frame-background, completions-frame-mouse+cursor-color,
;; RCS    help-frame-background, help-frame-mouse+cursor-color,
;; RCS    minibuffer-frame-cursor-color, minibuffer-frame-font,
;; RCS    minibuffer-frame-foreground, minibuffer-frame-height,
;; RCS    minibuffer-frame-mouse-color, minibuffer-frame-top/bottom,
;; RCS    minibuffer-frame-width.
;; RCS 2. Added: minibuffer-frame-width (function),
;; RCS           minibuffer-frame-width-percent (var).
;; RCS 3. Changed var minibuffer-frame-width to nil default (now use *-percent).
;; RCS
;; RCS Revision 1.6  2001/01/03 17:45:01  dadams
;; RCS *** empty log message ***
;; RCS
;; RCS Revision 1.5  2001/01/03 01:08:08  dadams
;; RCS *** empty log message ***
;; RCS
;; RCS Revision 1.4  2000/11/28 20:32:16  dadams
;; RCS Optional require's via 3rd arg=t now.
;; RCS
;; RCS Revision 1.3  2000/11/01 16:09:23  dadams
;; RCS minibuffer-frame-font: adobe-courier* -> Lucida Console *.
;; RCS
;; RCS Revision 1.2  2000/09/27 22:19:07  dadams
;; RCS 1. Added: display-*Completions*-frame, display-*Help*-frame.
;; RCS 2. *Help* & *Completions* frames not created here. Instead, use
;; RCS    special-display-buffer-names & display-*-frame fns to define them.
;; RCS 3. Added: top-level, abort-recursive-edit.
;; RCS
;; RCS Revision 1.1  2000/09/14 17:23:49  dadams
;; RCS Initial revision
;; RCS
; Revision 1.5  1999/10/25  08:35:32  dadams
; Moved here from setup-keys.el: Rename minibuffer frame to show show/hide.
;
; Revision 1.4  1999/09/03  09:16:50  dadams
; Removed ;;;###autoload's on defconst's.
;
; Revision 1.3  1999/08/24  15:08:15  dadams
; 1. Require cl.el.
; 2. Windows: win32-grab-focus-on-raise = nil.
; 3. default-frame-font different if Windows.
; 4. Added: create-builtin-frames, menu-bar-lines,
;    upper-left-frame-corner-default, default-frame-size,
;    upper-left-special-display-frame-corner-default,
;    default-special-display-frame-size, default-special-frame-foreground,
;    default-special-frame-background, default-special-frame-font,
;    default-special-frame-mouse-color, default-special-frame-cursor-color.
; 5. Removed: special-display-regexps (do it in .emacs).
; 6. Use new vars to define default-frame-alist, special-display-frame-alist.
; 7. Only create built-in frames if create-builtin-frames.
; 8. Protected refs to x-* vars.
;
; Revision 1.2  1999/04/13  14:01:37  dadams
; *** empty log message ***
;; 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.

;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with this program; see the file COPYING.  If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 
;;; Code:

(require 'cl) ;; when, pushnew

(require 'frame-cmds nil t) ;; (no error if not found):
                            ;; remove-window, remove-windows-on, rename-frame
(require 'files+ nil t) ;; (no error if not found): switch-to-buffer-other-frame


(provide 'setup-frames)

;;;;;;;;;;;;;;;;;;;;;;;;


;; Windows: Don't give focus to a frame just because it's raised.
(defconst w32-grab-focus-on-raise nil)
(defconst win32-grab-focus-on-raise nil) ; older name


;; Default frames, except initial frame and minibuffer frame.
;;;###autoload
(defvar default-frame-foreground "Black"
  "*Default foreground color for non-special frames.")
(put 'default-frame-foreground 'variable-interactive
     "sDefault foreground color for non-special frames: ")

;;;###autoload
(defvar default-frame-background "LightBlue"
  "*Default background color for non-special frames.")
(put 'default-frame-background 'variable-interactive
     "sDefault background color for non-special frames: ")

;;;###autoload
(defvar default-frame-font
  (if (string-match "i386" system-configuration)
      "-*-Lucida Console-normal-r-*-*-15-*-*-*-c-*-*-ansi-"
    "-Misc-Fixed-Medium-R-Normal--15-140-75-75-C-90-ISO8859-1")
  "*Default font for non-special frames.")
(put 'default-frame-font 'variable-interactive
     "sDefault font for non-special frames: ")

;;;###autoload
(defvar default-frame-mouse-color "Red"
  "*Default mouse color for non-special frames.")
(put 'default-frame-mouse-color 'variable-interactive
     "sDefault mouse color for non-special frames: ")

;;;###autoload
(defvar default-frame-cursor-color "Red"
  "*Default text cursor color for non-special frames.")
(put 'default-frame-cursor-color 'variable-interactive
     "sDefault text cursor color for non-special frames: ")

;;;###autoload
(defvar create-builtin-frames t
  "*Non-nil means separate frames for minibuffer, *Help*, *Completions*.")

;;;###autoload
(defvar minibuffer-frame-font
  (if (string-match "i386" system-configuration)
      "-*-Lucida Console-normal-r-*-*-15-*-*-*-c-*-*-ansi-"
    "-Misc-Fixed-Medium-R-Normal--15-140-75-75-C-90-ISO8859-1")
  "Default font for the minibuffer frame.")

;;;###autoload
(defvar minibuffer-frame-mouse-color "Black"
  "Default mouse color for the minibuffer frame.")

;;;###autoload
(defvar minibuffer-frame-cursor-color "Black"
  "Default text cursor color for the minibuffer frame.")

;;;###autoload
(defvar minibuffer-frame-foreground "Red"
  "Default foreground color for the minibuffer frame.")

;;;###autoload
(defvar menu-bar-lines 1
  "*Number of lines used for the menu bar.")
(put 'menu-bar-lines 'variable-interactive
     "sNumber of lines used for the menu bar: ")

;;;###autoload
(defvar upper-left-frame-corner-default '(0 . 0)
  "*Position of upper left frame corner.
A cons whose car is the distance from the top in pixels
and whose cdr is the distance from the left in pixels.")
(put 'upper-left-frame-corner-default 'variable-interactive
     "sPosition of upper left frame corner: ")

;;;###autoload
(defvar default-frame-size '(80 . 35)
  "*Default frame size.
A cons whose car is the frame width in pixels
and whose cdr is the frame height in pixels.")
(put 'default-frame-size 'variable-interactive
     "sDefault frame size: ")

(defconst default-frame-alist
  (list*
   (and default-frame-foreground
        (cons 'foreground-color default-frame-foreground))
   (and default-frame-background
        (cons 'background-color default-frame-background))
   (and default-frame-font
        (cons 'font default-frame-font))
   (and default-frame-mouse-color
        (cons 'mouse-color default-frame-mouse-color))
   (and default-frame-cursor-color
        (cons 'cursor-color default-frame-cursor-color))
   (and menu-bar-lines
        (cons 'menu-bar-lines menu-bar-lines))
   (and upper-left-frame-corner-default
        (cons 'top (car upper-left-frame-corner-default)))
   (and upper-left-frame-corner-default
        (cons 'left (cdr upper-left-frame-corner-default)))
   (and default-frame-size
        (cons 'width (car default-frame-size)))
   (and default-frame-size
        (cons 'height (cdr default-frame-size)))
   (and create-builtin-frames (cons 'minibuffer 'none))
   '((icon-type . t) (user-position . t) (vertical-scroll-bars . right))))
       

;; For initial-frame-alist geometry:
;; Specify X resources to give the geometry you want.
;; Set `default-frame-alist' to override these options so that they
;; do not affect subsequent frames.
;; Set `initial-frame-alist' in a way that matches the X resources,
;; to override what you put in `default-frame-alist'.
(setq initial-frame-alist default-frame-alist)

;;;###autoload
(defvar upper-left-special-display-frame-corner-default '(0 . 0)
  "*Position of upper left corner of special display frames.
A cons whose car is the distance from the top in pixels
and whose cdr is the distance from the left in pixels.")
(put 'upper-left-frame-corner-default 'variable-interactive
     "sPosition of upper left corner of special display frame: ")

;;;###autoload
(defvar default-special-display-frame-size '(80 . 20)
  "*Default size of special display frames.
A cons whose car is the frame width in pixels
and whose cdr is the frame height in pixels.")
(put 'default-frame-size 'variable-interactive
     "sDefault special display frame size: ")

;;;###autoload
(defvar default-special-frame-foreground "Black"
  "*Default foreground color for special frames.")
(put 'default-special-frame-foreground 'variable-interactive
     "sDefault foreground color for special frames: ")

;;;###autoload
(defvar default-special-frame-background "LightSteelBlue"
  "*Default background color for special frames.")
(put 'default-special-frame-background 'variable-interactive
     "sDefault background color for special frames: ")

;;;###autoload
(defvar default-special-frame-font
  (if (string-match "i386" system-configuration)
      "-*-Lucida Console-normal-r-*-*-15-*-*-*-c-*-*-ansi-"
    "-Misc-Fixed-Medium-R-Normal--15-140-75-75-C-90-ISO8859-1")
  "*Default font for special frames.")
(put 'default-special-frame-font 'variable-interactive
     "sDefault font for special frames: ")

;;;###autoload
(defvar default-special-frame-mouse-color "Yellow"
  "*Default mouse color for special frames.")
(put 'default-special-frame-mouse-color 'variable-interactive
     "sDefault mouse color for special frames: ")

;;;###autoload
(defvar default-special-frame-cursor-color "Yellow"
  "*Default text cursor color for special frames.")
(put 'default-special-frame-cursor-color 'variable-interactive
     "sDefault text cursor color for special frames: ")

(defconst special-display-frame-alist
  (list*
   (and default-special-frame-font
        (cons 'font default-special-frame-font))
   (and default-special-display-frame-size
        (cons 'width (car default-special-display-frame-size)))
   (and default-special-display-frame-size
        (cons 'height (cdr default-special-display-frame-size)))
   (and default-special-frame-mouse-color
        (cons 'mouse-color default-special-frame-mouse-color))
   (and default-special-frame-cursor-color
        (cons 'cursor-color default-special-frame-cursor-color))
   (and default-special-frame-foreground
        (cons 'foreground-color default-special-frame-foreground))
   (and default-special-frame-background
        (cons 'background-color default-special-frame-background))
   (and upper-left-special-display-frame-corner-default
        (cons 'top (car upper-left-special-display-frame-corner-default)))
   (and upper-left-special-display-frame-corner-default
        (cons 'left (cdr upper-left-special-display-frame-corner-default)))
   '((unsplittable . t) (user-position . t) (vertical-scroll-bars . right))))

(when create-builtin-frames
  (setq pop-up-frames t);; `display-buffer' (& `*-other-window' fns)
  (setq pop-up-frame-alist default-frame-alist);; will use separate frames.

  ;; *Help* frame:  Background, height, cursor and pointer colors.
  (defvar help-frame-background "Thistle"
    "Default background color for the *Help* buffer's frame.
Note: This is not used if `create-built-in-frames' is nil.")
  
  (defvar help-frame-mouse+cursor-color "Blue Violet"
    "Default color for cursor & pointer of *Help* frame.
Note: This is not used if `create-built-in-frames' is nil.")

  ;; *Completions* frame:  Minibuffer intercepts its (completion) input.
  (defvar completions-frame-background "LavenderBlush2"
    "Default background color for the *Completions* buffer's frame.
Note: This is not used if `create-built-in-frames' is nil.")

  (defvar completions-frame-mouse+cursor-color "VioletRed"
    "Default color for cursor & pointer of *Completions* frame.
Note: This is not used if `create-built-in-frames' is nil.")

  ;; Display of *Help* & *Completions* buffers in custom frames.
  (pushnew
   (list "*Help*" 'display-*Help*-frame
         (list (cons 'background-color help-frame-background)
               (cons 'mouse-color help-frame-mouse+cursor-color)
               (cons 'cursor-color help-frame-mouse+cursor-color)
               '(height . 40)))
   special-display-buffer-names :test 'equal)
  (pushnew
   (list "*Completions*" 'display-*Completions*-frame
         (list (cons 'background-color completions-frame-background)
               (cons 'mouse-color completions-frame-mouse+cursor-color)
               (cons 'cursor-color completions-frame-mouse+cursor-color)))
   special-display-buffer-names :test 'equal)
  
  (defun display-*Completions*-frame (buf &optional args)
    "Display *Completions* buffer in its own frame.
`special-display-function' is used to do the actual displaying.
Completion input events are redirected to `minibuffer-frame'."
    (let ((old-ptr-shape x-pointer-shape)
          return-window)
      (when (boundp 'x-pointer-box-spiral)
        (setq x-pointer-shape x-pointer-box-spiral))
      (setq return-window
            (select-window (funcall special-display-function buf args)))
      (raise-frame)
      (redirect-frame-focus (selected-frame) minibuffer-frame)
      (setq x-pointer-shape old-ptr-shape)
      return-window))

  (defun display-*Help*-frame (buf &optional args)
    "Display *Help* buffer in its own frame.
`special-display-function' is used to do the actual displaying."
    (let ((old-ptr-shape x-pointer-shape)
          return-window)
      (when (boundp 'x-pointer-xterm)
        (setq x-pointer-shape x-pointer-xterm))
      (setq return-window
            (select-window (funcall special-display-function buf args)))
      (raise-frame)
      (setq x-pointer-shape old-ptr-shape)
      return-window))

  ;; Minibuffer frame.
  (defvar minibuffer-frame-top/bottom
    (cond ((string-match "i386" system-configuration) '(- 20))
          ((string-match "sgi" system-configuration) '(- 20))
          ((string-match "sun" system-configuration) '(- 45))
          (t '(- 20)))
    "Position of top (or bottom) of minibuffer frame, in pixels.
May be of form `POS', `(+ POS)' or `(- POS)', where POS is a positive
integer.  Forms POS and `(+ POS)' specify the position of
frame top with respect to screen top.  Forms -POS and `(- POS)'
specify the position of frame bottom with respect to screen bottom.
In any case, POS itself counts toward the top.

See `default-frame-alist' for an explanation of frame parameters.
Note: This is not used if `create-built-in-frames' is nil.")

  (defvar minibuffer-frame-width nil
    "Width, in characters, for minibuffer frame.
If nil, then the function `minibuffer-frame-width' is used instead.

Note: This is not used if `create-built-in-frames' is nil.")

  (defvar minibuffer-frame-width-percent 100
    "Max percent of the total display width to give to minibuffer frame.
See function `minibuffer-frame-width'.

Note: This is not used if `create-built-in-frames' is nil.")

  (defun minibuffer-frame-width ()
    "Width of minibuffer frame, in characters.
when `minibuffer-frame-width' is nil.

The value is relative to your display size and the minibuffer-frame's
character size, and depends on `minibuffer-frame-width-percent':

  (/ (* minibuffer-frame-width-percent (x-display-pixel-width))
     (* 100 (frame-char-width minibuffer-frame)))

Note: This is not used if `create-built-in-frames' is nil."
    (/ (* minibuffer-frame-width-percent (x-display-pixel-width))
       (* 100 (frame-char-width (and (boundp 'minibuffer-frame)
                                     minibuffer-frame)))))
  
  (defvar minibuffer-frame-height 1
    "Height of minibuffer frame, in characters.
Note: This is not used if `create-built-in-frames' is nil.")

  (defvar active-minibuffer-frame-background "light gray"
    "*The color of the `minibuffer-frame' when it is active.
See `color-active-minibuffer-frame'.
Note: This is not used if `create-built-in-frames' is nil.")
  (put 'active-minibuffer-frame-background 'variable-interactive
       "sColor of `minibuffer-frame' when it is active: ")

  (defvar inactive-minibuffer-frame-background "PaleGoldenrod"
    "*The color of the `minibuffer-frame' when it is inactive.
See `color-inactive-minibuffer-frame'.
Note: This is not used if `create-built-in-frames' is nil.")
  (put 'inactive-minibuffer-frame-background 'variable-interactive
       "sColor of `minibuffer-frame' when it is inactive: ")

  (defun color-active-minibuffer-frame ()
    (and (boundp 'minibuffer-frame)
         (save-window-excursion
           (select-frame minibuffer-frame)
           (set-background-color active-minibuffer-frame-background))))

  (defun color-inactive-minibuffer-frame ()
    (and (boundp 'minibuffer-frame)
         (save-window-excursion
           (select-frame minibuffer-frame)
           (set-background-color inactive-minibuffer-frame-background))))

  (defmacro flash-ding-minibuffer-frame (&optional do-not-terminate)
    "Ring bell (`ding'), after flashing minibuffer frame, if relevant.
Terminates any keyboard macro executing, unless arg DO-NOT-TERMINATE non-nil."
    (` (flash-ding (, do-not-terminate) (and (boundp 'minibuffer-frame)
                                             minibuffer-frame))))



  (or (fboundp 'old-y-or-n-p)
      (fset 'old-y-or-n-p (symbol-function 'y-or-n-p)))

  ;; REPLACES ORIGINAL (built-in function):
  ;; Temporarily colors minibuffer frame to "active" color.
  (defun y-or-n-p (prompt)
    "Ask user a \"y or n\" question.  Return t if answer is \"y\".
Takes one argument, which is the string to display to ask the question.
It should end in a space; `y-or-n-p' adds `(y or n) ' to it.
No confirmation of answer is requested; a single character is enough.
Also accepts SPC to mean yes, or DEL to mean no."
    (color-active-minibuffer-frame)
    (prog1 (old-y-or-n-p prompt) (color-inactive-minibuffer-frame)))

  (defvar isearch-minibuffer-frame-background "bisque"
    "*Color of the `minibuffer-frame' when `isearch' is active.
See `color-isearch-minibuffer-frame'.")
  (put 'isearch-minibuffer-frame-background 'variable-interactive
       "sColor of `minibuffer-frame' when `isearch' is active: ")

  (defun color-isearch-minibuffer-frame ()
    (and (boundp 'minibuffer-frame)
         (save-window-excursion
           (select-frame minibuffer-frame)
           (set-background-color
            ;; Can also try `x-defined-colors', defined in `x-win.el'.
            ;; It contains all colors currently supported by X windows.
            (if (x-color-defined-p isearch-minibuffer-frame-background)
                isearch-minibuffer-frame-background
              "white")))))

  
  (or (fboundp 'old-top-level)
      (fset 'old-top-level (symbol-function 'top-level)))

  ;; REPLACES ORIGINAL (built-in function):
  ;; Resets color of minibuffer frame to "inactive" color.
  (defun top-level ()
    "Exit all recursive editing levels."
    (interactive)
    (color-inactive-minibuffer-frame)
    (old-top-level))


  (or (fboundp 'old-abort-recursive-edit)
      (fset 'old-abort-recursive-edit (symbol-function 'abort-recursive-edit)))

  ;; REPLACES ORIGINAL (built-in function):
  ;; Resets color of minibuffer frame to "inactive" color.
  (defun abort-recursive-edit ()
    "Abort command that requested this recursive edit or minibuffer input."
    (interactive)
    (old-abort-recursive-edit)
    (color-inactive-minibuffer-frame))

  (add-hook 'isearch-mode-hook 'color-isearch-minibuffer-frame)
  (add-hook 'isearch-mode-end-hook 'color-inactive-minibuffer-frame)
  (setq minibuffer-auto-raise t)        ; For use with minibuffer-only frame.
  (add-hook 'minibuffer-setup-hook 'color-active-minibuffer-frame)
  (add-hook 'minibuffer-exit-hook 'color-inactive-minibuffer-frame)
  (setq minibuffer-frame-alist
        (list*
         (and minibuffer-frame-foreground
              (cons 'foreground-color minibuffer-frame-foreground))
         (and inactive-minibuffer-frame-background
              (cons 'background-color inactive-minibuffer-frame-background))
         (and minibuffer-frame-font
              (cons 'font minibuffer-frame-font))
         (and minibuffer-frame-mouse-color
              (cons 'mouse-color minibuffer-frame-mouse-color))
         (and minibuffer-frame-cursor-color
              (cons 'cursor-color minibuffer-frame-cursor-color))
         (and minibuffer-frame-font
              (cons 'font minibuffer-frame-font))
         (and menu-bar-lines
              (cons 'menu-bar-lines menu-bar-lines))
         (and minibuffer-frame-top/bottom (cons 'top 
minibuffer-frame-top/bottom))
         (and minibuffer-frame-height (cons 'height minibuffer-frame-height))
         '((minibuffer . only) (icon-type . t) (user-position . t)
           (vertical-scroll-bars)       ;  No scroll bar.
           (name . "Emacs Minibuffer"))))
  (defvar minibuffer-frame (make-frame minibuffer-frame-alist))
  (set-frame-width minibuffer-frame
                   (or minibuffer-frame-width (minibuffer-frame-width)))
  (when (fboundp 'rename-frame)         ; Defined in `frame-cmds.el'.
    (rename-frame minibuffer-frame
                  "Emacs minibuffer                         \
show/hide: hold CTRL + click in window"))
  )

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; `setup-frames.el' ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]