changeset 7693:5fcf0620b8d3

(posn-col-row): Test for consp, not symbolp.
author Karl Heuer <kwzh@gnu.org>
date Thu, 26 May 1994 21:53:37 +0000
parents ce33fcd2ce22
children 92a4522c37fc
files lisp/subr.el
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/subr.el	Thu May 26 20:35:55 1994 +0000
+++ b/lisp/subr.el	Thu May 26 21:53:37 1994 +0000
@@ -421,7 +421,7 @@
   (nth 2 position))
 
 (defun posn-col-row (position)
-  "Return the row and column in POSITION, measured in characters.
+  "Return the column and row in POSITION, measured in characters.
 POSITION should be a list of the form
    (WINDOW BUFFER-POSITION (X . Y) TIMESTAMP)
 as returned by the `event-start' and `event-end' functions.
@@ -429,12 +429,14 @@
 corresponds to the vertical position of the click in the scroll bar."
   (let ((pair   (nth 2 position))
 	(window (posn-window position)))
-    (if (eq (if (symbolp (nth 1 position)) (nth 1 position)
-	      (car (nth 1 position)))
+    (if (eq (if (consp (nth 1 position))
+		(car (nth 1 position))
+	      (nth 1 position))
 	    'vertical-scroll-bar)
 	(cons 0 (scroll-bar-scale pair (1- (window-height window))))
-      (if (eq (if (symbolp (nth 1 position)) (nth 1 position)
-		(car (nth 1 position)))
+      (if (eq (if (consp (nth 1 position))
+		  (car (nth 1 position))
+		(nth 1 position))
 	      'horizontal-scroll-bar)
 	  (cons (scroll-bar-scale pair (window-width window)) 0)
 	(let* ((frame (if (framep window) window (window-frame window)))