+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
(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))
: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."
;;; Code:
(require 'esh-util)
-(unless (eshell-under-xemacs-p)
+(unless (featurep 'xemacs)
(require 'eldoc))
(require 'esh-arg)
(require 'esh-proc)
(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)))
(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))
(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)
(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 "--"))))
;;; 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)))
+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.
(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))
(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))
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.")
"\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)))
(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
(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.
;; 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))))
(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
;;;###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)))))
(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)
;; 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."
(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))))