Mercurial > hg > xemacs-beta
comparison lisp/modes/list-mode.el @ 70:131b0175ea99 r20-0b30
Import from CVS: tag r20-0b30
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:02:59 +0200 |
parents | 56c54cf7c5b6 |
children | 360340f9fd5f |
comparison
equal
deleted
inserted
replaced
69:804d1389bcd6 | 70:131b0175ea99 |
---|---|
111 (interactive "p") | 111 (interactive "p") |
112 (next-list-mode-item (- n))) | 112 (next-list-mode-item (- n))) |
113 | 113 |
114 (defun next-list-mode-item (n) | 114 (defun next-list-mode-item (n) |
115 "Move to the next item in list-mode. | 115 "Move to the next item in list-mode. |
116 With prefix argument N, move N items (negative N means move backward)." | 116 WIth prefix argument N, move N items (negative N means move backward)." |
117 (interactive "p") | 117 (interactive "p") |
118 (while (and (> n 0) (not (eobp))) | 118 (while (and (> n 0) (not (eobp))) |
119 (let ((prop (get-char-property (point) 'list-mode-item)) | 119 (let ((prop (get-char-property (point) 'list-mode-item)) |
120 (end (point-max))) | 120 (end (point-max))) |
121 ;; If in a completion, move to the end of it. | 121 ;; If in a completion, move to the end of it. |
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. | |
163 (let ((point (event-closest-point event))) | 162 (let ((point (event-closest-point event))) |
164 (if point | 163 (list-mode-item-selected-1 (extent-at point |
165 (list-mode-item-selected-1 (extent-at point | 164 (event-buffer event) |
166 (event-buffer event) | 165 'list-mode-item nil 'at) |
167 'list-mode-item nil 'at) | 166 event))) |
168 event) | |
169 (ding)))) | |
170 | 167 |
171 (defun add-list-mode-item (start end &optional buffer activate-callback | 168 (defun add-list-mode-item (start end &optional buffer activate-callback |
172 user-data) | 169 user-data) |
173 "Add a new list item in list-mode, from START to END in BUFFER. | 170 "Add a new list item in list-mode, from START to END in BUFFER. |
174 BUFFER defaults to the current buffer. | 171 BUFFER defaults to the current buffer. |
191 | 188 |
192 ;; Define the major mode for lists of completions. | 189 ;; Define the major mode for lists of completions. |
193 | 190 |
194 | 191 |
195 (defvar completion-highlight-first-word-only nil | 192 (defvar completion-highlight-first-word-only nil |
196 "*Completion will only highlight the first blank delimited word if t. | 193 "*Completion will only hightlight the first blank delimited word if t. |
197 If the variable in not t or nil, the string is taken as a regexp to match for end | 194 If the variable in not t or nil, the string is taken as a regexp to match for end |
198 of highlight") | 195 of highlight") |
199 | 196 |
200 (defvar completion-setup-hook nil | 197 (defvar completion-setup-hook nil |
201 "Normal hook run at the end of setting up the text of a completion buffer.") | 198 "Normal hook run at the end of setting up the text of a completion buffer.") |