(mouse-start-end): For double click with START on openparen,
[bpt/emacs.git] / lisp / mouse.el
index a92cb74..64f1889 100644 (file)
@@ -288,12 +288,16 @@ If DIR is positive skip forward; if negative, skip backward."
         (list start end))
         ((and (= mode 1)
               (= start end)
-             (not (eobp))
+             (char-after start)
               (= (char-syntax (char-after start)) ?\())
-        (list start (save-excursion (forward-sexp 1) (point))))
+        (list start
+              (save-excursion
+                (goto-char start)
+                (forward-sexp 1)
+                (point))))
         ((and (= mode 1)
               (= start end)
-             (not (eobp))
+             (char-after start)
               (= (char-syntax (char-after start)) ?\)))
         (list (save-excursion 
                 (goto-char (1+ start))