Mercurial > emacs
changeset 42542:691ca802270d
Require fontset unconditionally.
(w32-handle-scroll-bar-event): Remove, since default scroll bar
behaviour is now the same as what Windows users expect.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Sat, 05 Jan 2002 00:23:42 +0000 |
parents | 8c7aa169a6ae |
children | 7820162c77dd |
files | lisp/term/w32-win.el |
diffstat | 1 files changed, 2 insertions(+), 38 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/term/w32-win.el Sat Jan 05 00:17:40 2002 +0000 +++ b/lisp/term/w32-win.el Sat Jan 05 00:23:42 2002 +0000 @@ -76,47 +76,11 @@ (require 'faces) (require 'select) (require 'menu-bar) -(if (fboundp 'new-fontset) - (require 'fontset)) - -;; Because Windows scrollbars look and act quite differently compared -;; with the standard X scroll-bars, we don't try to use the normal -;; scroll bar routines. +(require 'fontset) -(defun w32-handle-scroll-bar-event (event) - "Handle W32 scroll bar EVENT to do normal Window style scrolling." - (interactive "e") - (let ((old-window (selected-window))) - (unwind-protect - (let* ((position (event-start event)) - (window (nth 0 position)) - (portion-whole (nth 2 position)) - (bar-part (nth 4 position))) - (save-excursion - (select-window window) - (cond - ((eq bar-part 'up) - (goto-char (window-start window)) - (scroll-down 1)) - ((eq bar-part 'above-handle) - (scroll-down)) - ((eq bar-part 'handle) - (scroll-bar-maybe-set-window-start event)) - ((eq bar-part 'below-handle) - (scroll-up)) - ((eq bar-part 'down) - (goto-char (window-start window)) - (scroll-up 1)) - ))) - (select-window old-window)))) - -;; The following definition is used for debugging. +;; The following definition is used for debugging scroll bar events. ;(defun w32-handle-scroll-bar-event (event) (interactive "e") (princ event)) -(global-set-key [vertical-scroll-bar mouse-1] 'w32-handle-scroll-bar-event) - -;; (scroll-bar-mode nil) - (defvar mouse-wheel-scroll-amount 4 "*Number of lines to scroll per click of the mouse wheel.")