(intern (format "%s-alist" base)))
(defmacro gui-method (name &optional type)
- (macroexp-let2 nil type (or type `(framep (selected-frame)))
+ (macroexp-let2 nil type (or type `window-system)
`(alist-get ,type ,(gui-method--name name)
(lambda (&rest _args)
(error "No method %S for %S frame" ',name ,type)))))
(defmacro gui-method-declare (name &optional tty-fun doc)
(declare (doc-string 3) (indent 2))
`(defvar ,(gui-method--name name)
- ,(if tty-fun `(list (cons t ,tty-fun))) ,doc))
+ ,(if tty-fun `(list (cons nil ,tty-fun))) ,doc))
(defmacro gui-call (name &rest args)
`(funcall (gui-method ,name) ,@args))
frame-initial-frame-tool-bar-height)))
(t (+ top frame-initial-frame-tool-bar-height)))))
(modify-frame-parameters
- frame-initial-frame '((top . adjusted-top))))))
+ frame-initial-frame `((top . ,adjusted-top))))))
(tool-bar-mode -1))))
;; The initial frame we create above always has a minibuffer.
the new frame according to its own rules."
(interactive)
(let* ((display (cdr (assq 'display parameters)))
- (w (or
- (cond
- ((assq 'terminal parameters)
- (let ((type (terminal-live-p
- (cdr (assq 'terminal parameters)))))
- (cond
- ((null type) (error "Terminal %s does not exist"
- (cdr (assq 'terminal parameters))))
- (t type))))
- ((assq 'window-system parameters)
- (cdr (assq 'window-system parameters)))
- (display
- (or (window-system-for-display display)
- (error "Don't know how to interpret display %S"
- display)))
- (t window-system))
- t))
+ (w (cond
+ ((assq 'terminal parameters)
+ (let ((type (terminal-live-p
+ (cdr (assq 'terminal parameters)))))
+ (cond
+ ((eq t type) nil)
+ ((null type) (error "Terminal %s does not exist"
+ (cdr (assq 'terminal parameters))))
+ (t type))))
+ ((assq 'window-system parameters)
+ (cdr (assq 'window-system parameters)))
+ (display
+ (or (window-system-for-display display)
+ (error "Don't know how to interpret display %S"
+ display)))
+ (t window-system)))
(oldframe (selected-frame))
(params parameters)
frame)