unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Pavel@Janik.cz (Pavel Janík)
Cc: Tim Van Holder <tim.vanholder@anubex.com>,
	rms@gnu.org, emacs-devel@gnu.org
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	[thread overview]
Message-ID: <m3zo0xg6u0.fsf@Janik.cz> (raw)
In-Reply-To: <200203211654.g2LGsNG17870@rum.cs.yale.edu> ("Stefan Monnier"'s message of "Thu, 21 Mar 2002 11:54:23 -0500")

   From: "Stefan Monnier" <monnier+gnu/emacs@RUM.cs.yale.edu>
   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

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


  reply	other threads:[~2002-03-24 18:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m3wuxbrvgl.fsf@bender.falconsoft.be>
     [not found] ` <200203160639.g2G6dVk07398@wijiji.santafe.edu>
     [not found]   ` <3C972B46.2040604@anubex.com>
2002-03-21  9:03     ` mouse-wheel mode (and probably other stuff) broken due to use of global-map Richard Stallman
2002-03-21 11:21       ` Tim Van Holder
2002-03-21 16:54         ` Stefan Monnier
2002-03-24 18:26           ` Pavel Janík [this message]
2002-03-24 21:24             ` Colin Walters
2002-03-25 10:58             ` Tim Van Holder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3zo0xg6u0.fsf@Janik.cz \
    --to=pavel@janik.cz \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    --cc=tim.vanholder@anubex.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).