help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pasting from Emacs to Mozilla in Mandrake


From: Dan Anderson
Subject: Re: Pasting from Emacs to Mozilla in Mandrake
Date: Thu, 30 Oct 2003 10:34:37 -0500

        In mandrake, during installation, you should have been asked to confirm
what kind of mouse you were using.  Then you got to test it out, hit all
the buttons, and confirm it's the right configuration.  (If you choose
the wrong one the mouse cursor does weird things -- like move to the
upper right corner no matter what direction you move the mouse).

        If you want to retry the mouse configuration wizard, go under the
mandrake control center, under hardware, and click on MouseDrake.  Or,
if you are on a box without X, type # drakconf as root to bring up the
text based version of drakconf.

        If you get everything working, you are going to need to grab some LISP
for your .emacs to get the middle mouse button to scroll in emacs.  I
use:

;; BEGIN LISP
;; The following is code I got off of the net which is used to 
;; scroll the mouse wheel up or down by 2 lines.  Modify the 
;; scroll-up or scroll-down to modify the number of scrolls..

(defun sd-mousewheel-scroll-up (event)
  "Scroll window under mouse up by two lines."
  (interactive "e")
  (let ((current-window (selected-window)))
    (unwind-protect
        (progn 
          (select-window (posn-window (event-start event)))
          (scroll-up 2)) ;; change the 2 to change # scrolls
      (select-window current-window))))

(defun sd-mousewheel-scroll-down (event)
  "Scroll window under mouse down by two lines."
  (interactive "e")
  (let ((current-window (selected-window)))
    (unwind-protect
        (progn 
          (select-window (posn-window (event-start event)))
          (scroll-down 2)) ;; change the 2 to change # scrolls
      (select-window current-window))))

(global-set-key (kbd "<mouse-5>") 'sd-mousewheel-scroll-up)
(global-set-key (kbd "<mouse-4>") 'sd-mousewheel-scroll-down)

;; END LISP

I have been told that there is an easier way to do scroll ups.  Perhaps
somebody else on the list can chip in.

-Dan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]