[1806] in testers
7.3(F) Emacs
daemon@ATHENA.MIT.EDU (daemon@ATHENA.MIT.EDU)
Wed Aug 7 17:01:52 1991
From: ckclark@ATHENA.MIT.EDU
Date: Wed, 7 Aug 91 17:01:38 -0400
To: vanharen@ATHENA.MIT.EDU
Cc: testers@ATHENA.MIT.EDU
In-Reply-To: vanharen@ATHENA.MIT.EDU's message of Wed, 7 Aug 91 00:38:20 -0400 <9108070438.AA05828@fries.MIT.EDU>
Reply-To: ckclark@mit.edu
>>>>> On Wed, 7 Aug 91 00:38:20 -0400, vanharen@ATHENA.MIT.EDU said:
vanharen> More "error in init file" problems...
vanharen> These lines, in your .emacs file, will cause an error
vanharen> if you start up emacs on a non-X display (ie. dialup),
vanharen> or if DISPLAY is not set:
vanharen> (require 'x-mouse)
vanharen> (define-key mouse-map x-button-right-up 'x-mouse-set-mark)
You're right. The proper way to do it is to wrap all of your x-mouse
dependent code in a test to see if you are connected to an X server or
not. The variable window-system-version will be set to 11 if you have
successfully connected to an X server; otherwise it will be set to nil.
For example:
(if window-system-version
(progn
(require 'x-mouse)
(define-key mouse-map x-button-right-up 'x-mouse-set-mark)))
I will submit a change for the release notes documenting this.
-Calvin