Mercurial > hg > xemacs-beta
comparison lisp/gutter-items.el @ 430:a5df635868b2 r21-2-23
Import from CVS: tag r21-2-23
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:29:08 +0200 |
parents | 3ecd8885ac67 |
children | 84b14dcb0985 |
comparison
equal
deleted
inserted
replaced
429:8305706cbb93 | 430:a5df635868b2 |
---|---|
203 It dynamically creates a list of buffers to use as the contents of the tab. | 203 It dynamically creates a list of buffers to use as the contents of the tab. |
204 Only the most-recently-used few buffers will be listed on the tab, for | 204 Only the most-recently-used few buffers will be listed on the tab, for |
205 efficiency reasons. You can control how many buffers will be shown by | 205 efficiency reasons. You can control how many buffers will be shown by |
206 setting `buffers-tab-max-size'. You can control the text of the tab | 206 setting `buffers-tab-max-size'. You can control the text of the tab |
207 items by redefining the function `format-buffers-menu-line'." | 207 items by redefining the function `format-buffers-menu-line'." |
208 (let* ((buffers (delete-if buffers-tab-omit-function (buffer-list frame))) | 208 (save-match-data |
209 (first-buf (car buffers))) | 209 (let* ((buffers (delete-if buffers-tab-omit-function (buffer-list frame))) |
210 ;; if we're in deletion ignore the current buffer | 210 (first-buf (car buffers))) |
211 (when in-deletion | 211 ;; if we're in deletion ignore the current buffer |
212 (setq buffers (delq (current-buffer) buffers)) | 212 (when in-deletion |
213 (setq first-buf (car buffers))) | 213 (setq buffers (delq (current-buffer) buffers)) |
214 ;; group buffers by mode | 214 (setq first-buf (car buffers))) |
215 (when buffers-tab-selection-function | 215 ;; group buffers by mode |
216 (delete-if-not #'(lambda (buf) | 216 (when buffers-tab-selection-function |
217 (funcall buffers-tab-selection-function | 217 (delete-if-not #'(lambda (buf) |
218 first-buf buf)) buffers)) | 218 (funcall buffers-tab-selection-function |
219 (and (integerp buffers-tab-max-size) | 219 first-buf buf)) buffers)) |
220 (> buffers-tab-max-size 1) | 220 (and (integerp buffers-tab-max-size) |
221 (> (length buffers) buffers-tab-max-size) | 221 (> buffers-tab-max-size 1) |
222 ;; shorten list of buffers | 222 (> (length buffers) buffers-tab-max-size) |
223 (setcdr (nthcdr buffers-tab-max-size buffers) nil)) | 223 ;; shorten list of buffers |
224 (setq buffers (build-buffers-tab-internal buffers)) | 224 (setcdr (nthcdr buffers-tab-max-size buffers) nil)) |
225 buffers)) | 225 (setq buffers (build-buffers-tab-internal buffers)) |
226 buffers))) | |
226 | 227 |
227 (defun add-tab-to-gutter () | 228 (defun add-tab-to-gutter () |
228 "Put a tab control in the gutter area to hold the most recent buffers." | 229 "Put a tab control in the gutter area to hold the most recent buffers." |
229 (let ((gutter-string "")) | 230 (let ((gutter-string "")) |
230 (set-extent-begin-glyph | 231 (set-extent-begin-glyph |