I would like to sync the version of the pcl-cvs package bundled with
XEmacs with Stefan Monnier's latest 2.9.7 version. One minor obstacle
is that the newer versions of pcl-cvs.el use the function
`easy-mmode-define-minor-mode' to define the cvs-minor-mode. Now, this
function does not exist in XEmacs. The Pcl-CVS FAQ suggests using the
version of "easy-mmode.el" which comes with Emacs, but there are several
reasons why the XEmacs maintainers would prefer not having to drag
this file into the XEmacs "pcl-cvs" package.
Attached is a patch which uses the XEmacs `add-minor-mode' function to
set up the minor mode when in Emacs, and uses
`easy-mmode-define-minor-mode' otherwise.
Pending some feedback on this patch, I will make pcl-2.9.7 into an
XEmacs package, compatible with the new XEmacs package system.
pcl-cvs-2.9.7 can be gotten from
ftp://rum.cs.yale.edu/pub/monnier/pcl-cvs
you also need to get the "diff-mode.el" which has been split out from
pcl-cvs.
I would like any feedback from anybody who tries using this package
with XEmacs version 21.
--- pcl-cvs-2.9.7/pcl-cvs.el 1999/09/30 14:39:07 1.1
+++ pcl-cvs-2.9.7/pcl-cvs.el 1999/09/30 16:35:59
@@ -275,15 +275,38 @@
;;;;
-(easy-mmode-define-minor-mode
- cvs-minor-mode
- "
+;;; XEmacs change
+(if (null (boundp 'running-xemacs))
+ (defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version)))
+
+(if running-xemacs
+ (progn
+ (defvar cvs-minor-mode nil
+ "Non-nil when cvs mode is active.")
+ (defun cvs-minor-mode (arg)
+ "Toggle cvs-minor-mode.
+With ARG, turn cvs-minor-mode on if arg is positive, off otherwise.
This mode is used for buffers related to a main *cvs* buffer.
All the `cvs-mode' buffer operations are simply rebound under
the \\[cvs-mode-map] prefix.
"
- nil " CVS")
-(put 'cvs-minor-mode 'permanent-local t)
+ (interactive "P")
+ (make-local-variable 'cvs-minor-mode)
+ (setq cvs-minor-mode
+ (if (null arg)
+ (not cvs-minor-mode)
+ (> (prefix-numeric-value arg) 0)))
+ (redraw-modeline)
+ (add-minor-mode 'cvs-minor-mode "CVS")))
+
+ (easy-mmode-define-minor-mode
+ cvs-minor-mode
+ "This mode is used for buffers related to a main *cvs* buffer.
+All the `cvs-mode' buffer operations are simply rebound under
+the \\[cvs-mode-map] prefix.
+"
+ nil " CVS")
+ (put 'cvs-minor-mode 'permanent-local t))
(defvar cvs-temp-buffers nil)