comparison 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
comparison
equal deleted inserted replaced
123:c77884c6318d 124:9b50b4588a93
156 'list-mode-item nil 'at) 156 'list-mode-item nil 'at)
157 nil)) 157 nil))
158 158
159 (defun list-mode-item-mouse-selected (event) 159 (defun list-mode-item-mouse-selected (event)
160 (interactive "e") 160 (interactive "e")
161 ;; #### sometimes event-closest-point returns nil. 161 ;; Sometimes event-closest-point returns nil.
162 ;; So beep instead of bombing.
162 (let ((point (event-closest-point event))) 163 (let ((point (event-closest-point event)))
163 (list-mode-item-selected-1 (extent-at point 164 (if point
164 (event-buffer event) 165 (list-mode-item-selected-1 (extent-at point
165 'list-mode-item nil 'at) 166 (event-buffer event)
166 event))) 167 'list-mode-item nil 'at)
168 event)
169 (ding))))
167 170
168 (defun add-list-mode-item (start end &optional buffer activate-callback 171 (defun add-list-mode-item (start end &optional buffer activate-callback
169 user-data) 172 user-data)
170 "Add a new list item in list-mode, from START to END in BUFFER. 173 "Add a new list item in list-mode, from START to END in BUFFER.
171 BUFFER defaults to the current buffer. 174 BUFFER defaults to the current buffer.