Path: utzoo!attcan!uunet!decwrl!ucbvax!ALEXANDER.BBN.COM!gildea From: gildea@ALEXANDER.BBN.COM (Stephen Gildea) Newsgroups: comp.emacs Subject: Re: Problem with setting mouse-map keys in .emacs file Message-ID: <9007121808.AA27328@life.ai.mit.edu> Date: 12 Jul 90 18:07:53 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 26 > I've been having a problem when trying to define keys in the > mouse-map for X. Terminal- and window-system-dependent code is loaded conditionally at run-time after your .emacs is read. Thus the variables are you are trying to set in .emacs haven't been defined yet. The solution is to do your customization in a function attached to window-setup-hook. (For ordinary terminals, use term-setup-hook.) I do something like this: (if (eq window-system 'x) (setq window-setup-hook '(lambda () (define-key mouse-map x-button-s-left 'x-mouse-set-mark) (define-key mouse-map x-button-s-middle 'x-copy-moused-sexp) (define-key mouse-map x-button-s-right 'x-cut-and-wipe-text)))) < Stephen Bolt Beranek and Newman Inc. gildea@bbn.com Cambridge, Massachusetts What in heaven's name brought you to Casablana? My health. I came to Casablana for the waters. Waters? What waters? We're in the desert. I was misinformed.