From: Stefan Kangas Date: Sat, 14 May 2022 20:36:36 +0000 (+0200) Subject: Remove some XEmacs compat code for display-graphic-p X-Git-Tag: emacs-29.0.90~1910^2~687 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a0af789d06077f3188635cf37b741edcebee56ec;p=emacs.git Remove some XEmacs compat code for display-graphic-p * lisp/dframe.el (dframe-have-timer-flag): * lisp/emacs-lisp/chart.el (chart-face-pixmap-list): * lisp/speedbar.el (speedbar-easymenu-definition-base): Remove XEmacs compat code; assume display-graphic-p is fboundp. * lisp/progmodes/cperl-mode.el (cperl-tags-hier-init): Remove XEmacs compat code. --- diff --git a/lisp/dframe.el b/lisp/dframe.el index 6593708a13c..9580a3187fd 100644 --- a/lisp/dframe.el +++ b/lisp/dframe.el @@ -120,9 +120,7 @@ :prefix "dframe-" :group 'dframe) -(defvar dframe-have-timer-flag (if (fboundp 'display-graphic-p) - (display-graphic-p) - window-system) +(defvar dframe-have-timer-flag (display-graphic-p) "Non-nil means that timers are available for this Emacs. This is nil for terminals, since updating a frame in a terminal is not useful to the user.") diff --git a/lisp/emacs-lisp/chart.el b/lisp/emacs-lisp/chart.el index 4186a541f82..29fbcce7734 100644 --- a/lisp/emacs-lisp/chart.el +++ b/lisp/emacs-lisp/chart.el @@ -1,7 +1,6 @@ ;;; chart.el --- Draw charts (bar charts, etc) -*- lexical-binding: t -*- -;; Copyright (C) 1996, 1998-1999, 2001, 2004-2005, 2007-2022 Free -;; Software Foundation, Inc. +;; Copyright (C) 1996-2022 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam ;; Old-Version: 0.2 @@ -76,8 +75,7 @@ Colors will be the background color.") (defvar chart-face-pixmap-list - (if (and (fboundp 'display-graphic-p) - (display-graphic-p)) + (if (display-graphic-p) '("dimple1" "scales" "dot" "cross_weave" "boxes" "dimple3")) "If pixmaps are allowed, display these background pixmaps. Useful if new Emacs is used on B&W display.") diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 1bf77381e8b..b79dc656934 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -7080,9 +7080,7 @@ One may build such TAGS files from CPerl mode menu." (error "No items found")) (setq update ;; (imenu-choose-buffer-index "Packages: " (nth 2 cperl-hierarchy)) - (if (if (fboundp 'display-popup-menus-p) - (display-popup-menus-p) - window-system) + (if (display-popup-menus-p) (x-popup-menu t (nth 2 cperl-hierarchy)) (require 'tmm) (tmm-prompt (nth 2 cperl-hierarchy)))) diff --git a/lisp/speedbar.el b/lisp/speedbar.el index 5fe7e7ea349..3ceccfb20cd 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -800,15 +800,10 @@ This basically creates a sparse keymap, and makes its parent be ["Auto Update" speedbar-toggle-updates :active (not speedbar-update-flag-disable) :style toggle :selected speedbar-update-flag]) - (if (and (or (fboundp 'defimage) - (fboundp 'make-image-specifier)) - (if (fboundp 'display-graphic-p) - (display-graphic-p) - window-system)) - (list - ["Use Images" speedbar-toggle-images - :style toggle :selected speedbar-use-images])) - ) + (when (and (fboundp 'defimage) (display-graphic-p)) + (list + ["Use Images" speedbar-toggle-images + :style toggle :selected speedbar-use-images]))) "Base part of the speedbar menu.") (defvar speedbar-easymenu-definition-special