(declare (obsolete window-system "27.1"))
window-system)
-(defun ediff-window-display-p ()
- (and window-system
- (not (memq window-system '(tty pc stream)))))
-
;; test if supports faces
(defun ediff-has-face-support-p ()
- (cond ((ediff-window-display-p))
+ (cond ((display-graphic-p))
(ediff-force-faces)
((display-color-p))
(t (memq window-system '(pc)))))
(defsubst ediff-multiframe-setup-p ()
- (and (ediff-window-display-p) ediff-multiframe))
+ (and (display-graphic-p) ediff-multiframe))
(defmacro ediff-narrow-control-frame-p ()
'(and (ediff-multiframe-setup-p)
(defun ediff-set-face-pixmap (face pixmap)
"Set stipple pixmap of FACE to PIXMAP on a monochrome display."
- (if (and (ediff-window-display-p) (not (display-color-p)))
+ (if (and (display-graphic-p) (not (display-color-p)))
(condition-case nil
(set-face-background-pixmap face pixmap)
(error
(defsubst ediff-frame-iconified-p (frame)
- (and (ediff-window-display-p)
+ (and (display-graphic-p)
(frame-live-p frame)
(eq (frame-visible-p frame) 'icon)))
(defsubst ediff-window-visible-p (wind)
;; under TTY, window-live-p also means window is visible
(and (window-live-p wind)
- (or (not (ediff-window-display-p))
+ (or (not (display-graphic-p))
(frame-visible-p (window-frame wind)))))
(defun ediff-reset-mouse (&optional frame do-not-grab-mouse)
(or frame (setq frame (selected-frame)))
- (if (ediff-window-display-p)
+ (if (display-graphic-p)
(let ((frame-or-wind frame))
(or do-not-grab-mouse
;; don't set mouse if the user said to never do this
(define-obsolete-function-alias 'ediff-convert-standard-filename #'convert-standard-filename "28.1")
(define-obsolete-function-alias 'ediff-hide-face #'ignore "28.1")
(define-obsolete-function-alias 'ediff-file-remote-p #'file-remote-p "29.1")
+(define-obsolete-function-alias 'ediff-window-display-p #'display-graphic-p "29.1")
(provide 'ediff-init)
;;; ediff-init.el ends here
((and
(setq wind
(ediff-get-visible-buffer-window ediff-registry-buffer))
- (ediff-window-display-p))
+ (display-graphic-p))
(select-window wind)
(other-window 1)
(set-window-buffer (selected-window) meta-buf))
(t (ediff-skip-unsuitable-frames 'ok-unsplittable)
(set-window-buffer (selected-window) meta-buf)))
))
- (if (and (ediff-window-display-p)
+ (if (and (display-graphic-p)
(window-live-p
(setq wind (ediff-get-visible-buffer-window meta-buf))))
(progn
(select-window ediff-window-B))
((and (setq wind
(ediff-get-visible-buffer-window ediff-meta-buffer))
- (ediff-window-display-p))
+ (display-graphic-p))
(select-window wind)
(other-window 1)
(set-window-buffer (selected-window) ediff-registry-buffer))
(t (ediff-skip-unsuitable-frames 'ok-unsplittable)
(set-window-buffer (selected-window) ediff-registry-buffer)))
))
- (if (ediff-window-display-p)
+ (if (display-graphic-p)
(progn
(setq frame
(window-frame
;; set visibility range appropriate to this invocation of Ediff.
(ediff-visible-region)
;; raise
- (if (and (ediff-window-display-p)
+ (if (and (display-graphic-p)
(symbolp this-command)
(symbolp last-command)
;; Either one of the display-changing commands
(raise-frame (window-frame ediff-window-B)))
(if (window-live-p ediff-window-C)
(raise-frame (window-frame ediff-window-C)))))
- (if (and (ediff-window-display-p)
+ (if (and (display-graphic-p)
(frame-live-p ediff-control-frame)
(not ediff-use-long-help-message)
(not (ediff-frame-iconified-p ediff-control-frame)))
This is especially useful when comparing buffers side-by-side."
(interactive)
(ediff-barf-if-not-control-buffer)
- (or (ediff-window-display-p)
+ (or (display-graphic-p)
(user-error "Emacs is not running as a window application"))
(ediff-recenter 'no-rehighlight) ; make sure buffs are displayed in windows
(let ((ctl-buf ediff-control-buffer))
which see."
(interactive)
(let (window-setup-func)
- (or (ediff-window-display-p)
+ (or (display-graphic-p)
(user-error "Emacs is not running as a window application"))
(cond ((eq ediff-window-setup-function #'ediff-setup-windows-multiframe)
;; FIXME: Make it work in Emacs!
(if (featurep 'ediff-tbar)
(progn
- (or (ediff-window-display-p)
+ (or (display-graphic-p)
(user-error "Emacs is not running as a window application"))
;; do this only after killing the toolbar
(setq ediff-use-toolbar-p (not ediff-use-toolbar-p))
(after-quit-hook-internal (remq t ediff-after-quit-hook-internal))
(session-number ediff-meta-session-number)
;; suitable working frame
- (warp-frame (if (and (ediff-window-display-p) (eq ediff-grab-mouse t))
+ (warp-frame (if (and (display-graphic-p) (eq ediff-grab-mouse t))
(cond ((window-live-p ediff-window-A)
(window-frame ediff-window-A))
((window-live-p ediff-window-B)
(setq warp-frame ; if mouse is over a reasonable frame, use it
(cond ((ediff-good-frame-under-mouse))
(t warp-frame)))
- (if (and (ediff-window-display-p) (frame-live-p warp-frame) ediff-grab-mouse)
+ (if (and (display-graphic-p) (frame-live-p warp-frame) ediff-grab-mouse)
(set-mouse-position warp-frame 2 1))
(mapc #'funcall after-quit-hook-internal)
(ediff-kill-buffer-carefully ediff-patch-diagnostics))
;; delete control frame or window
- (cond ((and (ediff-window-display-p) (frame-live-p ctl-frame))
+ (cond ((and (display-graphic-p) (frame-live-p ctl-frame))
(delete-frame ctl-frame))
((window-live-p ctl-wind)
(delete-window ctl-wind)))
(buf-fine-diff ediff-fine-diff-buffer))
;; hide the control panel
- (if (and (ediff-window-display-p) (frame-live-p ediff-control-frame))
+ (if (and (display-graphic-p) (frame-live-p ediff-control-frame))
(iconify-frame ediff-control-frame)
(bury-buffer))
(if buf-err (bury-buffer buf-err))
;; Determine which window setup function to use based on current window system.
(defun ediff-choose-window-setup-function-automatically ()
(declare (obsolete ediff-setup-windows-default "24.3"))
- (if (ediff-window-display-p)
+ (if (display-graphic-p)
#'ediff-setup-windows-multiframe
#'ediff-setup-windows-plain))
(other-window 1))
;; in case user did a no-no on a tty
- (or (ediff-window-display-p)
+ (or (display-graphic-p)
(setq ediff-window-setup-function #'ediff-setup-windows-plain))
(or (ediff-keep-window-config control-buffer)
(defun ediff-skip-unsuitable-frames (&optional ok-unsplittable)
"Skip unsplittable frames and frames that have dedicated windows.
Create a new splittable frame if none is found."
- (if (ediff-window-display-p)
+ (if (display-graphic-p)
(let ((wind-frame (window-frame))
seen-windows)
(while (and (not (memq (selected-window) seen-windows))
;; synchronize so the cursor will move to control frame
;; per RMS suggestion
- (if (ediff-window-display-p)
+ (if (display-graphic-p)
(let ((count 7))
(sit-for .1)
(while (and (not (frame-visible-p ctl-frame)) (> count 0))
(defun ediff-destroy-control-frame (ctl-buffer)
(ediff-with-current-buffer ctl-buffer
- (if (and (ediff-window-display-p) (frame-live-p ediff-control-frame))
+ (if (and (display-graphic-p) (frame-live-p ediff-control-frame))
(let ((ctl-frame ediff-control-frame))
(setq ediff-control-frame nil)
(delete-frame ctl-frame))))
;; Force mode-line redisplay
(force-mode-line-update)
- (if (and (ediff-window-display-p) (frame-live-p ediff-control-frame))
+ (if (and (display-graphic-p) (frame-live-p ediff-control-frame))
(ediff-refresh-control-frame))
(ediff-with-current-buffer ediff-buffer-A