emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/idlwave 733a5729ac 305/360: Remove vestigial XEmacs and


From: ELPA Syncer
Subject: [elpa] externals/idlwave 733a5729ac 305/360: Remove vestigial XEmacs and other unnecessary code
Date: Sun, 28 Apr 2024 00:59:36 -0400 (EDT)

branch: externals/idlwave
commit 733a5729acd4e2adc4c468b7ac4996bc67cd6860
Author: JD Smith <jdtsmith@gmail.com>
Commit: JD Smith <jdtsmith@gmail.com>

    Remove vestigial XEmacs and other unnecessary code
---
 idlw-complete-structtag.el |  6 +-----
 idlw-help.el               |  5 -----
 idlw-shell.el              | 21 +++++++++------------
 idlwave.el                 | 14 --------------
 4 files changed, 10 insertions(+), 36 deletions(-)

diff --git a/idlw-complete-structtag.el b/idlw-complete-structtag.el
index e4b40fc08a..abfa4d03d2 100644
--- a/idlw-complete-structtag.el
+++ b/idlw-complete-structtag.el
@@ -111,7 +111,6 @@
 (add-hook 'idlwave-update-rinfo-hook 'idlwave-structtag-reset)
 
 ;;; The main code follows below
-(defvar idlwave-completion-help-info)
 (defun idlwave-complete-structure-tag ()
   "Complete a structure tag.
 This works by looking in the current file for a structure assignment to a
@@ -225,9 +224,6 @@ an up-to-date completion list."
 
 
 ;; Fake help in the source buffer for structure tags.
-;; kwd and name are global-variables here.
-(defvar name)
-(defvar kwd)
 (defvar idlwave-help-do-struct-tag)
 (defun idlwave-complete-structure-tag-help (mode word)
   (cond
@@ -237,7 +233,7 @@ an up-to-date completion list."
        (not (equal idlwave-current-tags-buffer
                    (get-buffer (idlwave-shell-buffer))))))
    ((eq mode 'set)
-    (setq kwd word
+    (setq kwd word ;; dynamic var
          idlwave-help-do-struct-tag idlwave-structtag-struct-location))
    (t (error "This should not happen"))))
 
diff --git a/idlw-help.el b/idlw-help.el
index 61a2f5aa76..3fceccf205 100644
--- a/idlw-help.el
+++ b/idlw-help.el
@@ -52,11 +52,6 @@
   "Face for highlighting links into IDLWAVE online help."
   :group 'idlwave-online-help)
 
-(defvar idlwave-help-activate-links-aggressively nil
-  "Obsolete variable.")
-
-(defvar idlwave-completion-help-info)
-
 (defvar idlwave-help-frame nil
   "The frame for display of IDL online help.")
 (defvar idlwave-help-frame-width 102
diff --git a/idlw-shell.el b/idlw-shell.el
index 430108d713..0fa3e24d98 100644
--- a/idlw-shell.el
+++ b/idlw-shell.el
@@ -700,15 +700,16 @@ the directory stack.")
   ;; So who can display faces?
   (when (or (featurep 'xemacs)            ; XEmacs can do also ttys
            (fboundp 'tty-defined-colors) ; Emacs 21 as well
-           window-system)                ; Window systems always
+           (display-graphic-p))                ; Window systems always
     (progn
       (setq idlwave-shell-stop-line-overlay (make-overlay 1 1))
       (overlay-put idlwave-shell-stop-line-overlay
                   'face idlwave-shell-stop-line-face))))
 
  (t
-  ;; IDLWAVE may decide.  Will use a face on window systems, arrow elsewhere
-  (if window-system
+  ;; IDLWAVE may decide.  Will use a face plus arrow on window systems, 
+  ;; just arrow elsewhere
+  (if (display-graphic-p)
       (progn
        (setq idlwave-shell-stop-line-overlay (make-overlay 1 1))
        (overlay-put idlwave-shell-stop-line-overlay
@@ -3841,10 +3842,8 @@ Existing overlays are recycled, in order to minimize 
consumption."
          (when use-glyph
            (if old-buffers
                (setq old-buffers (delq (current-buffer) old-buffers)))
-           (if (fboundp 'set-specifier) ;; XEmacs
-               (set-specifier left-margin-width (cons (current-buffer) 2))
-             (if (< left-margin-width 2)
-                 (setq left-margin-width 2)))
+           (if (< left-margin-width 2)
+               (setq left-margin-width 2))
            (let ((window (get-buffer-window (current-buffer) 0)))
              (if window
                  (set-window-margins
@@ -3852,9 +3851,7 @@ Existing overlays are recycled, in order to minimize 
consumption."
       (if use-glyph
          (while (setq buf (pop old-buffers))
            (with-current-buffer buf
-             (if (fboundp 'set-specifier) ;; XEmacs
-                 (set-specifier left-margin-width (cons (current-buffer) 0))
-               (setq left-margin-width 0))
+             (setq left-margin-width 0)
              (let ((window (get-buffer-window buf 0)))
                (if window
                    (set-window-margins
@@ -3904,7 +3901,7 @@ only for glyphs)."
        (overlay-put ov 'mouse-face 'highlight)
        (overlay-put ov 'keymap idlwave-shell-debug-line-map))
       (cond
-       (window-system
+       ((display-graphic-p)
        (if use-glyph
            (let ((image-props (cdr (assq type idlwave-shell-bp-glyph)))
                  string)
@@ -4389,7 +4386,7 @@ Otherwise, just expand the file name."
        (define-key idlwave-shell-mode-prefix-map k1 cmd))
       (define-key idlwave-mode-prefix-map k1 cmd))
     ;; The debug modifier map
-    (when (and mod window-system)
+    (when (and mod (display-graphic-p))
       (if (char-or-string-p c2)
          (setq k2 (vector (append mod-noshift
                                   (list (if shift (upcase c2) c2)))))
diff --git a/idlwave.el b/idlwave.el
index f64de53ce2..f31f7b29ff 100644
--- a/idlwave.el
+++ b/idlwave.el
@@ -157,20 +157,6 @@
 (require 'idlw-menus)
 (require 'idlw-scan)
 
-;; For XEmacs
-(unless (fboundp 'line-beginning-position)
-  (defalias 'line-beginning-position 'point-at-bol))
-(unless (fboundp 'line-end-position)
-  (defalias 'line-end-position 'point-at-eol))
-(unless (fboundp 'char-valid-p)
-  (defalias 'char-valid-p 'characterp))
-(unless (fboundp 'match-string-no-properties)
-  (defalias 'match-string-no-properties 'match-string))
-
-(if (not (fboundp 'cancel-timer))
-    (condition-case nil
-       (require 'timer)
-      (error nil)))
 
 (declare-function idlwave-shell-get-path-info "idlw-shell")
 (declare-function idlwave-shell-temp-file "idlw-shell")



reply via email to

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