/etc/skel/.emacs is used by both GNU Emacs and XEmacs, and it contains: (setq-default transient-mark-mode t) However, transient-mark-mode has no meaning on XEmacs, and several elisp modes use that to determine their behaviour. For example, JDE's auto-javadoccing (C-c C-v j) breaks with .java source files on XEmacs if transient-mark-mode is bound. Please change that line to be skipped on XEmacs, like: (cond ((not running-xemacs) (setq-default transient-mark-mode t) )) Thanks.
Thanks for the report: ok, sounds like a valid point to me. (Of course determining the flavour of emacs with transient-mark-mode sounds like a no-no to me, but anyway...)
Actually, the (X)Emacs flavour is not detected with transient-mark-mode, but the behaviour of the mode. Detecting a flavour would be *bad* indeed. But for an example, see tempo.el in XEmacs packages [1]. The code there just seems to do the right thing, but this bug just screws it... [1] <http://cvs.xemacs.org/viewcvs.cgi/XEmacs/packages/xemacs-packages/edit-utils/tempo.el?rev=1.2&content-type=text/vnd.viewcvs-markup>
Hmmm, (if (or (and (boundp 'transient-mark-mode) ; For Emacs transient-mark-mode mark-active) (and (boundp 'zmacs-regions) ; For XEmacs zmacs-regions (mark))) (setq on-region t)) I guess it would be better if the code additionally tested for Emacs and XEmacs explicitly.
Maybe, until some beautiful day transient-mark-mode and friends exist in XEmacs and zmacs-regions doesn't (unlikely), and stuff breaks again... :) Or vice versa for GNU Emacs.
Should be fixed in the next package release. Thanks.
Forget to say the fix is in emacs-21.2-19 and later.
Just checked out emacs-21.2-20 source RPM, and it looks to me that the fix went in upside down, it should be (notice the *not*): (if (not running-xemacs) (setq-default transient-mark-mode t))
Argg, thanks for spotting that. Fix should get into 21.2-22 or later.
Update is in emacs-21.2-23. Btw I'm thinking to add a ".xemacs/init.el" skel file to the xemacs package soon.
Verified, thanks. And .xemacs/init.el, perhaps also .xemacs/custom.el (btw, be sure to put defcustom'able stuff into the latter) sounds like a good idea to me.