emacs-diffs
[Top][All Lists]
Advanced

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

master a0af789d06 2/2: Remove some XEmacs compat code for display-graphi


From: Stefan Kangas
Subject: master a0af789d06 2/2: Remove some XEmacs compat code for display-graphic-p
Date: Sat, 14 May 2022 19:10:36 -0400 (EDT)

branch: master
commit a0af789d06077f3188635cf37b741edcebee56ec
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    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.
---
 lisp/dframe.el               |  4 +---
 lisp/emacs-lisp/chart.el     |  6 ++----
 lisp/progmodes/cperl-mode.el |  4 +---
 lisp/speedbar.el             | 13 ++++---------
 4 files changed, 8 insertions(+), 19 deletions(-)

diff --git a/lisp/dframe.el b/lisp/dframe.el
index 6593708a13..9580a3187f 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 4186a541f8..29fbcce773 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 <zappo@gnu.org>
 ;; 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 1bf77381e8..b79dc65693 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 5fe7e7ea34..3ceccfb20c 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



reply via email to

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