changeset 3991:ad2bd545983e

* subr.el (posn-point): Properly extract the BUFFER-POSITION field of an event when read-key-sequence has placed it in a singleton list.
author Jim Blandy <jimb@redhat.com>
date Mon, 05 Jul 1993 04:33:42 +0000
parents 8ef557c6a30a
children cb593618786e
files lisp/subr.el
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/subr.el	Mon Jul 05 04:26:30 1993 +0000
+++ b/lisp/subr.el	Mon Jul 05 04:33:42 1993 +0000
@@ -359,7 +359,9 @@
 POSITION should be a list of the form
    (WINDOW BUFFER-POSITION (COL . ROW) TIMESTAMP)
 as returned by the `event-start' and `event-end' functions."
-  (nth 1 position))
+  (if (consp (nth 1 position))
+      (car (nth 1 position))
+    (nth 1 position)))
 
 (defsubst posn-col-row (position)
   "Return the row and column in POSITION.