X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/eb3fa2cfcfff550c08f5645c740608f97c2c949e..c5ca3aa00840c5dfa0aa7eeb8483ea077e5577bc:/lisp/mouse-drag.el diff --git a/lisp/mouse-drag.el b/lisp/mouse-drag.el index e3eada70d8..ac99a34e64 100644 --- a/lisp/mouse-drag.el +++ b/lisp/mouse-drag.el @@ -1,7 +1,6 @@ ;;; mouse-drag.el --- use mouse-2 to do a new style of scrolling -;; Copyright (C) 1996, 1997, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +;; Copyright (C) 1996-1997, 2001-2011 Free Software Foundation, Inc. ;; Author: John Heidemann ;; Keywords: mouse @@ -48,8 +47,7 @@ ;; for ``one-click text copy and move''. ;; ;; To use mouse-drag, place the following in your .emacs file: -;; (require 'mouse-drag) -;; -and either- +;; -either- ;; (global-set-key [down-mouse-2] 'mouse-drag-throw) ;; -or- ;; (global-set-key [down-mouse-2] 'mouse-drag-drag) @@ -164,7 +162,7 @@ Basically, we check for existing horizontal scrolling." mouse-drag-electric-col-scrolling (save-excursion ;; on a long line? (let - ((beg (progn (beginning-of-line) (point))) + ((beg (line-beginning-position)) (end (progn (end-of-line) (point)))) (if (> (- end beg) (window-width)) (setq truncate-lines t) @@ -187,7 +185,7 @@ If t, the scroll bar moves in the direction the mouse moves.") (if (< mouse-delta 0) -1 1) (if mouse-throw-with-scroll-bar 1 -1))) - +;;;###autoload (defun mouse-drag-throw (start-event) "\"Throw\" the page according to a mouse drag. @@ -254,6 +252,7 @@ To test this function, evaluate: ;; Now restore the old window. (select-window old-selected-window))) +;;;###autoload (defun mouse-drag-drag (start-event) "\"Drag\" the page according to a mouse drag. @@ -326,5 +325,4 @@ To test this function, evaluate: (provide 'mouse-drag) -;; arch-tag: e47354ff-82f5-42c4-b3dc-88dd9c04b770 ;;; mouse-drag.el ends here