changeset 86202:794e428cd497

* 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. * 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).
author Dan Nicolaescu <dann@ics.uci.edu>
date Sat, 17 Nov 2007 17:35:09 +0000
parents ea8415c6aa5b
children 9aea71efb681
files 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
diffstat 16 files changed, 55 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sat Nov 17 12:02:32 2007 +0000
+++ b/lisp/ChangeLog	Sat Nov 17 17:35:09 2007 +0000
@@ -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
--- a/lisp/eshell/em-cmpl.el	Sat Nov 17 12:02:32 2007 +0000
+++ b/lisp/eshell/em-cmpl.el	Sat Nov 17 17:35:09 2007 +0000
@@ -296,7 +296,7 @@
   (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))
--- a/lisp/eshell/em-unix.el	Sat Nov 17 12:02:32 2007 +0000
+++ b/lisp/eshell/em-unix.el	Sat Nov 17 17:35:09 2007 +0000
@@ -78,7 +78,7 @@
   :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."
--- a/lisp/eshell/esh-cmd.el	Sat Nov 17 12:02:32 2007 +0000
+++ b/lisp/eshell/esh-cmd.el	Sat Nov 17 17:35:09 2007 +0000
@@ -222,7 +222,7 @@
 ;;; Code:
 
 (require 'esh-util)
-(unless (eshell-under-xemacs-p)
+(unless (featurep 'xemacs)
   (require 'eldoc))
 (require 'esh-arg)
 (require 'esh-proc)
--- a/lisp/eshell/esh-ext.el	Sat Nov 17 12:02:32 2007 +0000
+++ b/lisp/eshell/esh-ext.el	Sat Nov 17 17:35:09 2007 +0000
@@ -211,7 +211,7 @@
 	   (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)))
--- a/lisp/eshell/esh-mode.el	Sat Nov 17 12:02:32 2007 +0000
+++ b/lisp/eshell/esh-mode.el	Sat Nov 17 17:35:09 2007 +0000
@@ -222,11 +222,6 @@
 
 (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 @@
       (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 @@
 
 (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 "--"))))
--- a/lisp/eshell/esh-util.el	Sat Nov 17 12:02:32 2007 +0000
+++ b/lisp/eshell/esh-util.el	Sat Nov 17 17:35:09 2007 +0000
@@ -139,10 +139,6 @@
 
 ;;; 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)))
--- a/lisp/mh-e/ChangeLog	Sat Nov 17 12:02:32 2007 +0000
+++ b/lisp/mh-e/ChangeLog	Sat Nov 17 17:35:09 2007 +0000
@@ -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.
--- a/lisp/mh-e/mh-comp.el	Sat Nov 17 12:02:32 2007 +0000
+++ b/lisp/mh-e/mh-comp.el	Sat Nov 17 17:35:09 2007 +0000
@@ -928,8 +928,8 @@
     (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))
--- a/lisp/mh-e/mh-e.el	Sat Nov 17 12:02:32 2007 +0000
+++ b/lisp/mh-e/mh-e.el	Sat Nov 17 17:35:09 2007 +0000
@@ -99,10 +99,6 @@
 (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 @@
 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.")
 
--- a/lisp/mh-e/mh-folder.el	Sat Nov 17 12:02:32 2007 +0000
+++ b/lisp/mh-e/mh-folder.el	Sat Nov 17 17:35:09 2007 +0000
@@ -351,7 +351,7 @@
   "\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 @@
 
 (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 @@
   (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.
 
--- a/lisp/mh-e/mh-gnus.el	Sat Nov 17 12:02:32 2007 +0000
+++ b/lisp/mh-e/mh-gnus.el	Sat Nov 17 17:35:09 2007 +0000
@@ -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))))
 
--- a/lisp/mh-e/mh-show.el	Sat Nov 17 12:02:32 2007 +0000
+++ b/lisp/mh-e/mh-show.el	Sat Nov 17 17:35:09 2007 +0000
@@ -872,7 +872,7 @@
     (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
--- a/lisp/mh-e/mh-utils.el	Sat Nov 17 12:02:32 2007 +0000
+++ b/lisp/mh-e/mh-utils.el	Sat Nov 17 17:35:09 2007 +0000
@@ -67,7 +67,7 @@
 ;;;###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)))))
 
--- a/lisp/mh-e/mh-xface.el	Sat Nov 17 12:02:32 2007 +0000
+++ b/lisp/mh-e/mh-xface.el	Sat Nov 17 17:35:09 2007 +0000
@@ -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)
--- a/lisp/pcomplete.el	Sat Nov 17 12:02:32 2007 +0000
+++ b/lisp/pcomplete.el	Sat Nov 17 17:35:09 2007 +0000
@@ -944,17 +944,16 @@
 ;; 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 @@
 	    (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))))