]> git.eshelyaron.com Git - emacs.git/commitdiff
* subr.el (posn-point): Properly extract the BUFFER-POSITION field
authorJim Blandy <jimb@redhat.com>
Mon, 5 Jul 1993 04:33:42 +0000 (04:33 +0000)
committerJim Blandy <jimb@redhat.com>
Mon, 5 Jul 1993 04:33:42 +0000 (04:33 +0000)
of an event when read-key-sequence has placed it in a singleton
list.

lisp/subr.el

index 23e9da8459216d7669d1251cf5302840c7b3be53..76593de4870776bfd8c6d15e109e65eb69bbce9b 100644 (file)
@@ -359,7 +359,9 @@ as returned by the `event-start' and `event-end' functions."
 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.