summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1994-05-26 21:53:37 +0000
committerKarl Heuer <kwzh@gnu.org>1994-05-26 21:53:37 +0000
commitdbbcac56124849f326378a30ee68c9d9e0f2d33b (patch)
treed57f4663d84d90abd057fbaff718df75928ce014 /lisp
parent348ec811717c276a3da4f9225e0c6d5493c7e364 (diff)
downloademacs-dbbcac56124849f326378a30ee68c9d9e0f2d33b.tar.gz
(posn-col-row): Test for consp, not symbolp.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/subr.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 6665bcd05f7..9df68710c2c 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -421,7 +421,7 @@ as returned by the `event-start' and `event-end' functions."
(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 @@ For a scroll-bar event, the result column is 0, and the row
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)))