 
 ;;; Code:
 
+(defvar p4-running-xemacs (featurep 'xemacs))
+(defvar p4-running-emacs (not (featurep 'xemacs)))
+
 (defvar p4-emacs-version "10.6" "The Current P4-Emacs Integration Revision.")
-
-;; Find out what type of emacs we are running in. We will be using this
-;; quite a few times in this program.
-(eval-and-compile
-  (defvar p4-running-emacs nil
-    "If the current Emacs is not XEmacs, then, this is non-nil.")
-  (defvar p4-running-xemacs nil
-    "If the current Emacs is XEmacs/Lucid, then, this is non-nil.")
-  (if (string-match "XEmacs\\|Lucid" emacs-version)
-      (setq p4-running-xemacs t)
-    (setq p4-running-emacs t)))
-
-;; Pick up a couple of missing function defs
-(if p4-running-xemacs
-    (eval-when-compile
-      (require 'timer)
-      (require 'dired)))
 
 (defvar p4-emacs-maintainer
   "p4.el maintainers <p4el-bugs@lists.sourceforge.net>"

Argument P4-EXE-NAME The new value of the p4 executable, with full path."
    (interactive "fFull path to your P4 executable: " )
    (setq p4-executable p4-exe-name)
    p4-executable))

;; The kill-buffer hook for p4.
(defun p4-kill-buffer-hook ()

	   (easy-menu-add (p4-mode-menu "P4"))))
    t)

(defun p4-help-text (cmd text)
    (if cmd
	(let ((buf (generate-new-buffer p4-output-buffer-name))
	      (help-text ""))
