[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mouse-wheel mode (and probably other stuff) broken due to use of glo
From: |
Pavel Janík |
Subject: |
Re: mouse-wheel mode (and probably other stuff) broken due to use of global-map |
Date: |
Sun, 24 Mar 2002 19:26:47 +0100 |
User-agent: |
Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2.50 (i386-suse-linux-gnu) |
From: "Stefan Monnier" <monnier+gnu/address@hidden>
Date: Thu, 21 Mar 2002 11:54:23 -0500
> > - (define-key global-map key 'mwheel-scroll))
> > - ((eq (lookup-key global-map key) 'mwheel-scroll)
> > - (define-key global-map key nil))))
> > + (define-key (current-global-map) key 'mwheel-scroll))
> > + ((eq (lookup-key (current-global-map) key)
'mwheel-scroll)
> > + (define-key (current-global-map) key nil))))
> > (error nil))))
>
> I'd use `global-set-key' since that's what it's for after all.
Yes. Can anyone test the following change?
--- mwheel.el.~1.11.~ Sun Mar 24 15:52:02 2002
+++ mwheel.el Sun Mar 24 19:25:25 2002
@@ -169,9 +169,9 @@
(condition-case ()
(dolist (key keys)
(cond (mouse-wheel-mode
- (define-key (current-global-map) key 'mwheel-scroll))
+ (global-set-key key 'mwheel-scroll))
((eq (lookup-key (current-global-map) key) 'mwheel-scroll)
- (define-key (current-global-map) key nil))))
+ (global-unset-key key))))
(error nil))))
;;; Compatibility entry point
--
Pavel Janík
That's the problem: pretesters aren't finding many more bugs nowadays,
so it'll probably take until 2005 to find and fix enough bugs that we
can comfortably announce the code stable.
-- Stefan Monnier in comp.emacs