diff lisp/subr.el @ 50136:ad28e7a35442

* files.el (recover-session): Error if there are no previous sessions to recover. * subr.el (posn-col-row): Simplify. * arc-mode.el (archive-subtype, archive-file-list-start) (archive-file-list-end, archive-proper-file-start) (archive-read-only, archive-local-name, archive-mode-map) (archive-file-name-indent, archive-remote) (archive-alternate-display, archive-superior-buffer) (archive-subfile-mode): Doc fixes.
author John Paul Wallington <jpw@pobox.com>
date Fri, 14 Mar 2003 22:36:57 +0000
parents 1b6393475a9b
children b040b4e36f5e
line wrap: on
line diff
--- a/lisp/subr.el	Fri Mar 14 22:29:13 2003 +0000
+++ b/lisp/subr.el	Fri Mar 14 22:36:57 2003 +0000
@@ -656,9 +656,7 @@
 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))
-	 (vspacing (or (frame-parameter (window-frame window) 'line-spacing)
-		       default-line-spacing)))
+	 (window (posn-window position)))
     (if (eq (if (consp (nth 1 position))
 		(car (nth 1 position))
 	      (nth 1 position))
@@ -672,7 +670,9 @@
 	(let* ((frame (if (framep window) window (window-frame window)))
 	       (x (/ (car pair) (frame-char-width frame)))
 	       (y (/ (cdr pair) (+ (frame-char-height frame)
-				   (or vspacing 0)))))
+				   (or (frame-parameter frame 'line-spacing)
+				       default-line-spacing
+				       0)))))
 	  (cons x y))))))
 
 (defsubst posn-timestamp (position)