comparison lisp/term/w32-win.el @ 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 ce0c926022b3
children e0a03741d896
comparison
equal deleted inserted replaced
42541:8c7aa169a6ae 42542:691ca802270d
74 (require 'mouse) 74 (require 'mouse)
75 (require 'scroll-bar) 75 (require 'scroll-bar)
76 (require 'faces) 76 (require 'faces)
77 (require 'select) 77 (require 'select)
78 (require 'menu-bar) 78 (require 'menu-bar)
79 (if (fboundp 'new-fontset) 79 (require 'fontset)
80 (require 'fontset)) 80
81 81 ;; The following definition is used for debugging scroll bar events.
82 ;; Because Windows scrollbars look and act quite differently compared
83 ;; with the standard X scroll-bars, we don't try to use the normal
84 ;; scroll bar routines.
85
86 (defun w32-handle-scroll-bar-event (event)
87 "Handle W32 scroll bar EVENT to do normal Window style scrolling."
88 (interactive "e")
89 (let ((old-window (selected-window)))
90 (unwind-protect
91 (let* ((position (event-start event))
92 (window (nth 0 position))
93 (portion-whole (nth 2 position))
94 (bar-part (nth 4 position)))
95 (save-excursion
96 (select-window window)
97 (cond
98 ((eq bar-part 'up)
99 (goto-char (window-start window))
100 (scroll-down 1))
101 ((eq bar-part 'above-handle)
102 (scroll-down))
103 ((eq bar-part 'handle)
104 (scroll-bar-maybe-set-window-start event))
105 ((eq bar-part 'below-handle)
106 (scroll-up))
107 ((eq bar-part 'down)
108 (goto-char (window-start window))
109 (scroll-up 1))
110 )))
111 (select-window old-window))))
112
113 ;; The following definition is used for debugging.
114 ;(defun w32-handle-scroll-bar-event (event) (interactive "e") (princ event)) 82 ;(defun w32-handle-scroll-bar-event (event) (interactive "e") (princ event))
115
116 (global-set-key [vertical-scroll-bar mouse-1] 'w32-handle-scroll-bar-event)
117
118 ;; (scroll-bar-mode nil)
119 83
120 (defvar mouse-wheel-scroll-amount 4 84 (defvar mouse-wheel-scroll-amount 4
121 "*Number of lines to scroll per click of the mouse wheel.") 85 "*Number of lines to scroll per click of the mouse wheel.")
122 86
123 (defun mouse-wheel-scroll-line (event) 87 (defun mouse-wheel-scroll-line (event)