changeset 8426:3abe02e03dc8

Capitalize some error messages. (mouse-set-point): Nice error if button release is in scrollbar.
author Richard M. Stallman <rms@gnu.org>
date Tue, 02 Aug 1994 21:59:19 +0000
parents 8b8835f1630a
children bc548090f760
files lisp/mouse.el
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mouse.el	Tue Aug 02 21:01:04 1994 +0000
+++ b/lisp/mouse.el	Tue Aug 02 21:59:19 1994 +0000
@@ -93,7 +93,7 @@
 	  (first-line window-min-height)
 	  (last-line (- (window-height) window-min-height)))
       (if (< last-line first-line)
-	  (error "window too short to split")
+	  (error "Window too short to split")
 	(split-window-vertically
 	 (min (max new-height first-line) last-line))))))
 
@@ -109,7 +109,7 @@
 	  (first-col window-min-width)
 	  (last-col (- (window-width) window-min-width)))
       (if (< last-col first-col)
-	  (error "window too narrow to split")
+	  (error "Window too narrow to split")
 	(split-window-horizontally
 	 (min (max new-width first-col) last-col))))))
 
@@ -121,6 +121,8 @@
   ;; Use event-end in case called from mouse-drag-region.
   ;; If EVENT is a click, event-end and event-start give same value.
   (let ((posn (event-end event)))
+    (if (not (windowp (posn-window posn)))
+	(error "Cursor not in text area of window"))
     (select-window (posn-window posn))
     (if (numberp (posn-point posn))
 	(goto-char (posn-point posn)))))