Bug 75440 - transient-mark-mode harmful in XEmacs
transient-mark-mode harmful in XEmacs
Product: Red Hat Linux
Classification: Retired
Component: emacs (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jens Petersen
Jay Turner
Depends On:
Blocks: 77696
  Show dependency treegraph
Reported: 2002-10-08 12:41 EDT by Ville Skyttä
Modified: 2015-01-07 19:00 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-11-28 03:13:17 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ville Skyttä 2002-10-08 12:41:34 EDT
/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)

Comment 1 Jens Petersen 2002-10-27 10:18:00 EST
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...)
Comment 2 Ville Skyttä 2002-10-27 10:27:38 EST
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...

Comment 3 Jens Petersen 2002-10-27 11:58:21 EST

	(if (or (and (boundp 'transient-mark-mode) ; For Emacs
		(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.
Comment 4 Ville Skyttä 2002-10-27 12:43:49 EST
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.
Comment 5 Jens Petersen 2002-10-30 18:18:43 EST
Should be fixed in the next package release.  Thanks.
Comment 6 Jens Petersen 2002-11-17 21:34:44 EST
Forget to say the fix is in emacs-21.2-19 and later.
Comment 7 Ville Skyttä 2002-11-21 14:54:28 EST
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))
Comment 8 Jens Petersen 2002-11-22 01:26:19 EST
Argg, thanks for spotting that. Fix should get into 21.2-22 or later.
Comment 9 Jens Petersen 2002-11-28 03:13:03 EST
Update is in emacs-21.2-23.

Btw I'm thinking to add a ".xemacs/init.el"
skel file to the xemacs package soon.
Comment 10 Ville Skyttä 2002-12-04 13:53:55 EST
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.

Note You need to log in before you can comment on or make changes to this bug.