- (unless (and (framep locale)
- (window-dedicated-p (frame-selected-window locale)))
- (when (specifier-instance default-gutter-visible-p locale)
- (unless (and gutter-buffers-tab
- (eq (default-gutter-position)
- gutter-buffers-tab-orientation))
- (add-tab-to-gutter))
- (when (valid-image-instantiator-format-p 'tab-control locale)
- (let ((inst (glyph-image-instance
- gutter-buffers-tab
- (when (framep frame-or-buffer)
- (last-nonminibuf-window frame-or-buffer)))))
- (set-image-instance-property inst :items
- (buffers-tab-items
- nil locale force-selection))))))))
-
-(defun remove-buffer-from-gutter-tab ()
- "Remove the current buffer from the tab control in the gutter area."
- (when (and (valid-image-instantiator-format-p 'tab-control)
- (specifier-instance default-gutter-visible-p))
- (let ((inst (glyph-image-instance gutter-buffers-tab))
- (buffers (buffers-tab-items t)))
- (unless buffers
- (setq buffers (build-buffers-tab-internal
- (list
- (get-buffer-create "*scratch*")))))
- (set-image-instance-property inst :items buffers))))
+ (unless (window-dedicated-p (frame-selected-window frame))
+ (when (specifier-instance default-gutter-visible-p frame)
+ (unless (and gutter-buffers-tab
+ (eq (default-gutter-position)
+ gutter-buffers-tab-orientation))
+ (add-tab-to-gutter))
+ (when (valid-image-instantiator-format-p 'tab-control frame)
+ (set-glyph-image
+ gutter-buffers-tab
+ (vector 'tab-control :descriptor "Buffers" :face buffers-tab-face
+ :orientation gutter-buffers-tab-orientation
+ (if (or (eq gutter-buffers-tab-orientation 'top)
+ (eq gutter-buffers-tab-orientation 'bottom))
+ :pixel-width :pixel-height)
+ (if (or (eq gutter-buffers-tab-orientation 'top)
+ (eq gutter-buffers-tab-orientation 'bottom))
+ '(gutter-pixel-width) '(gutter-pixel-height))
+ :properties
+ (list :items
+ (buffers-tab-items nil frame force-selection)))
+ frame)))))