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

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

[elpa] scratch/hyperbole-lexbind 9ad2bf0 08/20: Remove all featurep chec


From: Stefan Monnier
Subject: [elpa] scratch/hyperbole-lexbind 9ad2bf0 08/20: Remove all featurep checks on xemacs and emacs
Date: Wed, 14 Aug 2019 04:30:22 -0400 (EDT)

branch: scratch/hyperbole-lexbind
commit 9ad2bf06f5d91150da76f1be244fe5d20be87f90
Merge: cc77f02 131295e
Author: Mats Lidell <address@hidden>
Commit: Mats Lidell <address@hidden>

    Remove all featurep checks on xemacs and emacs
---
 Changes           |   5 -
 MANIFEST          |   1 -
 hargs.el          |  18 +--
 hinit.el          |  21 +--
 hmouse-drv.el     |  16 +-
 hmouse-info.el    |  10 +-
 hmouse-key.el     |   2 +-
 hmouse-sh.el      | 345 +++++++++++++++++-----------------------
 hmouse-tag.el     |   6 +-
 hsettings.el      |  25 +--
 hui-em-but.el     |   4 +-
 hui-menu.el       |  13 +-
 hui-mini.el       |  32 +---
 hui-select.el     |  16 +-
 hui-window.el     |  55 ++-----
 hui-xe-but.el     | 466 ------------------------------------------------------
 hversion.el       |   4 +-
 hypb.el           |  25 +--
 hyrolo-menu.el    |  12 +-
 hyrolo.el         |  22 +--
 hywconfig.el      |   6 -
 kotl/kmenu.el     |  10 +-
 kotl/kotl-mode.el |  21 +--
 kotl/kproperty.el |   6 +-
 kotl/kview.el     |  58 +++----
 kotl/kvspec.el    |  16 +-
 26 files changed, 248 insertions(+), 967 deletions(-)

diff --git a/Changes b/Changes
index 7d4d658..2989b2b 100644
--- a/Changes
+++ b/Changes
@@ -2072,11 +2072,6 @@ V6.0.2 changes ^^^^:
   hibtypes.el (mail-address-at-p): Let case-fold-search be t since 
mail-addresses
     are case-insensitive.
 
-* Various Files: Small copyright fixes and formatting adjustments.
-    Replaced hyperb:xemacs-p with (featurep 'xemacs) for byte-compiler
-    optimization purposes and made small fixes throughout suggested by Stefan
-    Monnier.
-
 * hibtypes.el (mail-address-regexp): Simplified and modernized address matching
     to better distinguish from @username social media references.
               (mail-address-mode-list): Added lisp-interaction-mode and 
fundamental-mode.
diff --git a/MANIFEST b/MANIFEST
index 6e5cd62..9a4f19c 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -42,7 +42,6 @@ hui-mouse.el        - Use key or mouse key for many 
functions, e.g. GNU Hyperbol
 hui-select.el       - Select delimited or larger and larger syntax-driven 
regions in a buffer
 hui-treemacs.el     - Hyperbole Smart Key support for the Treemacs file 
manager package
 hui-window.el       - Smart Mouse Key window and modeline depress/release 
actions
-hui-xe-but.el       - XEmacs button highlighting and flashing support
 hui.el              - GNU Hyperbole button and hyperlink user interface
 
 --- APPLICATION PROGRAMMING INTERFACE ---
diff --git a/hargs.el b/hargs.el
index 57b78a6..696cdab 100644
--- a/hargs.el
+++ b/hargs.el
@@ -228,17 +228,13 @@ Optional DEFAULT-PROMPT is used to describe default 
value."
 
 (defun hargs:select-event-window ()
   "Select window, if any, that mouse was over during last event."
-  (if (featurep 'xemacs)
-      (if current-mouse-event
-         (select-window
-          (or (event-window current-mouse-event) (selected-window))))
-    (let ((window (posn-window (event-start last-command-event))))
-      (if (framep window)
-         (setq window (frame-selected-window window)))
-      (if (and (window-minibuffer-p window)
-              (not (minibuffer-window-active-p window)))
-         (error "Attempt to select inactive minibuffer window")
-       (select-window (or window (selected-window)))))))
+  (let ((window (posn-window (event-start last-command-event))))
+    (if (framep window)
+       (setq window (frame-selected-window window)))
+    (if (and (window-minibuffer-p window)
+            (not (minibuffer-window-active-p window)))
+       (error "Attempt to select inactive minibuffer window")
+      (select-window (or window (selected-window))))))
 
 (defun hargs:set-string-to-complete ()
   "Store the current minibuffer contents into `hargs:string-to-complete'."
diff --git a/hinit.el b/hinit.el
index 6f54d65..c9df41b 100644
--- a/hinit.el
+++ b/hinit.el
@@ -4,7 +4,7 @@
 ;;
 ;; Orig-Date:     1-Oct-91 at 02:32:51
 ;;
-;; Copyright (C) 1991-2017  Free Software Foundation, Inc.
+;; Copyright (C) 1991-2019  Free Software Foundation, Inc.
 ;; See the "HY-COPY" file for license information.
 ;;
 ;; This file is part of GNU Hyperbole.
@@ -43,10 +43,7 @@
   (interactive)
   (unless (featurep 'infodock)
     ;; Initialize now since Emacs startup has finished.
-    (if (and (or (not (featurep 'xemacs))
-                 (and (boundp 'current-menubar) current-menubar))
-            after-init-time)
-       (hyperbole-menubar-menu)
+    (if after-init-time        (hyperbole-menubar-menu)
       ;; Defer initialization until after Emacs startup.  This really is 
needed.
       (add-hook 'after-init-hook #'hyperbole-menubar-menu))
     ;; Avoid returning the large Hyperbole menu.
@@ -59,18 +56,8 @@
 ;;;###autoload
 (defmacro hui-menu-remove (menu-sym &optional keymap)
   "Remove MENU-SYM menu from any menubars generated by optional KEYMAP or the 
global-map."
-  `(prog1 (cond ((not (featurep 'xemacs))
-                (if (null ,keymap) (setq keymap global-map))
-                (define-key (or ,keymap global-map) [menu-bar ,menu-sym] nil))
-               ;; XEmacs
-               ((boundp 'menubar-configuration)
-                (if (memq ',menu-sym menubar-configuration)
-                    (if (fboundp 'customize-set-variable)
-                        (customize-set-variable
-                         'menubar-configuration
-                         (delq ',menu-sym  menubar-configuration))
-                      (setq menubar-configuration 
-                            (delq ',menu-sym menubar-configuration))))))
+  `(prog1 (if (null ,keymap) (setq keymap global-map))
+     (define-key (or ,keymap global-map) [menu-bar ,menu-sym] nil)
      ;; Force a menu-bar update.
      (force-mode-line-update)))
 
diff --git a/hmouse-drv.el b/hmouse-drv.el
index e5361cb..8142cdf 100644
--- a/hmouse-drv.el
+++ b/hmouse-drv.el
@@ -1259,10 +1259,7 @@ Under InfoDock and XEmacs, `zmacs-region' must be t; 
under GNU Emacs,
 
 
 ;; Save any active region to `hkey-region' when the mouse is moved between 
frames or buffers.
-(if (featurep 'xemacs)
-    (add-hook 'mouse-leave-frame-hook #'hmouse-save-region)
-  ;; GNU Emacs
-  (add-hook 'mouse-leave-buffer-hook #'hmouse-save-region))
+(add-hook 'mouse-leave-buffer-hook #'hmouse-save-region)
 
 ;; BW - Last confirmed in 1999, for some reason, using this next
 ;; function in byte-compiled form caused the first character 
@@ -1277,16 +1274,7 @@ lines or if ARGS is null and there is no graphical 
window system,
 return current point as a marker."
   (and (car args) (listp (car args)) (setq args (car args)))
   (if (and args (hyperb:window-system))
-      (progn (hmouse-set-point-at args)
-            (cond ((featurep 'xemacs)
-                   (if (eventp current-mouse-event)
-                       (copy-event current-mouse-event)))
-                  ((equal (hyperb:window-system) "next")
-                   (let ((win (car args)))
-                     (list win
-                           (+ (nth 1 args) (nth 0 (window-edges win)))
-                           (+ (nth 2 args) (nth 1 (window-edges win))))))
-                  (t args)))
+      (progn (hmouse-set-point-at args) args)
     (list 'keyboard-drag (posn-at-point))))
 
 (defun hmouse-set-point-at (set-point-arg-list)
diff --git a/hmouse-info.el b/hmouse-info.el
index b0d74b5..f81b389 100644
--- a/hmouse-info.el
+++ b/hmouse-info.el
@@ -4,7 +4,7 @@
 ;;
 ;; Orig-Date:    04-Apr-89
 ;;
-;; Copyright (C) 1989-2016  Free Software Foundation, Inc.
+;; Copyright (C) 1989-2019  Free Software Foundation, Inc.
 ;; See the "HY-COPY" file for license information.
 ;;
 ;; This file is part of GNU Hyperbole.
@@ -170,9 +170,7 @@ Otherwise, return nil."
                  (filep (concat "(" nodename ")" "Top"))
                  (buffer-file-name (concat "(" buffer-file-name ")" nodename))
                  (t nodename)))
-      (if (featurep 'xemacs)
-         (Info-goto-node nodename nil t)
-       (Info-goto-node nodename))
+      (Info-goto-node nodename)
       t)))
 
 (defun Info-handle-in-node-hdr-assist ()
@@ -223,9 +221,7 @@ entry and returns t; otherwise returns nil."
          (forward-char 2)
          (setq node (Info-extract-menu-node-name nil (Info-index-node)))))
       (when node
-       (if (featurep 'xemacs)
-           (Info-goto-node node nil t)
-         (Info-goto-node node))
+       (Info-goto-node node)
        t))))
 
 ;;; ************************************************************************
diff --git a/hmouse-key.el b/hmouse-key.el
index 9408eb8..5ea6696 100644
--- a/hmouse-key.el
+++ b/hmouse-key.el
@@ -4,7 +4,7 @@
 ;;
 ;; Orig-Date:    30-May-94 at 00:11:57
 ;;
-;; Copyright (C) 1994-2017  Free Software Foundation, Inc.
+;; Copyright (C) 1994-2019  Free Software Foundation, Inc.
 ;; See the "HY-COPY" file for license information.
 ;;
 ;; This file is part of GNU Hyperbole.
diff --git a/hmouse-sh.el b/hmouse-sh.el
index 3440b6b..dc91c16 100644
--- a/hmouse-sh.el
+++ b/hmouse-sh.el
@@ -4,7 +4,7 @@
 ;;
 ;; Orig-Date:     3-Sep-91 at 21:40:58
 ;;
-;; Copyright (C) 1991-2016  Free Software Foundation, Inc.
+;; Copyright (C) 1991-2019  Free Software Foundation, Inc.
 ;; See the "HY-COPY" file for license information.
 ;;
 ;; This file is part of GNU Hyperbole.
@@ -267,114 +267,112 @@ These may be the bindings prior to initializing 
Hyperbole or the Hyperbole bindi
      ;; Get mouse bindings under Emacs or XEmacs, even if not under a
      ;; window system since they can have frames on ttys and windowed
      ;; displays at the same time.
-     (if (not (featurep 'xemacs))
-        (mapcar (lambda (key) (cons key (global-key-binding key)))
-                (if (eq window-system 'dps)
-                    ;; NEXTSTEP offers only 2 shift-mouse buttons which we use
-                    ;; as the Smart Keys.
-                    '([S-down-mouse-1] [S-drag-mouse-1] [S-mouse-1]
-                      [S-down-mouse-2] [S-drag-mouse-2] [S-mouse-2]
-                      [S-double-mouse-1] [S-triple-mouse-1]
-                      [S-double-mouse-2] [S-triple-mouse-2]
-                      [header-line S-down-mouse-1] [header-line S-drag-mouse-1]
-                      [header-line S-mouse-1]
-                      [header-line S-down-mouse-2] [header-line S-drag-mouse-2]
-                      [header-line S-mouse-2]
-                      [left-fringe S-down-mouse-1] [left-fringe S-drag-mouse-1]
-                      [left-fringe S-mouse-1]
-                      [left-fringe S-down-mouse-2] [left-fringe S-drag-mouse-2]
-                      [left-fringe S-mouse-2]
-                      [right-fringe S-down-mouse-1] [right-fringe 
S-drag-mouse-1]
-                      [right-fringe S-mouse-1]
-                      [right-fringe S-down-mouse-2] [right-fringe 
S-drag-mouse-2]
-                      [right-fringe S-mouse-2]
-                      [vertical-line S-down-mouse-1] [vertical-line 
S-drag-mouse-1]
-                      [vertical-line S-mouse-1]
-                      [vertical-line S-down-mouse-2] [vertical-line 
S-drag-mouse-2]
-                      [vertical-line S-mouse-2]
-                      [mode-line S-down-mouse-1] [mode-line S-drag-mouse-1]
-                      [mode-line S-mouse-1]
-                      [mode-line S-down-mouse-2] [mode-line S-drag-mouse-2]
-                      [mode-line S-mouse-2]
-                      )
-                  ;; X, macOS or MS Windows
-                  '([S-down-mouse-2] [S-drag-mouse-2] [S-mouse-2]
-                    [S-down-mouse-3] [S-drag-mouse-3] [S-mouse-3]
-                    [S-double-mouse-2] [S-triple-mouse-2]
-                    [S-double-mouse-3] [S-triple-mouse-3]
-                    [header-line S-down-mouse-2] [header-line S-drag-mouse-2]
-                    [header-line S-mouse-2]
-                    [header-line S-down-mouse-3] [header-line S-drag-mouse-3]
-                    [header-line S-mouse-3]
-                    [left-fringe S-down-mouse-2] [left-fringe S-drag-mouse-2]
-                    [left-fringe S-mouse-2]
-                    [left-fringe S-down-mouse-3] [left-fringe S-drag-mouse-3]
-                    [left-fringe S-mouse-3]
-                    [right-fringe S-down-mouse-2] [right-fringe S-drag-mouse-2]
-                    [right-fringe S-mouse-2]
-                    [right-fringe S-down-mouse-3] [right-fringe S-drag-mouse-3]
-                    [right-fringe S-mouse-3]
-                    [vertical-line S-down-mouse-2] [vertical-line 
S-drag-mouse-2]
-                    [vertical-line S-mouse-2]
-                    [vertical-line S-down-mouse-3] [vertical-line 
S-drag-mouse-3]
-                    [vertical-line S-mouse-3]
-                    [mode-line S-down-mouse-2] [mode-line S-drag-mouse-2]
-                    [mode-line S-mouse-2]
-                    [mode-line S-down-mouse-3] [mode-line S-drag-mouse-3]
-                    [mode-line S-mouse-3]
-                    )))
-       (nconc
-       (mapcar (lambda (key)
-                 (cons key (global-key-binding key)))
-               '([(shift button2)] [(shift button2up)]
-                 [(shift button3)] [(shift button3up)]))
-       (if (boundp 'mode-line-map)
-           (mapcar (lambda (key)
-                     (cons key (lookup-key mode-line-map key)))
-                   '([(shift button3)] [(shift button3up)]))))))))
+     (mapcar (lambda (key) (cons key (global-key-binding key)))
+            (if (eq window-system 'dps)
+                ;; NEXTSTEP offers only 2 shift-mouse buttons which we use
+                ;; as the Smart Keys.
+                '([S-down-mouse-1] [S-drag-mouse-1] [S-mouse-1]
+                  [S-down-mouse-2] [S-drag-mouse-2] [S-mouse-2]
+                  [S-double-mouse-1] [S-triple-mouse-1]
+                  [S-double-mouse-2] [S-triple-mouse-2]
+                  [header-line S-down-mouse-1] [header-line S-drag-mouse-1]
+                  [header-line S-mouse-1]
+                  [header-line S-down-mouse-2] [header-line S-drag-mouse-2]
+                  [header-line S-mouse-2]
+                  [left-fringe S-down-mouse-1] [left-fringe S-drag-mouse-1]
+                  [left-fringe S-mouse-1]
+                  [left-fringe S-down-mouse-2] [left-fringe S-drag-mouse-2]
+                  [left-fringe S-mouse-2]
+                  [right-fringe S-down-mouse-1] [right-fringe S-drag-mouse-1]
+                  [right-fringe S-mouse-1]
+                  [right-fringe S-down-mouse-2] [right-fringe S-drag-mouse-2]
+                  [right-fringe S-mouse-2]
+                  [vertical-line S-down-mouse-1] [vertical-line S-drag-mouse-1]
+                  [vertical-line S-mouse-1]
+                  [vertical-line S-down-mouse-2] [vertical-line S-drag-mouse-2]
+                  [vertical-line S-mouse-2]
+                  [mode-line S-down-mouse-1] [mode-line S-drag-mouse-1]
+                  [mode-line S-mouse-1]
+                  [mode-line S-down-mouse-2] [mode-line S-drag-mouse-2]
+                  [mode-line S-mouse-2]
+                  )
+              ;; X, macOS or MS Windows
+              '([S-down-mouse-2] [S-drag-mouse-2] [S-mouse-2]
+                [S-down-mouse-3] [S-drag-mouse-3] [S-mouse-3]
+                [S-double-mouse-2] [S-triple-mouse-2]
+                [S-double-mouse-3] [S-triple-mouse-3]
+                [header-line S-down-mouse-2] [header-line S-drag-mouse-2]
+                [header-line S-mouse-2]
+                [header-line S-down-mouse-3] [header-line S-drag-mouse-3]
+                [header-line S-mouse-3]
+                [left-fringe S-down-mouse-2] [left-fringe S-drag-mouse-2]
+                [left-fringe S-mouse-2]
+                [left-fringe S-down-mouse-3] [left-fringe S-drag-mouse-3]
+                [left-fringe S-mouse-3]
+                [right-fringe S-down-mouse-2] [right-fringe S-drag-mouse-2]
+                [right-fringe S-mouse-2]
+                [right-fringe S-down-mouse-3] [right-fringe S-drag-mouse-3]
+                [right-fringe S-mouse-3]
+                [vertical-line S-down-mouse-2] [vertical-line S-drag-mouse-2]
+                [vertical-line S-mouse-2]
+                [vertical-line S-down-mouse-3] [vertical-line S-drag-mouse-3]
+                [vertical-line S-mouse-3]
+                [mode-line S-down-mouse-2] [mode-line S-drag-mouse-2]
+                [mode-line S-mouse-2]
+                [mode-line S-down-mouse-3] [mode-line S-drag-mouse-3]
+                [mode-line S-mouse-3]
+                )))
+     (nconc
+      (mapcar (lambda (key)
+               (cons key (global-key-binding key)))
+             '([(shift button2)] [(shift button2up)]
+               [(shift button3)] [(shift button3up)]))
+      (if (boundp 'mode-line-map)
+         (mapcar (lambda (key)
+                   (cons key (lookup-key mode-line-map key)))
+                 '([(shift button3)] [(shift button3up)])))))))
 
 (defun hmouse-get-unshifted-bindings ()
   "Return the list of middle mouse key bindings prior to their use as Smart 
Keys."
   ;; Do nothing when running in batch mode.
-  (if (not (featurep 'xemacs))
-      (mapcar (lambda (key) (cons key (global-key-binding key)))
-             (if (not (eq window-system 'dps))
-                 ;; X, macOS or MS Windows
-                 '([down-mouse-2] [drag-mouse-2] [mouse-2]
-                   [down-mouse-3] [drag-mouse-3] [mouse-3]
-                   [double-mouse-2] [triple-mouse-2]
-                   [double-mouse-3] [triple-mouse-3]
-                   [header-line down-mouse-2] [header-line drag-mouse-2]
-                   [header-line mouse-2]
-                   [left-fringe down-mouse-2] [left-fringe drag-mouse-2]
-                   [left-fringe mouse-2]
-                   [right-fringe down-mouse-2] [right-fringe drag-mouse-2]
-                   [right-fringe mouse-2]
-                   [vertical-line down-mouse-2] [vertical-line drag-mouse-2]
-                   [vertical-line mouse-2]
-                   [left-fringe down-mouse-3] [left-fringe drag-mouse-3]
-                   [left-fringe mouse-3]
-                   [right-fringe down-mouse-3] [right-fringe drag-mouse-3]
-                   [right-fringe mouse-3]
-                   [vertical-line down-mouse-3] [vertical-line drag-mouse-3]
-                   [vertical-line mouse-3]
-                   [mode-line down-mouse-2] [mode-line drag-mouse-2]
-                   [mode-line mouse-2]
-                   [mode-line down-mouse-3] [mode-line drag-mouse-3]
-                   [mode-line mouse-3]
-                   )))
-    (nconc
-     (mapcar (lambda (key)
-              (cons key (global-key-binding key)))
-            '([button2] [button2up]
-              [button3] [button3up]
-              ))
-     (if (boundp 'mode-line-map)
-        (mapcar (function
-                 (lambda (key)
-                   (cons key (lookup-key mode-line-map key))))
-                '([button3] [button3up])))
-     )))
+  (mapcar (lambda (key) (cons key (global-key-binding key)))
+         (if (not (eq window-system 'dps))
+             ;; X, macOS or MS Windows
+             '([down-mouse-2] [drag-mouse-2] [mouse-2]
+               [down-mouse-3] [drag-mouse-3] [mouse-3]
+               [double-mouse-2] [triple-mouse-2]
+               [double-mouse-3] [triple-mouse-3]
+               [header-line down-mouse-2] [header-line drag-mouse-2]
+               [header-line mouse-2]
+               [left-fringe down-mouse-2] [left-fringe drag-mouse-2]
+               [left-fringe mouse-2]
+               [right-fringe down-mouse-2] [right-fringe drag-mouse-2]
+               [right-fringe mouse-2]
+               [vertical-line down-mouse-2] [vertical-line drag-mouse-2]
+               [vertical-line mouse-2]
+               [left-fringe down-mouse-3] [left-fringe drag-mouse-3]
+               [left-fringe mouse-3]
+               [right-fringe down-mouse-3] [right-fringe drag-mouse-3]
+               [right-fringe mouse-3]
+               [vertical-line down-mouse-3] [vertical-line drag-mouse-3]
+               [vertical-line mouse-3]
+               [mode-line down-mouse-2] [mode-line drag-mouse-2]
+               [mode-line mouse-2]
+               [mode-line down-mouse-3] [mode-line drag-mouse-3]
+               [mode-line mouse-3]
+               )))
+  (nconc
+   (mapcar (lambda (key)
+            (cons key (global-key-binding key)))
+          '([button2] [button2up]
+            [button3] [button3up]
+            ))
+   (if (boundp 'mode-line-map)
+       (mapcar (function
+               (lambda (key)
+                 (cons key (lookup-key mode-line-map key))))
+              '([button3] [button3up])))
+   ))
 
 ;; Based on a function from Emacs mouse.el.
 (defun hmouse-posn-set-point (position)
@@ -457,42 +455,20 @@ point determined by 
`mouse-select-region-move-to-beginning'."
     ;; this.
     (setq kmacro-call-mouse-event nil)
     ;;
-    (cond
-     ;; GNU Emacs
-     ((not (featurep 'xemacs))
-      (setq hmouse-set-point-command 'hmouse-move-point-emacs)
-      (if (eq window-system 'dps)
-         ;; NEXTSTEP offers only 2 shift-mouse buttons which we use as the 
Smart Keys.
-         (progn
-           (hmouse-bind-shifted-key-emacs 1 #'action-key-depress-emacs 
#'action-mouse-key-emacs)
-           (hmouse-bind-shifted-key-emacs 2 #'assist-key-depress-emacs 
#'assist-mouse-key-emacs))
-       ;; X, macOS or MS Windows
-       (hmouse-bind-shifted-key-emacs 2 #'action-key-depress-emacs 
#'action-mouse-key-emacs)
-       (hmouse-bind-shifted-key-emacs 3 #'assist-key-depress-emacs 
#'assist-mouse-key-emacs)
-       (with-eval-after-load "company"
-         (define-key company-active-map [S-down-mouse-2] 'ignore)
-         (define-key company-active-map [S-mouse-2] 
'smart-company-to-definition)
-         (define-key company-active-map [S-down-mouse-3] 'ignore)
-         (define-key company-active-map [S-mouse-3] 'smart-company-help))))
-     ;;
-     ;; XEmacs
-     ((featurep 'xemacs)
-      ;; Set mouse bindings under XEmacs, even if not under a window
-      ;; system since it can have frames on ttys and windowed displays at
-      ;; the same time.
-      (setq hmouse-set-point-command 'hmouse-move-point-xemacs)
-      (global-set-key '(shift button2)     'action-key-depress)
-      (global-set-key '(shift button2up)   'action-mouse-key)
-      (if (fboundp 'infodock-set-mouse-bindings)
-         (infodock-set-mouse-bindings)
-       (if (boundp 'mode-line-map)
-           (progn (define-key mode-line-map '(shift button3)
-                    'assist-key-depress)
-                  (define-key mode-line-map '(shift button3up)
-                    'assist-mouse-key)
-                  ))
-       (global-set-key '(shift button3)     'assist-key-depress)
-       (global-set-key '(shift button3up)   'assist-mouse-key))))
+    (setq hmouse-set-point-command 'hmouse-move-point-emacs)
+    (if (eq window-system 'dps)
+       ;; NEXTSTEP offers only 2 shift-mouse buttons which we use as the Smart 
Keys.
+       (progn
+         (hmouse-bind-shifted-key-emacs 1 #'action-key-depress-emacs 
#'action-mouse-key-emacs)
+         (hmouse-bind-shifted-key-emacs 2 #'assist-key-depress-emacs 
#'assist-mouse-key-emacs))
+      ;; X, macOS or MS Windows
+      (hmouse-bind-shifted-key-emacs 2 #'action-key-depress-emacs 
#'action-mouse-key-emacs)
+      (hmouse-bind-shifted-key-emacs 3 #'assist-key-depress-emacs 
#'assist-mouse-key-emacs)
+      (with-eval-after-load "company"
+       (define-key company-active-map [S-down-mouse-2] 'ignore)
+       (define-key company-active-map [S-mouse-2] 'smart-company-to-definition)
+       (define-key company-active-map [S-down-mouse-3] 'ignore)
+       (define-key company-active-map [S-mouse-3] 'smart-company-help)))
     (setq hmouse-bindings (hmouse-get-bindings hmouse-middle-flag)
          hmouse-bindings-flag t)))
 
@@ -500,63 +476,38 @@ point determined by 
`mouse-select-region-move-to-beginning'."
   "Binds the middle mouse key as the Action Key and the right mouse key as the 
Assist Key.
 With optional MIDDLE-KEY-ONLY-FLAG non-nil, binds only the middle mouse key."
   (interactive)
-  (cond        ;; GNU Emacs
-   ((not (featurep 'xemacs))
-    ;; Unbind Emacs push-button mouse keys since Hyperbole handles them.
-    (define-key button-map [mouse-2] nil)
-    (define-key button-map [mode-line mouse-2] nil)
-    (define-key button-map [header-line mouse-2] nil)
-    ;; Remove push-button help echo string for mouse-2 key.
-    (put 'default-button 'help-echo nil)
-    ;;
-    ;; In Info-mode, Emacs uses key-translation-map to link mouse-1 to
-    ;; do whatever mouse-2 does but because Hyperbole uses both down
-    ;; and up bindings on mouse2, this does not work.  So we rebind
-    ;; mouse-1 in Info mode to be an actual Action Mouse Key (which
-    ;; makes it follow Info links/cross-references properly, doing a
-    ;; superset of what it did before).
-    (var:add-and-run-hook 'Info-mode-hook
-                         (lambda ()
-                           (define-key Info-mode-map [down-mouse-1] 
'action-key-depress-emacs)
-                           (define-key Info-mode-map [mouse-1] 
'action-mouse-key-emacs)
-                           (define-key Info-mode-map [double-down-mouse-1] 
'action-key-depress-emacs)
-                           (define-key Info-mode-map [double-mouse-1] 
'action-mouse-key-emacs)
-                           (define-key Info-mode-map [mouse-2] nil)))
-    ;;
-    (unless (eq window-system 'dps)
-       ;; X, macOS or MS Windows
-      (hmouse-bind-key-emacs 2 #'action-key-depress-emacs 
#'action-mouse-key-emacs)
-      (unless middle-key-only-flag
-       (hmouse-bind-key-emacs 3 #'assist-key-depress-emacs 
#'assist-mouse-key-emacs))
-      `(with-eval-after-load "company"
-        (define-key company-active-map [down-mouse-2] 'ignore)
-        (define-key company-active-map [mouse-2] 'smart-company-to-definition)
-        (unless ,middle-key-only-flag
-          (define-key company-active-map [down-mouse-3] 'ignore)
-          (define-key company-active-map [mouse-3] 'smart-company-help)))))
-   ;;
-   ;; XEmacs
-   ((featurep 'xemacs)
-    ;; Set mouse bindings under XEmacs, even if not under a window
-    ;; system since it can have frames on ttys and windowed displays at
-    ;; the same time.
-    ;;
-    ;; Get rid of Info-mode button 2 and possibly button 3 bindings since 
Hyperbole
-    ;; handles things in Info.
-    (var:add-and-run-hook 'Info-mode-hook
-                         (lambda () (define-key Info-mode-map 'button2 nil)))
-    ;;
-    (global-set-key 'button2     'action-key-depress)
-    (global-set-key 'button2up   'action-mouse-key)
+  ;; Unbind Emacs push-button mouse keys since Hyperbole handles them.
+  (define-key button-map [mouse-2] nil)
+  (define-key button-map [mode-line mouse-2] nil)
+  (define-key button-map [header-line mouse-2] nil)
+  ;; Remove push-button help echo string for mouse-2 key.
+  (put 'default-button 'help-echo nil)
+  ;;
+  ;; In Info-mode, Emacs uses key-translation-map to link mouse-1 to
+  ;; do whatever mouse-2 does but because Hyperbole uses both down
+  ;; and up bindings on mouse2, this does not work.  So we rebind
+  ;; mouse-1 in Info mode to be an actual Action Mouse Key (which
+  ;; makes it follow Info links/cross-references properly, doing a
+  ;; superset of what it did before).
+  (var:add-and-run-hook 'Info-mode-hook
+                       (lambda ()
+                         (define-key Info-mode-map [down-mouse-1] 
'action-key-depress-emacs)
+                         (define-key Info-mode-map [mouse-1] 
'action-mouse-key-emacs)
+                         (define-key Info-mode-map [double-down-mouse-1] 
'action-key-depress-emacs)
+                         (define-key Info-mode-map [double-mouse-1] 
'action-mouse-key-emacs)
+                         (define-key Info-mode-map [mouse-2] nil)))
+  ;;
+  (unless (eq window-system 'dps)
+    ;; X, macOS or MS Windows
+    (hmouse-bind-key-emacs 2 #'action-key-depress-emacs 
#'action-mouse-key-emacs)
     (unless middle-key-only-flag
-      (if (and (boundp 'Info-mode-map) (keymapp Info-mode-map))
-          (funcall (lambda () (define-key Info-mode-map 'button3 nil)))
-       (add-hook 'Info-mode-hook unbind-but3))
-      (when (boundp 'mode-line-map)
-        (define-key mode-line-map 'button3   'assist-key-depress)
-       (define-key mode-line-map 'button3up 'assist-mouse-key))
-      (global-set-key 'button3     'assist-key-depress)
-      (global-set-key 'button3up   'assist-mouse-key)))))
+      (hmouse-bind-key-emacs 3 #'assist-key-depress-emacs 
#'assist-mouse-key-emacs))
+    `(with-eval-after-load "company"
+       (define-key company-active-map [down-mouse-2] 'ignore)
+       (define-key company-active-map [mouse-2] 'smart-company-to-definition)
+       (unless ,middle-key-only-flag
+        (define-key company-active-map [down-mouse-3] 'ignore)
+        (define-key company-active-map [mouse-3] 'smart-company-help)))))
 
 (provide 'hmouse-sh)
 
diff --git a/hmouse-tag.el b/hmouse-tag.el
index 1ced3a5..2cb4949 100644
--- a/hmouse-tag.el
+++ b/hmouse-tag.el
@@ -4,7 +4,7 @@
 ;;
 ;; Orig-Date:    24-Aug-91
 ;;
-;; Copyright (C) 1991-2017  Free Software Foundation, Inc.
+;; Copyright (C) 1991-2019  Free Software Foundation, Inc.
 ;; See the "HY-COPY" file for license information.
 ;;
 ;; This file is part of GNU Hyperbole.
@@ -1060,7 +1060,7 @@ Returns TAG."
         (tags-add-tables nil))
     ;; For InfoDock (XEmacs may also take this branch), force exact match
     ;; (otherwise tag might = nil and the following stringp test could fail).
-    (if (or (featurep 'infodock) (featurep 'xemacs))
+    (if (featurep 'infodock)
        (if (stringp tag) (setq tag (list tag))))
     (condition-case ()
        (and func (funcall func tag) t)
@@ -1278,7 +1278,7 @@ See the \"${hyperb:dir}/smart-clib-sym\" script for more 
information."
     ;; For InfoDock (XEmacs may also take this branch), force exact match
     ;; when `next' is false (otherwise tag would = nil and the following
     ;; stringp test would fail).
-    (if (or (featurep 'infodock) (featurep 'xemacs))
+    (if (featurep 'infodock)
        (if (stringp tag) 
            (setq tag (list tag))))
     (if (and func (setq find-tag-result (funcall func tag)))
diff --git a/hsettings.el b/hsettings.el
index 9889443..0f4ca10 100644
--- a/hsettings.el
+++ b/hsettings.el
@@ -223,7 +223,7 @@ obtained search string."
 ;; No-op unless set by one of the conditionals below.
 (defun hui:but-flash ())
 
-(cond ((and (not (featurep 'xemacs)) (not noninteractive))
+(cond ((not noninteractive)
        (require 'hui-em-but)
        ;; Highlight explicit buttons whenever a file is read in.
        (add-hook 'find-file-hook #'hproperty:but-create t)
@@ -243,29 +243,6 @@ obtained search string."
        ;;
        ;; If you find that the Hyperbole button flash time is too slow
        ;; or too fast, adjust it here.
-       (setq hproperty:but-flash-time 1000))
-
-      ((and (featurep 'xemacs) (not noninteractive))
-       (require 'hui-xe-but)
-       ;;
-       ;; Highlight explicit buttons when files are read in.
-       (add-hook 'find-file-hook #'hproperty:but-create t)
-       (defalias 'hui:but-flash #'hproperty:but-flash)
-       ;;
-       ;; Substitute for the nil argument below a valid X color name with
-       ;; which to highlight buttons if the default highlighting does not
-       ;; appeal to you. See "hui-xe-but.el" for how this works.
-       (hproperty:cycle-but-color nil)
-       ;;
-       ;; Non-nil means highlight all explict buttons with 
`hproperty:but-face'.
-       (setq hproperty:but-highlight-flag t)
-       ;;
-       ;; Non-nil means visually emphasize that button under mouse cursor is
-       ;; selectable.
-       (setq hproperty:but-emphasize-p nil)
-       ;;
-       ;; If you find that the Hyperbole button flash time is too slow
-       ;; or too fast, adjust it here.
        (setq hproperty:but-flash-time 1000)))
 
 ;;; ************************************************************************
diff --git a/hui-em-but.el b/hui-em-but.el
index 8d463d9..c3cd6aa 100644
--- a/hui-em-but.el
+++ b/hui-em-but.el
@@ -4,7 +4,7 @@
 ;;
 ;; Orig-Date:    21-Aug-92
 ;;
-;; Copyright (C) 1992-2017  Free Software Foundation, Inc.
+;; Copyright (C) 1992-2019  Free Software Foundation, Inc.
 ;; See the "HY-COPY" file for license information.
 ;;
 ;; This file is part of GNU Hyperbole.
@@ -16,7 +16,7 @@
 
 ;;; Code:
 
-(when (or (featurep 'xemacs) noninteractive)
+(when noninteractive
   ;; FIXME: Loading a file should always be harmless!
   (error "(hui-em-but.el): Load only when running GNU Emacs interactively"))
 
diff --git a/hui-menu.el b/hui-menu.el
index ddff60e..c1388f7 100644
--- a/hui-menu.el
+++ b/hui-menu.el
@@ -186,10 +186,7 @@ Return t if cutoff, else nil."
                    ;; setting.  Invoking this item should then make it
                    ;; visible.
                    (hyperb:init-menubar))
-                  ((cond ((not (featurep 'xemacs))
-                          (global-key-binding [menu-bar Hyperbole]))
-                         ((boundp 'current-menubar)
-                          (car (find-menu-item current-menubar 
'("Hyperbole")))))
+                  ((global-key-binding [menu-bar Hyperbole])
                    ;; Already on the menubar, remove it.
                    (hui-menu-remove Hyperbole))
                   (t;; Add it.
@@ -198,10 +195,8 @@ Return t if cutoff, else nil."
             :selected
              (cond ((boundp 'menubar-configuration)
                     (memq 'Hyperbole menubar-configuration))
-                   ((not (featurep 'xemacs))
-                    (and (global-key-binding [menu-bar Hyperbole]) t))
-                   ((boundp 'current-menubar)
-                    (car (find-menu-item current-menubar '("Hyperbole")))))]
+                   (t
+                    (and (global-key-binding [menu-bar Hyperbole]) t)))]
            "----"
            ["Find-File-Accepts-URLs"
             hpath:find-file-urls-mode
@@ -302,7 +297,7 @@ REBUILD-FLAG is non-nil, in which case the menu is rebuilt."
     (setq infodock-hyperbole-menu
          (delq nil
                (list
-                (if (featurep 'xemacs) "%_Hyperbole" "Hyperbole")
+                "Hyperbole"
                 :config 'Hyperbole
                 hui-menu-about
                 ["Demonstration"  (hypb:display-file-with-logo
diff --git a/hui-mini.el b/hui-mini.el
index 1bbda16..c52d64b 100644
--- a/hui-mini.el
+++ b/hui-mini.el
@@ -150,13 +150,9 @@ With optional HELP-STRING-FLAG, instead returns the one 
line help string for the
   "Uses CHAR-STR or last input character as minibuffer argument."
   (interactive)
   (let ((input (or char-str (aref (recent-keys) (1- (length (recent-keys)))))))
-    (cond ((not (featurep 'xemacs))
-          (and (not (integerp input))
-               (eventp input)
-               (setq input (event-basic-type input))))
-         ((featurep 'xemacs)
-          (if (eventp input)
-              (setq input (event-to-character input)))))
+    (and (not (integerp input))
+        (eventp input)
+        (setq input (event-basic-type input)))
     (if (or (symbolp input)
            (and (integerp input) (= input ?\r)))
        (setq input (hargs:at-p)))
@@ -203,24 +199,6 @@ With optional HELP-STRING-FLAG, instead returns the one 
line help string for the
       (if (eq owind (minibuffer-window))
          (select-window owind)))))
 
-(defun hui:menu-xemacs (&optional menu menu-list)
-  "Returns an XEmacs menu built from a Hyperbole minibuffer menu.
-Optional MENU (a symbol) specifies a specific submenu of optional MENU-LIST.
-a Hyperbole menu list structure.  Otherwise, all menus are used.
-MENU defaults to 'hyperbole and MENU-LIST to `hui:menus'.  See `hui:menus'
-definition for the format of the menu list structure."
-  (mapcar
-   (lambda (entry)
-     (or (consp entry)
-        (error "(hui:menu-xemacs): Invalid menu entry: %s" entry))
-     (let ((label (car entry))
-          (content (car (cdr entry))))
-       (cond ((null content) (hypb:replace-match-string ">$" label "" t))
-            ((and (consp content) (eq (car content) 'menu))
-             (hui:menu-xemacs (cdr content)))
-            (t (vector label content 't)))))
-   (cdr (assq (or menu 'hyperbole) (or menu-list hui:menus)))))
-
 (defun hui:menu-select (menu-alist &optional doc-flag help-string-flag)
   "Prompts user to choose the first character of any item from MENU-ALIST.
 Case is not significant.  If chosen by direct selection with the Assist Key,
@@ -385,10 +363,6 @@ constructs.  If not given, the top-level Hyperbole menu is 
used."
   (define-key hui:menu-mode-map [backtab]       #'hui:menu-backward-item) ;; 
Shift-TAB
   (define-key hui:menu-mode-map "\M-\C-i"       #'hui:menu-backward-item) ;; 
M-TAB
   ;;
-  ;; This next binding is necessary since the default button1 binding under
-  ;; XEmacs, mouse-track, is broken under XEmacs V19.8.
-  (and (featurep 'xemacs) window-system
-       (define-key hui:menu-mode-map 'button1 'mouse-set-point))
   (let ((i 32))
     (while (<= i 126)
       (define-key hui:menu-mode-map (char-to-string i) 'hui:menu-enter)
diff --git a/hui-select.el b/hui-select.el
index f70818e..aa91d8c 100644
--- a/hui-select.el
+++ b/hui-select.el
@@ -4,7 +4,7 @@
 ;;
 ;; Orig-Date:    19-Oct-96 at 02:25:27
 ;;
-;; Copyright (C) 1996-2017  Free Software Foundation, Inc.
+;; Copyright (C) 1996-2019  Free Software Foundation, Inc.
 ;; See the "HY-COPY" file for license information.
 ;;
 ;; This file is part of GNU Hyperbole.
@@ -247,14 +247,12 @@ Also, add language-specific syntax setups to aid in thing 
selection."
   (unless (boundp 'hyperbole-loading)
     (require 'hyperbole))
   (if hkey-init
-      (cond ((not (featurep 'xemacs))
-            (transient-mark-mode 1)
-            (hkey-global-set-key [double-down-mouse-1] nil)
-            (hkey-global-set-key [double-mouse-1] 'hui-select-thing-with-mouse)
-            (hkey-global-set-key [triple-down-mouse-1] nil)
-            (hkey-global-set-key [triple-mouse-1] 
'hui-select-thing-with-mouse))
-           ((featurep 'xemacs)
-            (add-hook 'mouse-track-click-hook 
#'hui-select-double-click-hook))))
+      (progn
+       (transient-mark-mode 1)
+       (hkey-global-set-key [double-down-mouse-1] nil)
+       (hkey-global-set-key [double-mouse-1] 'hui-select-thing-with-mouse)
+       (hkey-global-set-key [triple-down-mouse-1] nil)
+       (hkey-global-set-key [triple-mouse-1] 'hui-select-thing-with-mouse)))
   ;;
   ;; These hooks let you select C++ and Java methods and classes by
   ;; double-clicking on the first character of a definition or on its
diff --git a/hui-window.el b/hui-window.el
index 8ba6159..d4386a5 100644
--- a/hui-window.el
+++ b/hui-window.el
@@ -145,10 +145,10 @@ drag release window.")
   :group 'hyperbole-keys)
 
  ;; Mats Lidell says this should be 10 characters for GNU Emacs.
-(defvar hmouse-edge-sensitivity (if (featurep 'xemacs) 3 10)
+(defvar hmouse-edge-sensitivity 10
   "*Number of characters from window edges within which a click is considered 
at an edge.")
 
-(defvar hmouse-side-sensitivity (if (featurep 'xemacs) 1 5)
+(defvar hmouse-side-sensitivity 5
   "*Characters in either direction from window side within which a click is 
considered on the side.")
 
 (defvar hmouse-x-drag-sensitivity 5
@@ -625,12 +625,7 @@ Value returned is nil if not a vertical line drag, 'up if 
drag moved up or
 (defun hmouse-drag-window-side ()
   "Returns non-nil if Action Key was dragged from a window side divider and 
released in the same window.
 If free variable `assist-flag' is non-nil, uses Assist Key."
-  (cond ((featurep 'xemacs)
-        ;; Depress events in scrollbars or in non-text area of buffer are
-        ;; not visible or identifiable at the Lisp-level, so always return
-        ;; nil.
-        nil)
-       ((hyperb:window-system)
+  (cond ((hyperb:window-system)
         (let* ((depress-args (if assist-flag assist-key-depress-args
                                action-key-depress-args))
                (release-args (if assist-flag assist-key-release-args
@@ -691,14 +686,10 @@ Beeps and prints message if the window cannot be split 
further."
 (defun smart-coords-in-window-p (coords window)
   "Tests if COORDS are in WINDOW.  Returns WINDOW if they are, nil otherwise."
   (cond ((null coords) nil)
-       ((and (not (featurep 'xemacs)) (eventp coords))
+       ((eventp coords)
         (let ((w-or-f (posn-window (event-start coords))))
           (if (framep w-or-f) (setq w-or-f (frame-selected-window w-or-f)))
           (eq w-or-f window)))
-       ((if (featurep 'xemacs)
-            (if (eventp coords)
-                (eq (event-window coords) window)
-              (eq (car coords) window))))
        ((fboundp 'window-edges)
         (let* ((edges (window-edges window))
                  (w-xmin (nth 0 edges))
@@ -716,10 +707,8 @@ Beeps and prints message if the window cannot be split 
further."
 Ignores minibuffer window."
   (cond ((markerp coords)
         (marker-position coords))
-       ((and (not (featurep 'xemacs)) (eventp coords))
-        (posn-point (event-start coords)))
-       ((and (featurep 'xemacs) (eventp coords))
-        (event-point coords))))
+       ((eventp coords)
+        (posn-point (event-start coords)))))
 
 (defun smart-window-of-coords (coords)
   "Returns window in which COORDS fall or nil if none.
@@ -727,14 +716,10 @@ Ignores minibuffer window."
   (cond ((null coords) nil)
         ((markerp coords)
         (get-buffer-window (marker-buffer coords)))
-       ((and (not (featurep 'xemacs)) (eventp coords))
+       ((eventp coords)
         (let ((w-or-f (posn-window (event-start coords))))
           (if (framep w-or-f) (setq w-or-f (frame-selected-window w-or-f)))
           w-or-f))
-       ((if (featurep 'xemacs)
-            (if (eventp coords)
-                (event-window coords)
-              (car coords))))
        (t (let ((window-list (hypb:window-list 'no-minibuf))
                 (window)
                 (w))
@@ -1007,23 +992,20 @@ If free variable `assist-flag' is non-nil, uses Assist 
Key."
 
 (defun hmouse-emacs-at-modeline-buffer-id-p ()
   "GNU Emacs: Return t if mouse position is within the buffer name field of 
the current window's mode-line, else nil."
-  (unless (featurep 'xemacs)
-    (let* ((coords (hmouse-window-coordinates)) ;; in characters
-          (x-coord (caadr coords))
-          (mode-line-string (and (integerp x-coord) (>= x-coord 0) 
(format-mode-line mode-line-format)))
-          (keymap (and mode-line-string
-                       (<= x-coord (1- (length mode-line-string)))
-                       (plist-get (text-properties-at x-coord 
mode-line-string) 'local-map))))
-      (when keymap
-       (eq (lookup-key keymap [mode-line mouse-1]) 
'mode-line-previous-buffer)))))
+  (let* ((coords (hmouse-window-coordinates)) ;; in characters
+        (x-coord (caadr coords))
+        (mode-line-string (and (integerp x-coord) (>= x-coord 0) 
(format-mode-line mode-line-format)))
+        (keymap (and mode-line-string
+                     (<= x-coord (1- (length mode-line-string)))
+                     (plist-get (text-properties-at x-coord mode-line-string) 
'local-map))))
+    (when keymap
+      (eq (lookup-key keymap [mode-line mouse-1]) 
'mode-line-previous-buffer))))
 
 (defun hmouse-modeline-resize-window ()
   "Resizes window whose mode line was depressed on by the last Smart Key.
 Resize amount depends upon the vertical difference between press and release
 of the Smart Key."
   (cond ((not (hyperb:window-system)) nil)
-       ((and (featurep 'xemacs) (not (fboundp 'window-edges)))
-        (error "Drag from a mode-line with button1 to resize windows."))
        (t (let* ((owind (selected-window))
                  (window (smart-window-of-coords
                           (if assist-flag assist-key-depress-args
@@ -1145,12 +1127,7 @@ release must be."
   "Resizes window whose side was depressed on by the last Smart Key.
 Resize amount depends upon the horizontal difference between press and release
 of the Smart Key."
-  (cond ((featurep 'xemacs)
-        ;; Depress events in scrollbars or in non-text area of buffer are
-        ;; not visible or identifiable at the Lisp-level, so always return
-        ;; nil.
-        nil)
-       ((hyperb:window-system)
+  (cond ((hyperb:window-system)
         (let* ((owind (selected-window))
                (window (smart-window-of-coords
                         (if assist-flag assist-key-depress-args
diff --git a/hui-xe-but.el b/hui-xe-but.el
deleted file mode 100644
index f135bff..0000000
--- a/hui-xe-but.el
+++ /dev/null
@@ -1,466 +0,0 @@
-;;; hui-xe-but.el --- XEmacs button highlighting and flashing support
-;;
-;; Author:       Bob Weiner
-;;
-;; Orig-Date:    21-Aug-92
-;;
-;; Copyright (C) 1992-2017  Free Software Foundation, Inc.
-;; See the "HY-COPY" file for license information.
-;;
-;; This file is part of GNU Hyperbole.
-
-;;; Commentary:
-;;
-;;   Can't use read-only buttons here because then outline-mode
-;;   becomes unusable.
-;;
-
-;;; Code:
-
-(unless (featurep 'xemacs)
-  (error "(hui-xe-but.el):  Load only when running XEmacs."))
-
-;;; ************************************************************************
-;;; Other required Elisp libraries
-;;; ************************************************************************
-
-(require 'custom) ;; For defface.
-(require 'hbut)
-
-(defun hproperty:background ()
-  "Returns default background color for selected frame."
-  (face-background (get-face 'default)))
-
-(defun hproperty:foreground ()
-  "Returns default foreground color for selected frame."
-  (face-foreground (get-face 'default)))
-
-;;; ************************************************************************
-;;; Public variables
-;;; ************************************************************************
-
-(defcustom hproperty:but-highlight-flag t
-  "*Non-nil (default value) means highlight all explict buttons with 
`hproperty:but-face'."
-  :type 'boolean
-  :group 'hyperbole-buttons)
-
-(defcustom hproperty:but-emphasize-flag nil
-  "*Non-nil means visually emphasize that button under mouse cursor is 
selectable."
-  :type 'boolean
-  :group 'hyperbole-buttons)
-
-(defcustom hproperty:but-flash-time 1000
-  "*Machine specific value for empty loop counter, Emacs button flash delay."
-  :type '(integer :match (lambda (_widget value) (and (integerp value) (> 
value 0))))
-  :group 'hyperbole-buttons)
-
-(defcustom hproperty:item-highlight-color (hproperty:foreground)
-  "Color with which to highlight list/menu selections.
-Call (hproperty:set-item-highlight <color>) to change value."
-  :type 'color
-  :initialize (lambda (_symbol _value) (hproperty:foreground))
-  :group 'hyperbole-buttons)
-
-;;; ************************************************************************
-;;; Public functions
-;;; ************************************************************************
-
-(defun hproperty:but-add (start end face)
-  "Add between START and END a button using FACE in current buffer.
-If `hproperty:but-emphasize-flag' is non-nil when this is called, emphasize
-that button is selectable whenever the mouse cursor moves over it."
-  (let ((but (make-extent start end)))
-    (set-extent-face but face)
-    (set-extent-property but 'highlight hproperty:but-emphasize-flag)))
-
-(defun hproperty:but-color ()
-  "Return current color of buffer's buttons."
-  (if hproperty:color-ptr
-      (car hproperty:color-ptr)
-    (hproperty:foreground)))
-
-(defun hproperty:but-clear ()
-  "Delete all Hyperbole buttons from current buffer."
-  (interactive)
-  (map-extents (lambda (extent unused-arg)
-                (if (eq (extent-face extent) 'hbut)
-                    (delete-extent extent)))))
-
-(defun hproperty:but-create (&optional start-delim end-delim regexp-match)
-  "Highlight all hyper-buttons in buffer using XEmacs extents.
-Will use optional strings START-DELIM and END-DELIM instead of default values.
-If END-DELIM is a symbol, e.g. t, then START-DELIM is taken as a regular
-expression which matches an entire button string.
-If REGEXP-MATCH is non-nil, only buttons matching this argument are
-highlighted.
-
-If `hproperty:but-emphasize-flag' is non-nil when this is called, emphasize
-that button is selectable whenever the mouse cursor moves over it."
-  (interactive)
-  (hproperty:but-clear)
-  (hproperty:but-create-all start-delim end-delim regexp-match))
-
-(defun hproperty:but-create-all (&optional start-delim end-delim regexp-match)
-  "Mark all hyper-buttons in buffer as XEmacs buttons, for later highlighting.
-Will use optional strings START-DELIM and END-DELIM instead of default values.
-If END-DELIM is a symbol, e.g. t, then START-DELIM is taken as a regular
-expression which matches an entire button string.
-If REGEXP-MATCH is non-nil, only buttons matching this argument are
-highlighted."
-  (when hproperty:but-highlight-flag
-    (ebut:map (lambda (lbl start end)
-               (hproperty:but-add start end hproperty:but-face))
-             start-delim end-delim regexp-match 'include-delims)))
-
-(defun hproperty:but-create-on-yank (prop-value start end)
-  (save-restriction
-    (narrow-to-region start end)
-    (hproperty:but-create-all)))
-
-(add-to-list 'yank-handled-properties '(hproperty:but-face . 
hproperty:but-create-on-yank))
-
-(defun hproperty:but-delete (&optional pos)
-  (let ((extent (extent-at (or pos (point)))))
-    (if extent (delete-extent extent))))
-
-;;; ************************************************************************
-;;; Private functions
-;;; ************************************************************************
-
-(defsubst hproperty:list-cycle (list-ptr list)
-  "Move LIST-PTR to next element in LIST or when at end to first element."
-  (or (and list-ptr (setq list-ptr (cdr list-ptr)))
-      (setq list-ptr list)))
-
-;;; ************************************************************************
-;;; Private variables
-;;; ************************************************************************
-
-(defconst hproperty:color-list
-  '("red" "blue" "paleturquoise4" "mediumpurple2"
-    "lightskyblue3" "springgreen2" "salmon" "yellowgreen" "darkorchid2"
-    "aquamarine4" "slateblue4" "slateblue1" "olivedrab1" "goldenrod4"
-    "goldenrod3" "cadetblue2" "burlywood1" "slategrey" "mistyrose"
-    "limegreen" "lightcyan" "goldenrod" "gainsboro" "skyblue1" "honeydew"
-    "yellow2" "tomato3" "skyblue" "purple4" "orange3" "bisque3" "bisque2"
-    "grey34" "gray99" "gray63" "gray44" "gray37" "gray33" "gray26" "azure1"
-    "snow4" "peru" "red" "lightgoldenrod4" "mediumseagreen" "blush"
-    "mediumorchid2" "lightskyblue1" "darkslateblue" "midnightblue"
-    "lightsalmon1" "lemonchiffon" "yellow" "lightsalmon" "coral"
-    "dodgerblue3" "darkorange4" "blue" "royalblue4" "red" "green" "cyan"
-    "darkviolet" "darksalmon" "darkorange" "blue" "pink" "magenta2"
-    "sienna4" "khaki2" "grey75" "grey74" "grey73" "grey69" "grey68" "grey35"
-    "grey13" "gray90" "gray81" "gray55" "gray51" "gray31" "snow2" "pink3"
-    "grey7" "gray1" "red4" "red3" "tan" "red" "yellow" "mediumvioletred"
-    "lightslategrey" "lavenderblush4" "turquoise" "darkturquoise"
-    "darkslategrey" "lightskyblue" "lightsalmon4" "lightsalmon3"
-    "forestgreen" "dodgerblue4" "orchid" "rosybrown4" "brown" "peachpuff3"
-    "palegreen3" "orangered2" "rose" "lightcyan4" "indianred4" "indianred3"
-    "seagreen2" "indianred" "deeppink1" "navyblue" "lavender" "grey"
-    "deeppink" "salmon4" "salmon3" "oldlace" "grey78" "grey77" "grey54"
-    "grey45" "grey21" "gray97" "gray96" "gray95" "gray88" "gray87" "gray86"
-    "gray70" "gray57" "gray38" "gray12" "gray11" "plum3" "linen" "gray9"
-    "gray8" "blue4" "beige" "turquoise" "blue" "lemonchiffon4"
-    "darkseagreen1" "antiquewhite3" "mediumorchid" "springgreen"
-    "turquoise4" "steelblue3" "mistyrose2" "lightcyan2" "red" "firebrick2"
-    "royalblue" "cadetblue" "skyblue3" "yellow3" "salmon1" "orange4"
-    "hotpink" "grey90" "gray56" "gray39" "gray18" "gray14" "plum4" "grey6"
-    "gray6" "gold3" "gold1" "blue2" "tan2" "cyan" "mediumspringgreen"
-    "darkolivegreen2" "goldenrod" "lightsteelblue" "brown" "whip"
-    "chartreuse3" "violetred4" "royalblue2" "royalblue1" "papayawhip"
-    "mistyrose3" "lightcyan1" "aquamarine" "skyblue4" "hotpink4" "hotpink3"
-    "hotpink2" "dimgray" "tomato" "grey66" "grey65" "grey64" "grey33"
-    "grey27" "gray76" "gray69" "gray68" "grey0" "azure" "green"
-    "darkgoldenrod4" "darkgoldenrod3" "darkgoldenrod2" "darkgoldenrod"
-    "brown" "lightsalmon2" "deepskyblue4" "deepskyblue3" "deepskyblue2"
-    "deepskyblue" "darkorange1" "violetred3" "violetred2" "violetred1"
-    "slateblue3" "slateblue2" "drab" "indianred1" "firebrick1" "cadetblue4"
-    "violetred" "rosybrown" "blue" "firebrick" "grey100" "wheat4" "grey79"
-    "grey76" "grey61" "gray93" "gray84" "gray65" "gray36" "gray32" "gray13"
-    "gray10" "azure3" "snow1" "tan1" "gray" "darkolivegreen1" "blue"
-    "almond" "lavenderblush3" "lavenderblush2" "lavenderblush1"
-    "darkolivegreen" "lavenderblush" "aquamarine2" "red" "olivedrab2"
-    "mistyrose4" "mistyrose1" "lightcyan3" "lightcoral" "chartreuse"
-    "peachpuff" "palegreen" "mintcream" "skyblue2" "moccasin" "tomato1"
-    "orchid3" "maroon3" "salmon" "grey81" "grey62" "grey39" "grey38"
-    "grey37" "gray92" "gray83" "gray66" "gray54" "gray50" "gray30" "gray19"
-    "gray15" "azure4" "grey3" "tan3" "pink" "gray" "blue" "lightsteelblue2"
-    "lightsteelblue1" "green" "lightslategray" "lemonchiffon2"
-    "springgreen1" "greenyellow" "chartreuse2" "grey" "royalblue3"
-    "powderblue" "peachpuff2" "palegreen2" "cream" "slateblue" "seashell2"
-    "deeppink2" "darkkhaki" "maroon4" "sienna" "grey71" "grey67" "grey18"
-    "gray59" "gray43" "gray25" "bisque" "red1" "mediumslateblue"
-    "lightgoldenrod1" "goldenrod" "paleturquoise3" "lightskyblue4" "green"
-    "yellow" "smoke" "blue" "white" "steelblue4" "rosybrown3" "peachpuff1"
-    "palegreen1" "blueviolet" "seashell4" "sienna3" "grey40" "gray91"
-    "gray82" "gray5" "cyan2" "cyan1" "blue1" "snow" "lightgoldenrod2"
-    "lightslateblue" "mediumorchid3" "darkseagreen4" "springgreen3" "green"
-    "slategray4" "slategray3" "slategray2" "blue" "peachpuff4" "palegreen4"
-    "green" "orangered3" "goldenrod1" "ghostwhite" "firebrick4" "firebrick3"
-    "cadetblue3" "slategray" "seashell3" "honeydew3" "cornsilk4" "cornsilk2"
-    "purple1" "dimgrey" "khaki1" "ivory3" "grey70" "grey60" "grey32"
-    "grey22" "grey12" "gray98" "gray89" "gray71" "gray64" "gray60" "gray49"
-    "azure2" "gray3" "paleturquoise1" "mediumpurple1" "purple"
-    "lemonchiffon1" "blue" "navajowhite3" "darkorchid1" "orange"
-    "goldenrod2" "khaki" "chocolate2" "burlywood2" "honeydew1" "darkgreen"
-    "thistle3" "thistle2" "thistle1" "thistle" "maroon2" "maroon1" "grey53"
-    "grey44" "grey25" "gray74" "gray45" "gray41" "gray35" "gray27" "gray23"
-    "gray16" "brown4" "wheat" "coral" "tan4" "lightgoldenrodyellow" "blue"
-    "green" "gray" "palevioletred3" "mediumpurple4" "mediumpurple3"
-    "saddlebrown" "blue" "darkorchid4" "darkorchid3" "puff" "olivedrab4"
-    "lightblue4" "lightpink" "lightgray" "honeydew2" "cornsilk1" "lace"
-    "sienna1" "bisque4" "orchid" "khaki3" "grey84" "grey83" "grey82"
-    "grey72" "grey52" "grey43" "grey26" "grey14" "grey10" "gray75" "gray53"
-    "gray21" "gray20" "brown3" "grey8" "red2" "navy" "grey" "gold"
-    "mediumaquamarine" "lightgoldenrod" "darkslategray4" "darkseagreen3"
-    "darkseagreen2" "antiquewhite4" "white" "springgreen4" "lightyellow4"
-    "white" "aquamarine1" "turquoise3" "steelblue2" "rosybrown2" "pink"
-    "gray" "indianred2" "dodgerblue" "green" "seagreen1" "deeppink4"
-    "aliceblue" "magenta1" "pink" "sienna2" "orchid1" "gray100" "grey97"
-    "grey94" "grey87" "grey86" "grey51" "grey42" "grey19" "gray94" "gray85"
-    "gray61" "brown2" "khaki" "grey1" "gold4" "blue" "green" "grey"
-    "turquoise" "paleturquoise" "mediumorchid4" "antiquewhite2"
-    "lightyellow2" "violet" "salmon" "chartreuse1" "turquoise1" "sandybrown"
-    "orangered1" "lightpink1" "lightblue2" "lightblue1" "grey" "seagreen4"
-    "seagreen3" "lightblue" "deeppink3" "burlywood" "seashell" "hotpink1"
-    "gray" "yellow4" "yellow" "purple" "orange" "ivory4" "grey99" "grey89"
-    "grey63" "grey58" "grey49" "grey31" "grey24" "grey20" "green4" "green1"
-    "gray73" "gray67" "coral3" "coral2" "plum2" "pink4" "ivory" "gray4"
-    "gray2" "gold2" "aquamarine" "grey" "lightgoldenrod3" "darkolivegreen3"
-    "darkgoldenrod1" "goldenrod" "orchid" "chiffon" "navajowhite4"
-    "deepskyblue1" "lightyellow" "floralwhite" "blue" "mediumblue"
-    "chocolate4" "chocolate3" "burlywood4" "turquoise" "steelblue" "green"
-    "lawngreen" "honeydew4" "seagreen" "orchid4" "wheat1" "violet" "ivory1"
-    "grey88" "grey85" "grey57" "grey56" "grey55" "grey48" "grey47" "grey46"
-    "grey30" "grey17" "gray47" "gray29" "pink2" "grey5" "grey4" "green"
-    "gray0" "brown" "lightsteelblue4" "darkolivegreen4" "palevioletred4"
-    "blue" "darkslategray3" "darkslategray2" "darkslategray1"
-    "blanchedalmond" "palegoldenrod" "blue" "lightseagreen" "lemonchiffon3"
-    "darkslategray" "green" "darkseagreen" "antiquewhite" "darkorange2"
-    "chartreuse4" "blue" "rosybrown1" "olivedrab3" "lightpink2" "orangered"
-    "thistle4" "blue" "cornsilk" "salmon2" "orchid2" "ivory2" "grey93"
-    "grey92" "grey91" "grey36" "grey29" "grey28" "grey16" "gray79" "gray78"
-    "gray77" "gray48" "gray17" "coral4" "coral1" "plum1" "pink1" "grey9"
-    "grey2" "gray7" "cyan4" "blue3" "plum" "cornflowerblue" "lightskyblue2"
-    "antiquewhite1" "navajowhite2" "navajowhite1" "lightyellow3"
-    "navajowhite" "darkorange3" "whitesmoke" "turquoise2" "steelblue1"
-    "lightpink4" "lightblue3" "green" "chocolate1" "blue" "olivedrab"
-    "lightgrey" "chocolate" "magenta4" "magenta3" "yellow1" "purple3"
-    "purple2" "orange2" "orange1" "magenta" "bisque1" "wheat2" "maroon"
-    "khaki4" "grey96" "grey95" "grey80" "grey50" "grey41" "grey15" "grey11"
-    "gray80" "gray58" "gray40" "gray34" "gray22" "brown1" "snow3"
-    "mediumturquoise" "lightsteelblue3" "palevioletred2" "palevioletred1"
-    "paleturquoise2" "green" "palevioletred" "mediumorchid1" "white"
-    "mediumpurple" "lightyellow1" "dodgerblue2" "dodgerblue1" "violet"
-    "aquamarine3" "slategray1" "gray" "orangered4" "lightpink3" "blue"
-    "darkorchid" "cadetblue1" "burlywood3" "seashell1" "cornsilk3" "tomato4"
-    "tomato2" "wheat3" "grey98" "grey59" "grey23" "green3" "green2" "gray72"
-    "gray62" "gray52" "gray46" "gray42" "gray28" "gray24" "white" "cyan3"
-    "black"))
-
-(defvar hproperty:color-ptr nil
-  "Pointer to current color name table to use for Hyperbole buttons in 
XEmacs.")
-
-(defconst hproperty:good-colors
-  '(
-    "medium violet red" "indianred4" "firebrick1" "DarkGoldenrod" "NavyBlue"
-    "darkorchid" "tomato3" "mediumseagreen" "deeppink" "forestgreen"
-    "mistyrose4" "slategrey" "purple4" "dodgerblue3" "mediumvioletred"
-    "lightsalmon3" "orangered2" "turquoise4" "Gray55"
-    )
-  "Good colors for contrast against wheat background and black foreground.")
-
-
-;;; ************************************************************************
-;;; Public functions
-;;; ************************************************************************
-
-(defun hproperty:cycle-but-color (&optional color)
-  "Switches button color to optional COLOR name or next item referenced by 
hproperty:color-ptr."
-  (interactive "sHyperbole button color: ")
-  (if (not (or (and (fboundp 'device-class) (eq (device-class) 'color))
-              (x-display-color-p)))
-      nil
-    (if color (setq hproperty:color-ptr nil))
-    (set-face-foreground
-     hproperty:but-face
-     (or color (car (hproperty:list-cycle
-                    hproperty:color-ptr hproperty:good-colors))))
-    (hproperty:set-flash-color)
-    (sit-for 0)  ;; Force display update
-    t))
-
-(defun hproperty:set-flash-color ()
-  "Set button flashing colors based upon current color set."
-  (if (not (x-display-color-p))
-      nil
-    (set-face-background hproperty:flash-face (hproperty:but-color))
-    (set-face-foreground hproperty:flash-face (hproperty:background))))
-
-(defun hproperty:but-flash ()
-  "Flash a XEmacs Hyperbole button at or near point to indicate selection."
-  (interactive)
-  (let ((ibut) (prev)
-       (start (hattr:get 'hbut:current 'lbl-start))
-       (end   (hattr:get 'hbut:current 'lbl-end))
-       (b) (a))
-    (if (and start end (setq prev (extent-at start)
-                            ibut t))
-       (progn (if (not prev) (hproperty:but-add start end hproperty:but-face))
-              (setq b (and start (extent-at start))))
-      (setq b (extent-at (point))))
-    (if (setq a (and (extentp b) (extent-face b)))
-       (unwind-protect
-           (progn
-             (set-extent-face b hproperty:flash-face)
-             (sit-for 0);; Force display update
-             ;; Delay before redraw button
-             (let ((i 0)) (while (< i hproperty:but-flash-time) (setq i (1+ 
i)))))
-         (set-extent-face b a)
-         (sit-for 0))) ;; Force display update
-    (if (and ibut (not prev)) (hproperty:but-delete start))))
-
-(defun hproperty:set-item-highlight (&optional background foreground)
-  "Setup or reset item highlight face using optional BACKGROUND and 
FOREGROUND."
-  (make-local-variable 'hproperty:item-face)
-  (if background (setq hproperty:item-highlight-color background))
-  (if (not hproperty:highlight-face)
-      (progn 
-       (setq hproperty:highlight-face
-             (or (find-face 'hproperty:highlight-face)
-                 (face-name
-                  (defface hproperty:highlight-face nil
-                    "Item highlighting face.  Use 
(hproperty:set-item-highlight) to set."))))
-       (set-face-foreground hproperty:highlight-face
-                            (or foreground (hproperty:background)))
-       (set-face-underline-p hproperty:highlight-face nil)))
-
-  (let* ((tty (and (fboundp 'device-type)
-                  (eq 'tty (device-type (selected-device)))))
-        (specifiers-function
-         (if (fboundp 'specifier-specs) 'specifier-specs 'identity))
-        (color-function
-         (if (fboundp 'color-name) 'color-name 'identity))
-        (update-hyrolo-highlight-flag
-         (and (boundp 'hyrolo-highlight-face) (find-face hyrolo-highlight-face)
-              (or (null 
-                   (funcall specifiers-function
-                            (face-foreground hyrolo-highlight-face)))
-                  (equal
-                   (funcall color-function
-                            (face-foreground hyrolo-highlight-face))
-                   (funcall color-function (face-foreground 'default)))
-                  (face-equal hproperty:highlight-face 
hyrolo-highlight-face)))))
-    (if tty
-       (copy-face 'italic 'hproperty:highlight-face)
-      (if (and (funcall specifiers-function
-                       (face-background hproperty:highlight-face))
-              (equal (funcall color-function
-                              (face-background hproperty:highlight-face))
-                     hproperty:item-highlight-color))
-         nil
-       (set-face-background hproperty:highlight-face
-                            hproperty:item-highlight-color))
-      (and background (not (equal (face-background
-                                  hproperty:highlight-face) background))
-          (set-face-background hproperty:highlight-face background))
-      (and foreground (not (equal (face-foreground
-                                  hproperty:highlight-face) foreground))
-          (set-face-foreground hproperty:highlight-face foreground)))
-    ;; If no colors are specified under InfoDock, use the default color
-    ;; scheme.
-    (or background foreground (not (fboundp 'id-set-face))
-       (id-set-face hproperty:highlight-face))
-    (setq hproperty:item-face hproperty:highlight-face)
-    (if update-hyrolo-highlight-flag
-       (if tty
-           (copy-face 'italic 'hyrolo-highlight-face)
-         (copy-face hproperty:highlight-face hyrolo-highlight-face)))))
-
-(defun hproperty:select-item (&optional pnt)
-  "Select item in current buffer at optional position PNT using 
hproperty:item-face."
-  (if hproperty:item-button
-      nil
-    (set-extent-face (setq hproperty:item-button (make-extent (point) (point)))
-                    hproperty:item-face))
-  (if pnt (goto-char pnt))
-  (skip-chars-forward " \t")
-  (skip-chars-backward "^ \t\n\r")
-  (let ((start (point)))
-    (save-excursion
-      (skip-chars-forward "^ \t\n\r")
-      (set-extent-endpoints hproperty:item-button start (point))))
-  ;; Force display update
-  (sit-for 0))
-
-(defun hproperty:select-line (&optional pnt)
-  "Select line in current buffer at optional position PNT using 
hproperty:item-face."
-  (if hproperty:item-button
-      nil
-    (set-extent-face (setq hproperty:item-button (make-extent (point) (point)))
-                    hproperty:item-face))
-  (if pnt (goto-char pnt))
-  (save-excursion
-    (beginning-of-line)
-    (set-extent-endpoints
-     hproperty:item-button (point) (progn (end-of-line) (point))))
-  ;; Force display update
-  (sit-for 0))
-
-;;; ************************************************************************
-;;; Private variables
-;;; ************************************************************************
-
-(defvar hproperty:but-face
-  (face-name (defface hproperty:but-face nil
-              "Face for hyper-buttons."))
-  "Face for hyper-buttons.")
-(setq hproperty:but hproperty:but-face)
-
-;; Init. files may set face properties, so run this after emacs initialization.
-(defun hproperty:set-face-after-init ()
-  (if (and (fboundp 'device-type)
-          (eq 'tty (device-type (selected-device))))
-      (copy-face 'italic 'hproperty:but-face)
-    (set-face-foreground hproperty:but-face (hproperty:but-color))
-    (set-face-background hproperty:but-face (hproperty:background))))
-(if after-init-time
-    (hproperty:set-face-after-init)
-  (add-hook 'after-init-hook #'hproperty:set-face-after-init))
-
-(defvar hproperty:flash-face
-  (face-name (defface hproperty:flash-face nil
-              "Face for flashing hyper-buttons."))
-  "Face for flashing hyper-buttons.")
-(hproperty:set-flash-color)
-
-(defvar hproperty:item-button nil
-  "Button used to highlight an item in a listing buffer.")
-(make-variable-buffer-local 'hproperty:item-button)
-
-(defvar hproperty:item-face nil
-  "Item marking face.")
-(or hproperty:item-face
-    (setq hproperty:item-face
-         (face-name (defface hproperty:item-face nil "Item marking face."))))
-
-(unless (boundp 'hproperty:highlight-face)
-(defvar hproperty:highlight-face nil
-  "Item highlighting face.  Use (hproperty:set-item-highlight) to set.")
-(if hproperty:highlight-face
-    nil
-  (setq hproperty:highlight-face
-       (face-name
-        (defface hproperty:highlight-face nil
-          "Item highlighting face.  Use (hproperty:set-item-highlight) to 
set.")))
-  ;; Reverse foreground and background colors for default block-style 
highlighting.
-  (hproperty:set-item-highlight (hproperty:foreground) 
(hproperty:background))))
-
-(provide 'hui-xe-but)
-
-
-;; Local Variables:
-;; no-byte-compile: t
-;; End:
-
-;;; hui-xe-but.el ends here
diff --git a/hversion.el b/hversion.el
index a346e49..91f8f9f 100644
--- a/hversion.el
+++ b/hversion.el
@@ -39,7 +39,7 @@ Use `hyperb:wsl-os-p' to test if running under WSL.")
 ;;;###autoload
 (defvar hyperb:mouse-buttons
   (if (or (and hyperb:microsoft-os-p (not (memq window-system '(w32 w64 x))))
-         (and (not (featurep 'xemacs)) (memq window-system '(ns dps))))
+         (memq window-system '(ns dps)))
       2 3)
   "Number of live buttons available on the mouse.
 Override this if the system-computed default is incorrect for your specific 
mouse.")
@@ -133,7 +133,7 @@ Where a part in the term-type is delimited by a `-' or  an 
`_'."
                          ;; then there is a window system to support.
                          (display-mouse-p))
                      ;; X11, macOS, NEXTSTEP (DPS), or OS/2 Presentation 
Manager (PM)
-                     (if (featurep 'xemacs) "xemacs" "emacs"))
+                     "emacs")
                     ((or (featurep 'eterm-fns)
                          (equal (getenv "TERM") "NeXT")
                          (equal (getenv "TERM") "eterm"))
diff --git a/hypb.el b/hypb.el
index 7ba68c9..f156592 100644
--- a/hypb.el
+++ b/hypb.el
@@ -444,13 +444,11 @@ then `locate-post-command-hook'."
 
 (defalias 'hypb:mark #'mark)
 
-(if (featurep 'xemacs)
-    (defalias 'hypb:mark-marker 'mark-marker)
-  (defun hypb:mark-marker (inactive-p)
-    "Return this buffer's mark as a marker object, or nil if no mark.
+(defun hypb:mark-marker (inactive-p)
+  "Return this buffer's mark as a marker object, or nil if no mark.
 INACTIVE-P is unused, it is for compatibility with XEmacs' version of
 mark-marker."
-    (mark-marker)))
+  (mark-marker))
 
 ;;;###autoload
 (defun hypb:map-plist (func plist)
@@ -684,14 +682,9 @@ nor nil it means to not count the minibuffer window even 
if it is active."
 
 (defvar hypb:hyperbole-banner-keymap
   (let ((map (make-sparse-keymap)))
-    (cond ((not (featurep 'xemacs))
-          (define-key map [mouse-1]  'hypb:browse-home-page)
-          (define-key map [mouse-2]  'hypb:browse-home-page)
-          (define-key map "\C-m"     'hypb:browse-home-page))
-         ((featurep 'xemacs)
-          (define-key map 'button1  'hypb:browse-home-page)
-          (define-key map 'button2  'hypb:browse-home-page)
-          (define-key map '(return) 'hypb:browse-home-page)))
+    (define-key map [mouse-1]  'hypb:browse-home-page)
+    (define-key map [mouse-2]  'hypb:browse-home-page)
+    (define-key map "\C-m"     'hypb:browse-home-page)
     map)
   "Keymap used when on the Hyperbole banner glyph.")
 
@@ -702,9 +695,7 @@ Without file, the banner is prepended to the current 
buffer."
   (if file
       ;; A stub for this function is defined in hversion.el when not running 
in InfoDock.
       (id-browse-file file))
-  (if (not (featurep 'xemacs))
-      (hypb:display-file-with-logo-emacs file)
-    (hypb:display-file-with-logo-xemacs file))
+  (hypb:display-file-with-logo-emacs file)
   (goto-char (point-min))
   (skip-syntax-forward "-")
   (set-window-start (selected-window) 1)
@@ -821,7 +812,7 @@ Without file, the banner is prepended to the current 
buffer."
 ;;; Private variables
 ;;; ************************************************************************
 
-(if (not (featurep 'xemacs)) (define-button-type 'hyperbole-banner))
+(define-button-type 'hyperbole-banner)
 
 (provide 'hypb)
 
diff --git a/hyrolo-menu.el b/hyrolo-menu.el
index 7b9af0f..24b8bd7 100644
--- a/hyrolo-menu.el
+++ b/hyrolo-menu.el
@@ -112,21 +112,15 @@
 ;;; Public functions
 ;;; ************************************************************************
 
-;;; This definition is used only by XEmacs and Emacs.
+;;; This definition is used only by Emacs.
 (defun hyrolo-menubar-menu ()
   "Add a HyRolo menu to the rolo match buffer menubar."
   (cond ((fboundp 'popup-mode-menu)
         (setq mode-popup-menu id-popup-hyrolo-menu))
-       ((featurep 'xemacs)
-        (define-key hyrolo-mode-map 'button3 'hyrolo-popup-menu))
-       (t ;; (not (featurep 'xemacs))
+       (t
         (define-key hyrolo-mode-map [C-down-mouse-3] 'hyrolo-popup-menu)
         (define-key hyrolo-mode-map [C-mouse-3] nil)))
-  (unless (cond ((not (featurep 'xemacs))
-                (global-key-binding [menu-bar Rolo]))
-               ((boundp 'current-menubar)
-                (car (find-menu-item current-menubar '("Rolo")))))
-    (if (featurep 'xemacs) (set-buffer-menubar (copy-sequence 
current-menubar)))
+  (unless (global-key-binding [menu-bar Rolo])
     (easy-menu-define nil hyrolo-mode-map "Rolo Menubar Menu" 
id-popup-hyrolo-menu)
     ;; Force a menu-bar update.
     (force-mode-line-update)))
diff --git a/hyrolo.el b/hyrolo.el
index 932f68b..741fdd8 100644
--- a/hyrolo.el
+++ b/hyrolo.el
@@ -4,7 +4,7 @@
 ;;
 ;; Orig-Date:     7-Jun-89 at 22:08:29
 ;;
-;; Copyright (C) 1991-2017  Free Software Foundation, Inc.
+;; Copyright (C) 1991-2019  Free Software Foundation, Inc.
 ;; See the "HY-COPY" file for license information.
 ;;
 ;; This file is part of GNU Hyperbole.
@@ -112,16 +112,10 @@ A hyrolo-file consists of:
   :group 'hyperbole-rolo)
 (unless hyrolo-highlight-face
   (setq hyrolo-highlight-face
-       (cond ((not (featurep 'xemacs))
-              (if (fboundp 'defface)
-                  (defface hyrolo-highlight-face nil
-                           "*Face used to highlight rolo search matches."
-                           :group 'hyperbole-rolo)))
-             (t (if (fboundp 'defface)
-                    (face-name
-                     (defface hyrolo-highlight-face nil
-                       "*Face used to highlight rolo search matches."
-                       :group 'hyperbole-rolo))))))
+       (if (fboundp 'defface)
+           (defface hyrolo-highlight-face nil
+             "*Face used to highlight rolo search matches."
+             :group 'hyperbole-rolo)))
   (if (fboundp 'hproperty:set-item-highlight)
       (hproperty:set-item-highlight)))
 
@@ -1425,11 +1419,7 @@ Returns point where matching entry begins or nil if not 
found."
 
 (defun hyrolo-to-buffer (buffer &optional other-window-flag frame)
   "Pop to BUFFER."
-  (cond ((featurep 'xemacs)
-        (pop-to-buffer buffer other-window-flag
-                       ;; default is to use selected frame
-                       (or frame (selected-frame))))
-       (t (pop-to-buffer buffer other-window-flag))))
+  (pop-to-buffer buffer other-window-flag))
 
 (defun hyrolo-to-entry-end (&optional include-sub-entries curr-entry-level)
   "Moves point to the end of the whole entry that point is within if optional 
INCLUDE-SUB-ENTRIES is non-nil.
diff --git a/hywconfig.el b/hywconfig.el
index a17c6cb..983a6f3 100644
--- a/hywconfig.el
+++ b/hywconfig.el
@@ -51,12 +51,6 @@
 (require 'ring)
 (require 'set)
 
-;; XEmacs compatibility
-(or (fboundp 'frame-parameter)
-    (fset 'frame-parameter 'frame-property))
-(or (fboundp 'set-frame-parameter)
-    (fset 'set-frame-parameter 'set-frame-property))
-
 ;;; ************************************************************************
 ;;; Public variables
 ;;; ************************************************************************
diff --git a/kotl/kmenu.el b/kotl/kmenu.el
index f72e666..99194c1 100644
--- a/kotl/kmenu.el
+++ b/kotl/kmenu.el
@@ -193,16 +193,10 @@
   "Add a Koutline menu to the menubar for each koutline buffer."
   (cond ((fboundp 'popup-mode-menu)
         (setq mode-popup-menu id-popup-kotl-menu))
-       ((featurep 'xemacs)
-        (define-key kotl-mode-map 'button3 'kotl-popup-menu))
-       (t ;; (not (featurep 'xemacs))
+       (t
         (define-key kotl-mode-map [C-down-mouse-3] 'kotl-popup-menu)
         (define-key kotl-mode-map [C-mouse-3] nil)))
-  (unless (cond ((not (featurep 'xemacs))
-                (global-key-binding [menu-bar Koutline]))
-               ((boundp 'current-menubar)
-                (car (find-menu-item current-menubar '("Koutline")))))
-    (if (featurep 'xemacs) (set-buffer-menubar (copy-sequence 
current-menubar)))
+  (unless (global-key-binding [menu-bar Koutline])
     (easy-menu-define nil kotl-mode-map "Koutline Menubar Menu" 
id-popup-kotl-menu)
     ;; Force a menu-bar update.
     (force-mode-line-update)))
diff --git a/kotl/kotl-mode.el b/kotl/kotl-mode.el
index 503b163..427d76d 100644
--- a/kotl/kotl-mode.el
+++ b/kotl/kotl-mode.el
@@ -4,7 +4,7 @@
 ;;
 ;; Orig-Date:    6/30/93
 ;;
-;; Copyright (C) 1993-2017  Free Software Foundation, Inc.
+;; Copyright (C) 1993-2019  Free Software Foundation, Inc.
 ;; See the "../HY-COPY" file for license information.
 ;;
 ;; This file is part of GNU Hyperbole.
@@ -219,10 +219,7 @@ Direction is determined from the value of 
`delete-key-deletes-forward' or
 whether the Backspace key exists on the keyboard.  If there is no Backspace
 key, the delete key should always delete backward one character."
   (interactive "*p")
-  (if (not (featurep 'xemacs))
-      (kotl-mode:delete-char (if normal-erase-is-backspace arg (- arg)) nil)
-    ;; XEmacs
-    (kotl-mode:delete-char (if (delete-forward-p) arg (- arg)) nil)))
+  (kotl-mode:delete-char (if normal-erase-is-backspace arg (- arg)) nil))
 
 (defun kotl-mode:center-line ()
   "Center the line point is on, within the width specified by `fill-column'.
@@ -1262,20 +1259,6 @@ doc string for `insert-for-yank-1', which see."
 (defalias 'kotl-mode:scroll-down-command 'kotl-mode:scroll-down)
 (defalias 'kotl-mode:scroll-up-command  'kotl-mode:scroll-up)
 
-;;; Cursor and keypad key functions aliases for XEmacs.
-(if (featurep 'xemacs)
-    (progn
-      (defalias 'kotl-mode:backward-char-command 'kotl-mode:backward-char)
-      (defalias 'kotl-mode:forward-char-command  'kotl-mode:forward-char)
-      (defalias 'kotl-mode:fkey-backward-char 'kotl-mode:backward-char)
-      (defalias 'kotl-mode:fkey-forward-char  'kotl-mode:forward-char)
-      (defalias 'kotl-mode:fkey-next-line     'kotl-mode:next-line)
-      (defalias 'kotl-mode:fkey-previous-line 'kotl-mode:previous-line)
-      (defalias 'kotl-mode:deprecated-scroll-down 'kotl-mode:scroll-down)
-      (defalias 'kotl-mode:deprecated-scroll-up 'kotl-mode:scroll-up)
-      (defalias 'kotl-mode:deprecated-bob     'kotl-mode:beginning-of-buffer)
-      (defalias 'kotl-mode:deprecated-eob     'kotl-mode:end-of-buffer)))
-
 (defun kotl-mode:back-to-indentation ()
   "Move point to the first non-read-only non-whitespace character on this 
line."
   (interactive)
diff --git a/kotl/kproperty.el b/kotl/kproperty.el
index 9b1e0e5..e1bec2d 100644
--- a/kotl/kproperty.el
+++ b/kotl/kproperty.el
@@ -4,7 +4,7 @@
 ;;
 ;; Orig-Date:    7/27/93
 ;;
-;; Copyright (C) 1993-2017  Free Software Foundation, Inc.
+;; Copyright (C) 1993-2019  Free Software Foundation, Inc.
 ;; See the "../HY-COPY" file for license information.
 ;;
 ;; This file is part of GNU Hyperbole.
@@ -19,9 +19,7 @@
 ;; Ensures kotl/ is in load-path.
 (require 'hyperbole)
 
-;; FIXME: Loading an Elisp file should always be harmless, so Emacs should be
-;; able to load *both* files and still work right!
-(load (if (not (featurep 'xemacs)) "kprop-em" "kprop-xe"))
+(load "kprop-em")
 
 (provide 'kproperty)
 
diff --git a/kotl/kview.el b/kotl/kview.el
index 3c108b5..47b0592 100644
--- a/kotl/kview.el
+++ b/kotl/kview.el
@@ -4,7 +4,7 @@
 ;;
 ;; Orig-Date:    6/30/93
 ;;
-;; Copyright (C) 1993-2017  Free Software Foundation, Inc.
+;; Copyright (C) 1993-2019  Free Software Foundation, Inc.
 ;; See the "../HY-COPY" file for license information.
 ;;
 ;; This file is part of GNU Hyperbole.
@@ -673,43 +673,25 @@ the lines displayed, since it has hidden branches."
   (save-excursion (and (kcell-view:next nil label-sep-len)
                       (kcell-view:invisible-p (point) label-sep-len))))
 
-(cond ((not (featurep 'xemacs))
-       (defun kview:goto-cell-id (id-string)
-        "Move point to start of cell with idstamp ID-STRING and return t, else 
nil."
-        (let ((cell-id (string-to-number id-string))
-              (opoint (point))
-              pos kcell)
-          (goto-char (point-min))
-          (while (and (setq pos (kproperty:next-single-change (point) 'kcell))
-                      (goto-char pos)
-                      (or (null (setq kcell (kproperty:get pos 'kcell)))
-                          (/= (kcell:idstamp kcell) cell-id))
-                      ;; Skip to the end of this kcell property
-                      (setq pos (kproperty:next-single-change (point) 'kcell))
-                      (goto-char pos)))
-          (if pos
-              (progn
-                (forward-char (kview:label-separator-length kview))
-                t)
-            (goto-char opoint)
-            nil))))
-      ;;
-      ;; XEmacs
-      (t (defun kview:goto-cell-id (id-string)
-          "Move point to start of cell with idstamp ID-STRING and return t, 
else nil."
-          (let ((cell-id (string-to-number id-string))
-                label-end kcell)
-            (setq label-end
-                  (map-extents
-                   (lambda (extent unused)
-                     (setq kcell (extent-property extent 'kcell))
-                     (and kcell (= (kcell:idstamp kcell) cell-id)
-                          (extent-end-position extent)))
-                   nil nil nil nil nil 'kcell))
-            (if (null label-end)
-                nil
-              (goto-char label-end)
-              t)))))
+(defun kview:goto-cell-id (id-string)
+  "Move point to start of cell with idstamp ID-STRING and return t, else nil."
+  (let ((cell-id (string-to-number id-string))
+       (opoint (point))
+       pos kcell)
+    (goto-char (point-min))
+    (while (and (setq pos (kproperty:next-single-change (point) 'kcell))
+               (goto-char pos)
+               (or (null (setq kcell (kproperty:get pos 'kcell)))
+                   (/= (kcell:idstamp kcell) cell-id))
+               ;; Skip to the end of this kcell property
+               (setq pos (kproperty:next-single-change (point) 'kcell))
+               (goto-char pos)))
+    (if pos
+       (progn
+         (forward-char (kview:label-separator-length kview))
+         t)
+      (goto-char opoint)
+      nil)))
 
 (defun kview:id-counter (kview)
   "Return the highest current idstamp (an integer) used by KVIEW."
diff --git a/kotl/kvspec.el b/kotl/kvspec.el
index 98dfc5f..b68cb7c 100644
--- a/kotl/kvspec.el
+++ b/kotl/kvspec.el
@@ -4,7 +4,7 @@
 ;;
 ;; Orig-Date:    21-Oct-95 at 15:17:07
 ;;
-;; Copyright (C) 1995-2017  Free Software Foundation, Inc.
+;; Copyright (C) 1995-2019  Free Software Foundation, Inc.
 ;; See the "../HY-COPY" file for license information.
 ;;
 ;; This file is part of GNU Hyperbole.
@@ -287,19 +287,7 @@ If NUM is greater than the number of lines available, the 
cell remains fully exp
                   (memq 'modeline-buffer-identification
                         mode-line-format))))
       (if elt
-         (setcdr elt (cons 'kvspec:string (cdr elt)))
-       ;;
-       ;; XEmacs 19.14 introduced extents into the modeline that we
-       ;; must work around.  Assume any XEmacs is at least that new.
-       (if (featurep 'xemacs)
-           (let ((mf modeline-format)
-                 elt)
-             (while mf
-               (setq elt (car mf))
-               (if (and (consp elt) (eq (cdr elt) 
'modeline-buffer-identification))
-                   (progn (setcdr mf (cons 'kvspec:string (cdr mf)))
-                          (setq mf nil)))
-               (setq mf (cdr mf)))))))))
+         (setcdr elt (cons 'kvspec:string (cdr elt)))))))
 
 (defun kvspec:update-view ()
   "Update view according to current setting of local `kvspec:current' 
variable."



reply via email to

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