* eshell/esh-util.el (eshell-under-xemacs-p): Remove.
authorDan Nicolaescu <dann@ics.uci.edu>
Sat, 17 Nov 2007 17:35:09 +0000 (17:35 +0000)
committerDan Nicolaescu <dann@ics.uci.edu>
Sat, 17 Nov 2007 17:35:09 +0000 (17:35 +0000)
* eshell/esh-mode.el (eshell-mode-syntax-table)
(command-running-p):
* eshell/esh-ext.el (eshell-external-command):
* eshell/esh-cmd.el (require):
* eshell/em-unix.el (eshell-plain-locate-behavior):
* eshell/em-cmpl.el (eshell-cmpl-initialize): Replace
eshell-under-xemacs-p with (featurep 'xemacs).
* eshell/esh-mode.el (characterp,char-int): Remove unused
conditional defaliases.

* pcomplete.el (pcomplete-event-matches-key-specifier-p): Rename
from event-matches-key-specifier-p, define unconditionally.
(event-basic-type): Remove unused defalias.
(pcomplete-show-completions):
Use pcomplete-event-matches-key-specifier-p.

* mh-e.el (mh-xemacs-flag): Remove.
(mh-min-colors-defined-flag):
* mh-xface.el (mh-show-xface-function):
* mh-utils.el (mh-colors-available-p):
* mh-show.el (mh-show-mode):
* mh-gnus.el (mh-gnus-local-map-property):
* mh-folder.el (mh-folder-mode-map)
(mh-remove-xemacs-horizontal-scrollbar, mh-folder-mode):
* mh-comp.el (mh-insert-x-mailer): Replace uses of mh-xemacs-flag
with (featurep 'xemacs).

16 files changed:
lisp/ChangeLog
lisp/eshell/em-cmpl.el
lisp/eshell/em-unix.el
lisp/eshell/esh-cmd.el
lisp/eshell/esh-ext.el
lisp/eshell/esh-mode.el
lisp/eshell/esh-util.el
lisp/mh-e/ChangeLog
lisp/mh-e/mh-comp.el
lisp/mh-e/mh-e.el
lisp/mh-e/mh-folder.el
lisp/mh-e/mh-gnus.el
lisp/mh-e/mh-show.el
lisp/mh-e/mh-utils.el
lisp/mh-e/mh-xface.el
lisp/pcomplete.el

index 635ec68..466e1d7 100644 (file)
@@ -1,3 +1,22 @@
+2007-11-17  Dan Nicolaescu  <dann@ics.uci.edu>
+
+       * eshell/esh-util.el (eshell-under-xemacs-p): Remove.
+       * eshell/esh-mode.el (eshell-mode-syntax-table)
+       (command-running-p):
+       * eshell/esh-ext.el (eshell-external-command):
+       * eshell/esh-cmd.el (require):
+       * eshell/em-unix.el (eshell-plain-locate-behavior):
+       * eshell/em-cmpl.el (eshell-cmpl-initialize): Replace
+       eshell-under-xemacs-p with (featurep 'xemacs).
+       * eshell/esh-mode.el (characterp,char-int): Remove unused
+       conditional defaliases.
+
+       * pcomplete.el (pcomplete-event-matches-key-specifier-p): Rename
+       from event-matches-key-specifier-p, define unconditionally.
+       (event-basic-type): Remove unused defalias.
+       (pcomplete-show-completions):
+       Use pcomplete-event-matches-key-specifier-p.
+
 2007-11-17  Eli Zaretskii  <eliz@gnu.org>
 
        * eshell/esh-module.el (eshell-load-defgroups): Don't make backups
index 7247033..8672885 100644 (file)
@@ -296,7 +296,7 @@ to writing a completion function."
   (define-key eshell-mode-map [tab] 'pcomplete)
   (define-key eshell-mode-map [(control ?i)] 'pcomplete)
   ;; jww (1999-10-19): Will this work on anything but X?
-  (if (eshell-under-xemacs-p)
+  (if (featurep 'xemacs)
       (define-key eshell-mode-map [iso-left-tab] 'pcomplete-reverse)
     (define-key eshell-mode-map [(shift iso-lefttab)] 'pcomplete-reverse)
     (define-key eshell-mode-map [(shift control ?i)] 'pcomplete-reverse))
index 9892307..dc5ef90 100644 (file)
@@ -78,7 +78,7 @@ receiving side of a command pipeline."
   :type 'boolean
   :group 'eshell-unix)
 
-(defcustom eshell-plain-locate-behavior (eshell-under-xemacs-p)
+(defcustom eshell-plain-locate-behavior (featurep 'xemacs)
   "*If non-nil, standalone \"locate\" commands will behave normally.
 Standalone in this context means not redirected, and not on the
 receiving side of a command pipeline."
index f999bdc..8738ceb 100644 (file)
@@ -222,7 +222,7 @@ return non-nil if the command is complex."
 ;;; Code:
 
 (require 'esh-util)
-(unless (eshell-under-xemacs-p)
+(unless (featurep 'xemacs)
   (require 'eldoc))
 (require 'esh-arg)
 (require 'esh-proc)
index 11090f9..7e3e8ac 100644 (file)
@@ -211,7 +211,7 @@ causing the user to wonder if anything's really going on..."
           (find-file-name-handler default-directory
                                   'shell-command))))
     (if (and handler
-            (not (and (eshell-under-xemacs-p)
+            (not (and (featurep 'xemacs)
                       (eq handler 'dired-handler-fn))))
        (eshell-remote-command handler command args))
     (let ((interp (eshell-find-interpreter command)))
index 1ac74f3..b30c1a8 100644 (file)
@@ -222,11 +222,6 @@ This is used by `eshell-watch-for-password-prompt'."
 
 (define-abbrev-table 'eshell-mode-abbrev-table ())
 
-(eval-when-compile
-  (unless (eshell-under-xemacs-p)
-    (defalias 'characterp 'ignore)
-    (defalias 'char-int 'ignore)))
-
 (if (not eshell-mode-syntax-table)
     (let ((i 0))
       (setq eshell-mode-syntax-table (make-syntax-table))
@@ -269,7 +264,7 @@ This is used by `eshell-watch-for-password-prompt'."
       (modify-syntax-entry ?\[ "(]  " eshell-mode-syntax-table)
       (modify-syntax-entry ?\] ")[  " eshell-mode-syntax-table)
       ;; All non-word multibyte characters should be `symbol'.
-      (if (eshell-under-xemacs-p)
+      (if (featurep 'xemacs)
          (map-char-table
           (function
            (lambda (key val)
@@ -467,7 +462,7 @@ This is used by `eshell-watch-for-password-prompt'."
 
 (eshell-deftest mode command-running-p
   "Modeline shows no command running"
-  (or (eshell-under-xemacs-p)
+  (or (featurep 'xemacs)
       (not eshell-status-in-modeline)
       (and (memq 'eshell-command-running-string mode-line-format)
           (equal eshell-command-running-string "--"))))
index 25afdc3..a0495a6 100644 (file)
@@ -139,10 +139,6 @@ function `string-to-number'."
 
 ;;; Functions:
 
-(defsubst eshell-under-xemacs-p ()
-  "Return non-nil if we are running under XEmacs."
-  (boundp 'xemacs-logo))
-
 (defsubst eshell-under-windows-p ()
   "Return non-nil if we are running under MS-DOS/Windows."
   (memq system-type '(ms-dos windows-nt)))
index 2619e20..25b8346 100644 (file)
@@ -1,3 +1,16 @@
+2007-11-17  Dan Nicolaescu  <dann@ics.uci.edu>
+
+       * mh-e.el (mh-xemacs-flag): Remove.
+       (mh-min-colors-defined-flag):
+       * mh-xface.el (mh-show-xface-function):
+       * mh-utils.el (mh-colors-available-p):
+       * mh-show.el (mh-show-mode):
+       * mh-gnus.el (mh-gnus-local-map-property):
+       * mh-folder.el (mh-folder-mode-map)
+       (mh-remove-xemacs-horizontal-scrollbar, mh-folder-mode):
+       * mh-comp.el (mh-insert-x-mailer): Replace uses of mh-xemacs-flag
+       with (featurep 'xemacs).
+
 2007-09-11  Bill Wohler  <wohler@newt.com>
 
        * mh-e.el (Version, mh-version): Add +cvs to version.
index bb2d150..2dcc3d5 100644 (file)
@@ -928,8 +928,8 @@ The versions of MH-E, Emacs, and MH are shown."
     (setq mh-x-mailer-string
           (format "MH-E %s; %s; %sEmacs %s"
                   mh-version mh-variant-in-use
-                  (if mh-xemacs-flag "X" "GNU ")
-                  (cond ((not mh-xemacs-flag)
+                  (if (featurep 'xemacs) "X" "GNU ")
+                  (cond ((not (featurep 'xemacs))
                          (string-match "[0-9]+\\.[0-9]+\\(\\.[0-9]+\\)?"
                                        emacs-version)
                          (match-string 0 emacs-version))
index faec4db..6945411 100644 (file)
 (require 'mh-buffers)
 (require 'mh-compat)
 
-(eval-and-compile
-  (defvar mh-xemacs-flag (featurep 'xemacs)
-    "Non-nil means the current Emacs is XEmacs."))
-
 (mh-do-in-xemacs
   (require 'mh-xemacs))
 
@@ -3398,7 +3394,7 @@ consumed by `defface-mh'.")
 The :inherit keyword is available on all supported versions of
 GNU Emacs and XEmacs from at least 21.5.23 on.")
 
-(defvar mh-min-colors-defined-flag (and (not mh-xemacs-flag)
+(defvar mh-min-colors-defined-flag (and (not (featurep 'xemacs))
                                         (>= emacs-major-version 22))
   "Non-nil means `defface' supports min-colors display requirement.")
 
index 75cebfe..bc15d3e 100644 (file)
@@ -351,7 +351,7 @@ annotation.")
   "\M-\t"       mh-prev-button)
 
 (cond
- (mh-xemacs-flag
+ ((featurep 'xemacs)
   (define-key mh-folder-mode-map [button2] 'mh-show-mouse))
  (t
   (define-key mh-folder-mode-map [mouse-2] 'mh-show-mouse)))
@@ -513,7 +513,7 @@ font-lock is done highlighting.")
 
 (defmacro mh-remove-xemacs-horizontal-scrollbar ()
   "Get rid of the horizontal scrollbar that XEmacs insists on putting in."
-  (when mh-xemacs-flag
+  (when (featurep 'xemacs)
     `(if (and (featurep 'scrollbar)
               (fboundp 'set-specifier))
          (set-specifier horizontal-scrollbar-visible-p nil
@@ -656,7 +656,7 @@ perform the operation on all messages in that region.
   (easy-menu-add mh-folder-folder-menu)
   (mh-inc-spool-make)
   (mh-set-help mh-folder-mode-help-messages)
-  (if (and mh-xemacs-flag
+  (if (and (featurep 'xemacs)
            font-lock-auto-fontify)
       (turn-on-font-lock)))             ; Force font-lock in XEmacs.
 
index 0624346..e099c2e 100644 (file)
@@ -41,7 +41,7 @@
 ;; Copy of function from gnus-util.el.
 (defun-mh mh-gnus-local-map-property gnus-local-map-property (map)
   "Return a list suitable for a text property list specifying keymap MAP."
-  (cond (mh-xemacs-flag (list 'keymap map))
+  (cond ((featurep 'xemacs) (list 'keymap map))
         ((>= emacs-major-version 21) (list 'keymap map))
         (t (list 'local-map map))))
 
index fd17110..c97715d 100644 (file)
@@ -872,7 +872,7 @@ See also `mh-folder-mode'.
     (mh-gnus-article-highlight-citation))
    (t
     (setq font-lock-defaults '(mh-show-font-lock-keywords t))))
-  (if (and mh-xemacs-flag
+  (if (and (featurep 'xemacs)
            font-lock-auto-fontify)
       (turn-on-font-lock))
   (when mh-decode-mime-flag
index 5b618e3..da2ace3 100644 (file)
@@ -67,7 +67,7 @@ used in lieu of `search' in the CL package."
 ;;;###mh-autoload
 (defun mh-colors-available-p ()
   "Check if colors are available in the Emacs being used."
-  (or mh-xemacs-flag
+  (or (featurep 'xemacs)
       (let ((color-cells (mh-display-color-cells)))
         (and (numberp color-cells) (>= color-cells 8)))))
 
index 8445cf3..a6a6efc 100644 (file)
@@ -36,7 +36,7 @@
 (autoload 'message-fetch-field "message")
 
 (defvar mh-show-xface-function
-  (cond ((and mh-xemacs-flag (locate-library "x-face") (not (featurep 'xface)))
+  (cond ((and (featurep 'xemacs) (locate-library "x-face") (not (featurep 'xface)))
          (load "x-face" t t)
          #'mh-face-display-function)
         ((>= emacs-major-version 21)
index 79b2698..62a7162 100644 (file)
@@ -944,17 +944,16 @@ generate the completions list.  This means that the hook
 ;; Abstractions so that the code below will work for both Emacs 20 and
 ;; XEmacs 21
 
-(unless (fboundp 'event-matches-key-specifier-p)
-  (defalias 'event-matches-key-specifier-p 'eq))
+(defalias 'pcomplete-event-matches-key-specifier-p
+  (if (featurep 'xemacs)
+      'event-matches-key-specifier-p
+  'eq))
 
 (defun pcomplete-read-event (&optional prompt)
   (if (fboundp 'read-event)
       (read-event prompt)
     (aref (read-key-sequence prompt) 0)))
 
-(unless (fboundp 'event-basic-type)
-  (defalias 'event-basic-type 'event-key))
-
 (defun pcomplete-show-completions (completions)
   "List in help buffer sorted COMPLETIONS.
 Typing SPC flushes the help buffer."
@@ -973,13 +972,13 @@ Typing SPC flushes the help buffer."
            (while (with-current-buffer (get-buffer "*Completions*")
                     (setq event (pcomplete-read-event)))
              (cond
-              ((event-matches-key-specifier-p event ?\s)
+              ((pcomplete-event-matches-key-specifier-p event ?\s)
                (set-window-configuration pcomplete-last-window-config)
                (setq pcomplete-last-window-config nil)
                (throw 'done nil))
-              ((or (event-matches-key-specifier-p event 'tab)
+              ((or (pcomplete-event-matches-key-specifier-p event 'tab)
                     ;; Needed on a terminal
-                    (event-matches-key-specifier-p event 9))
+                    (pcomplete-event-matches-key-specifier-p event 9))
                 (let ((win (or (get-buffer-window "*Completions*" 0)
                                (display-buffer "*Completions*"
                                                'not-this-window))))