diff lisp/modes/list-mode.el @ 124:9b50b4588a93 r20-1b15

Import from CVS: tag r20-1b15
author cvs
date Mon, 13 Aug 2007 09:26:39 +0200
parents 360340f9fd5f
children
line wrap: on
line diff
--- a/lisp/modes/list-mode.el	Mon Aug 13 09:26:04 2007 +0200
+++ b/lisp/modes/list-mode.el	Mon Aug 13 09:26:39 2007 +0200
@@ -158,12 +158,15 @@
 
 (defun list-mode-item-mouse-selected (event)
   (interactive "e")
-  ;; #### sometimes event-closest-point returns nil.
+  ;; Sometimes event-closest-point returns nil.
+  ;; So beep instead of bombing.
   (let ((point (event-closest-point event)))
-    (list-mode-item-selected-1 (extent-at point
-					  (event-buffer event)
-					  'list-mode-item nil 'at)
-			       event)))
+    (if point
+	(list-mode-item-selected-1 (extent-at point
+					      (event-buffer event)
+					      'list-mode-item nil 'at)
+				   event)
+      (ding))))
 
 (defun add-list-mode-item (start end &optional buffer activate-callback
 				 user-data)