annotate lisp/gutter-items.el @ 428:3ecd8885ac67 r21-2-22

Import from CVS: tag r21-2-22
author cvs
date Mon, 13 Aug 2007 11:28:15 +0200
parents
children a5df635868b2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 ;;; gutter-items.el --- Gutter content for XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 ;; Copyright (C) 1999 Free Software Foundation, Inc.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 ;; Copyright (C) 1999 Andy Piper.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 ;; Maintainer: XEmacs Development Team
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 ;; Keywords: frames, extensions, internal, dumped
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 ;; This file is part of XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 ;; XEmacs is free software; you can redistribute it and/or modify it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 ;; under the terms of the GNU General Public License as published by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 ;; the Free Software Foundation; either version 2, or (at your option)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 ;; any later version.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 ;; XEmacs is distributed in the hope that it will be useful, but
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 ;; General Public License for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 ;; You should have received a copy of the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 ;; along with Xmacs; see the file COPYING. If not, write to the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 ;; Free Software Foundation, 59 Temple Place - Suite 330,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24 ;; Boston, MA 02111-1307, USA.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 ;; Some of this is taken from the buffer-menu stuff in menubar-items.el
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 ;; and the custom specs in toolbar.el.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29 (defgroup gutter nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 "Input from the gutters."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 :group 'environment)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 (defcustom gutter-visible-p
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 (specifier-instance default-gutter-visible-p)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 "Whether the default gutter is globally visible. This option can be
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 customized through the options menu."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 :group 'display
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 :type 'boolean
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 :set #'(lambda (var val)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 (set-specifier default-gutter-visible-p val)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 (setq gutter-visible-p val)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 (defcustom default-gutter-position
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 (default-gutter-position)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 "The location of the default gutter. It can be 'top, 'bottom, 'left or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 'right. This option can be customized through the options menu."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 :group 'display
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 :type '(choice (const :tag "top" 'top)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 (const :tag "bottom" 'bottom)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 (const :tag "left" 'left)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 (const :tag "right" 'right))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 :set #'(lambda (var val)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 (set-default-gutter-position val)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 (setq default-gutter-position val)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 ;;; The Buffers tab
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 (defgroup buffers-tab nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 "Customization of `Buffers' tab."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60 :group 'gutter)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 (defvar gutter-buffers-tab nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 "A tab widget in the gutter for displaying buffers.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 Do not set this. Use `glyph-image-instance' and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 `set-image-instance-property' to change the properties of the tab.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 (defcustom buffers-tab-max-size 6
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 "*Maximum number of entries which may appear on the \"Buffers\" tab.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 If this is 10, then only the ten most-recently-selected buffers will be
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 shown. If this is nil, then all buffers will be shown. Setting this to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 a large number or nil will slow down tab responsiveness."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 :type '(choice (const :tag "Show all" nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 (integer 6))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 :group 'buffers-tab)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 (defcustom buffers-tab-switch-to-buffer-function 'buffers-tab-switch-to-buffer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 "*The function to call to select a buffer from the buffers tab.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 `switch-to-buffer' is a good choice, as is `pop-to-buffer'."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 :type '(radio (function-item switch-to-buffer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 (function-item pop-to-buffer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 (function :tag "Other"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 :group 'buffers-tab)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 (defcustom buffers-tab-omit-function 'buffers-menu-omit-invisible-buffers
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 "*If non-nil, a function specifying the buffers to omit from the buffers tab.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86 This is passed a buffer and should return non-nil if the buffer should be
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 omitted. The default value `buffers-tab-omit-invisible-buffers' omits
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 buffers that are normally considered \"invisible\" (those whose name
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 begins with a space)."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 :type '(choice (const :tag "None" nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 function)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 :group 'buffers-tab)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 (defcustom buffers-tab-selection-function 'select-buffers-tab-buffers-by-mode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 "*If non-nil, a function specifying the buffers to select from the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 buffers tab. This is passed two buffers and should return non-nil if
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 the second buffer should be selected. The default value
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 `select-buffers-tab-buffers-by-mode' groups buffers by major mode and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 by `buffers-tab-grouping-regexp'."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 :type '(choice (const :tag "None" nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 function)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 :group 'buffers-tab)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 (defcustom buffers-tab-face 'default
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 "*Face to use for displaying the buffers tab."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107 :type 'face
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 :group 'buffers-tab)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110 (defcustom buffers-tab-grouping-regexp
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 '("^\\(gnus-\\|message-mode\\|mime/viewer-mode\\)"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 "^\\(emacs-lisp-\\|lisp-\\)")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 "*If non-nil, a list of regular expressions for buffer grouping.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 Each regular expression is applied to the current major-mode symbol
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 name and mode-name, if it matches then any other buffers that match
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116 the same regular expression be added to the current group."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 :type '(choice (const :tag "None" nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 sexp)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 :group 'buffers-tab)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 (defcustom buffers-tab-format-buffer-line-function 'format-buffers-tab-line
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 "*The function to call to return a string to represent a buffer in the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 buffers tab. The function is passed a buffer and should return a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 string. The default value `format-buffers-tab-line' just returns the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 name of the buffer, optionally truncated to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 `buffers-tab-max-buffer-line-length'. Also check out
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 `slow-format-buffers-menu-line' which returns a whole bunch of info
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128 about a buffer."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129 :type 'function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 :group 'buffers-tab)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 (defvar buffers-tab-default-buffer-line-length
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133 (make-specifier-and-init 'generic '((global ((default) . 25))) t)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134 "*Maximum length of text which may appear in a \"Buffers\" tab.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135 This is a specifier, use set-specifier to modify it.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137 (defcustom buffers-tab-max-buffer-line-length
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138 (specifier-instance buffers-tab-default-buffer-line-length)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139 "*Maximum length of text which may appear in a \"Buffers\" tab.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140 Buffer names over this length will be truncated with elipses.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141 If this is 0, then the full buffer name will be shown."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142 :type '(choice (const :tag "Show all" 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143 (integer 25))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144 :group 'buffers-tab
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 :set #'(lambda (var val)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146 (set-specifier buffers-tab-default-buffer-line-length val)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147 (setq buffers-tab-max-buffer-line-length val)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149 (defun buffers-tab-switch-to-buffer (buffer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150 "For use as a value for `buffers-tab-switch-to-buffer-function'."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151 (unless (eq (window-buffer) buffer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152 (if (> (length (windows-of-buffer buffer)) 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153 (select-window (car (windows-of-buffer buffer)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
154 (switch-to-buffer buffer t))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156 (defun select-buffers-tab-buffers-by-mode (buf1 buf2)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157 "For use as a value of `buffers-tab-selection-function'.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158 This selects buffers by major mode `buffers-tab-grouping-regexp'."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159 (let ((mode1 (symbol-name (symbol-value-in-buffer 'major-mode buf1)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160 (mode2 (symbol-name (symbol-value-in-buffer 'major-mode buf2)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161 (modenm1 (symbol-value-in-buffer 'mode-name buf1))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162 (modenm2 (symbol-value-in-buffer 'mode-name buf2)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163 (cond ((or (eq mode1 mode2)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164 (eq modenm1 modenm2)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165 (and (string-match "^[^-]+-" mode1)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 (string-match
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167 (concat "^" (regexp-quote
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168 (substring mode1 0 (match-end 0))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169 mode2))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170 (and buffers-tab-grouping-regexp
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171 (find-if #'(lambda (x)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172 (or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173 (and (string-match x mode1)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174 (string-match x mode2))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
175 (and (string-match x modenm1)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
176 (string-match x modenm2))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177 buffers-tab-grouping-regexp)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
178 t)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179 (t nil))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 (defun format-buffers-tab-line (buffer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182 "For use as a value of `buffers-tab-format-buffer-line-function'.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
183 This just returns the buffer's name, optionally truncated."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
184 (let ((len (specifier-instance buffers-tab-default-buffer-line-length)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
185 (if (and (> len 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
186 (> (length (buffer-name buffer)) len))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
187 (concat (substring (buffer-name buffer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188 0 (- len 3)) "...")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
189 (buffer-name buffer))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191 (defsubst build-buffers-tab-internal (buffers)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192 (let (line)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193 (mapcar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194 #'(lambda (buffer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195 (setq line (funcall buffers-tab-format-buffer-line-function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196 buffer))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197 (vector line (list buffers-tab-switch-to-buffer-function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
198 (buffer-name buffer))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199 buffers)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201 (defun buffers-tab-items (&optional in-deletion frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 "This is the tab filter for the top-level buffers \"Buffers\" tab.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203 It dynamically creates a list of buffers to use as the contents of the tab.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 Only the most-recently-used few buffers will be listed on the tab, for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205 efficiency reasons. You can control how many buffers will be shown by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206 setting `buffers-tab-max-size'. You can control the text of the tab
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207 items by redefining the function `format-buffers-menu-line'."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
208 (let* ((buffers (delete-if buffers-tab-omit-function (buffer-list frame)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
209 (first-buf (car buffers)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
210 ;; if we're in deletion ignore the current buffer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
211 (when in-deletion
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
212 (setq buffers (delq (current-buffer) buffers))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
213 (setq first-buf (car buffers)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214 ;; group buffers by mode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
215 (when buffers-tab-selection-function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216 (delete-if-not #'(lambda (buf)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217 (funcall buffers-tab-selection-function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218 first-buf buf)) buffers))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
219 (and (integerp buffers-tab-max-size)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
220 (> buffers-tab-max-size 1)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
221 (> (length buffers) buffers-tab-max-size)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
222 ;; shorten list of buffers
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
223 (setcdr (nthcdr buffers-tab-max-size buffers) nil))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224 (setq buffers (build-buffers-tab-internal buffers))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225 buffers))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
226
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227 (defun add-tab-to-gutter ()
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228 "Put a tab control in the gutter area to hold the most recent buffers."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
229 (let ((gutter-string ""))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
230 (set-extent-begin-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
231 (make-extent 0 0 gutter-string)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
232 (setq gutter-buffers-tab
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
233 (make-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
234 (vector 'tab-control :descriptor "Buffers" :face buffers-tab-face
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
235 :properties (list :items (buffers-tab-items))))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
236 ;; This looks better than a 3d border
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
237 (mapcar '(lambda (x)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238 (when (valid-image-instantiator-format-p 'tab-control x)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
239 (set-specifier default-gutter-border-width 0 'global x)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240 (set-specifier default-gutter gutter-string 'global x)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
241 (console-type-list))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
243 (defun update-tab-in-gutter (&optional frame-or-buffer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244 "Update the tab control in the gutter area."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
245 (let ((locale (if (framep frame-or-buffer) frame-or-buffer)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
246 (when (specifier-instance default-gutter-visible-p locale)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
247 (unless gutter-buffers-tab
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
248 (add-tab-to-gutter))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
249 (when (valid-image-instantiator-format-p 'tab-control)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
250 (let ((inst (glyph-image-instance
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
251 gutter-buffers-tab
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252 (when (framep frame-or-buffer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
253 (last-nonminibuf-window frame-or-buffer)))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
254 (set-image-instance-property inst :items
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
255 (buffers-tab-items
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
256 nil locale))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
257 (resize-subwindow inst (gutter-pixel-width) nil))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
258 ))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
259
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
260 (defun remove-buffer-from-gutter-tab ()
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
261 "Remove the current buffer from the tab control in the gutter area."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
262 (when (and (valid-image-instantiator-format-p 'tab-control)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
263 (specifier-instance default-gutter-visible-p))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
264 (let ((inst (glyph-image-instance gutter-buffers-tab))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
265 (buffers (buffers-tab-items t)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
266 (unless buffers
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
267 (setq buffers (build-buffers-tab-internal
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
268 (list
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
269 (get-buffer-create "*scratch*")))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
270 (set-image-instance-property inst :items buffers)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
271 (resize-subwindow inst (gutter-pixel-width) nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
272 )))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
273
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
274 (add-hook 'kill-buffer-hook 'remove-buffer-from-gutter-tab)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
275 (add-hook 'create-frame-hook 'update-tab-in-gutter)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
276 (add-hook 'record-buffer-hook 'update-tab-in-gutter)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
277
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
278 ;;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
279 ;; progress display
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
280 ;; ripped off from message display
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
281 ;;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
282 (defvar progress-stack nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
283 "An alist of label/string pairs representing active progress gauges.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
284 The first element in the list is currently displayed in the gutter area.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
285 Do not modify this directly--use the `progress' or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
286 `display-progress'/`clear-progress' functions.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
287
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
288 (defvar progress-glyph-height 32
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
289 "Height of the gutter area for progress messages.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
290
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
291 (defvar progress-stop-callback 'progress-quit-function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
292 "Function to call to stop the progress operation.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
293
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
294 (defun progress-quit-function ()
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
295 "Default function to call for the stop button in a progress gauge.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
296 This just removes the progress gauge and calls quit."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
297 (interactive)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
298 (clear-progress)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
299 (keyboard-quit))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
300
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
301 ;; private variables
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
302 (defvar progress-gauge-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
303 (make-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
304 (vector 'progress-gauge
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
305 :pixel-height (- progress-glyph-height 8)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
306 :pixel-width 250
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
307 :descriptor "Progress")))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
308
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
309 (defvar progress-text-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
310 (make-glyph [string :data ""]))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
311
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
312 (defvar progress-layout-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
313 (make-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
314 (vector
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
315 'layout :orientation 'vertical :justify 'left
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
316 :items (list
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
317 progress-text-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
318 (make-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
319 (vector
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
320 'layout :pixel-height progress-glyph-height
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
321 :orientation 'horizontal
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
322 :items (list
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
323 progress-gauge-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
324 (vector
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
325 'button :pixel-height (- progress-glyph-height 8)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
326 :descriptor " Stop "
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
327 :callback '(funcall progress-stop-callback)))))))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
328
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
329 (defvar progress-abort-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
330 (make-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
331 (vector 'layout :orientation 'vertical :justify 'left
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
332 :items (list progress-text-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
333 (make-glyph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
334 (vector 'layout
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
335 :pixel-height progress-glyph-height
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
336 :orientation 'horizontal))))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
337
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
338 (defvar progress-extent-text "")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
339 (defvar progress-extent nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
340
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
341 (defun progress-displayed-p (&optional return-string frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
342 "Return a non-nil value if a progress gauge is presently displayed in the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
343 gutter area. If optional argument RETURN-STRING is non-nil,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
344 return a string containing the message, otherwise just return t."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
345 (let ((buffer (get-buffer-create " *Gutter Area*")))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
346 (and (< (point-min buffer) (point-max buffer))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
347 (if return-string
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
348 (buffer-substring nil nil buffer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
349 t))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
350
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
351 ;;; Returns the string which remains in the echo area, or nil if none.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
352 ;;; If label is nil, the whole message stack is cleared.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
353 (defun clear-progress (&optional label frame no-restore)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
354 "Remove any progress gauge with the given LABEL from the progress gauge-stack,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
355 erasing it from the gutter area if it's currently displayed there.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
356 If a message remains at the head of the progress-stack and NO-RESTORE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
357 is nil, it will be displayed. The string which remains in the gutter
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
358 area will be returned, or nil if the progress-stack is now empty.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
359 If LABEL is nil, the entire progress-stack is cleared.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
360
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
361 Unless you need the return value or you need to specify a label,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
362 you should just use (progress nil)."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
363 (or frame (setq frame (selected-frame)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
364 (remove-progress label frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
365 (let ((inhibit-read-only t)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
366 (zmacs-region-stays zmacs-region-stays)) ; preserve from change
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
367 (erase-buffer " *Echo Area*")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
368 (erase-buffer (get-buffer-create " *Gutter Area*")))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
369 (if no-restore
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
370 nil ; just preparing to put another msg up
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
371 (if progress-stack
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
372 (let ((oldmsg (cdr (car progress-stack))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
373 (raw-append-progress oldmsg frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
374 oldmsg)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
375 ;; nothing to display so get rid of the gauge
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
376 (set-specifier bottom-gutter-border-width 0 frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
377 (set-specifier bottom-gutter-visible-p nil frame))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
378
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
379 (defun remove-progress (&optional label frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
380 ;; If label is nil, we want to remove all matching progress gauges.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
381 (while (and progress-stack
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
382 (or (null label) ; null label means clear whole stack
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
383 (eq label (car (car progress-stack)))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
384 (setq progress-stack (cdr progress-stack)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
385 (let ((s progress-stack))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
386 (while (cdr s)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
387 (let ((msg (car (cdr s))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
388 (if (eq label (car msg))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
389 (progn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
390 (setcdr s (cdr (cdr s))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
391 (setq s (cdr s)))))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
392
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
393 (defun append-progress (label message &optional value frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
394 (or frame (setq frame (selected-frame)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
395 ;; Add a new entry to the message-stack, or modify an existing one
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
396 (let* ((top (car progress-stack))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
397 (tmsg (cdr top)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
398 (if (eq label (car top))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
399 (progn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
400 (setcdr top message)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
401 (if (eq tmsg message)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
402 (set-image-instance-property
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
403 (glyph-image-instance progress-gauge-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
404 :percent value)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
405 (raw-append-progress message value frame))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
406 (redisplay-gutter-area)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
407 (when (input-pending-p)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
408 (dispatch-event (next-command-event))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
409 (push (cons label message) progress-stack)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
410 (raw-append-progress message value frame))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
411 (when (eq value 100)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
412 (sit-for 0.5 nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
413 (clear-progress label))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
414
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
415 (defun abort-progress (label message &optional frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
416 (or frame (setq frame (selected-frame)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
417 ;; Add a new entry to the message-stack, or modify an existing one
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
418 (let* ((top (car progress-stack))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
419 (inhibit-read-only t)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
420 (zmacs-region-stays zmacs-region-stays))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
421 (if (eq label (car top))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
422 (setcdr top message)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
423 (push (cons label message) progress-stack))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
424 (unless (equal message "")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
425 (insert-string message (get-buffer-create " *Gutter Area*"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
426 ;; Do what the device is able to cope with.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
427 (if (not (valid-image-instantiator-format-p 'progress-gauge frame))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
428 (progn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
429 (insert-string message " *Echo Area*")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
430 (if (not executing-kbd-macro)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
431 (redisplay-echo-area)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
432 ;; do some funky display here.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
433 (unless progress-extent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
434 (setq progress-extent (make-extent 0 0 progress-extent-text)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
435 (let ((bglyph (extent-begin-glyph progress-extent)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
436 (set-extent-begin-glyph progress-extent progress-abort-glyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
437 ;; fixup the gutter specifiers
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
438 (set-specifier bottom-gutter progress-extent-text frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
439 (set-specifier bottom-gutter-border-width 2 frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
440 (set-image-instance-property
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
441 (glyph-image-instance progress-text-glyph) :data message)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
442 (set-specifier bottom-gutter-height 'autodetect frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
443 (set-specifier bottom-gutter-visible-p t frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
444 ;; we have to do this so redisplay is up-to-date and so
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
445 ;; redisplay-gutter-area performs optimally.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
446 (redisplay-gutter-area)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
447 (sit-for 0.5 nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
448 (clear-progress label)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
449 (set-extent-begin-glyph progress-extent bglyph)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
450 )))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
451
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
452 (defun raw-append-progress (message &optional value frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
453 (unless (equal message "")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
454 (let ((inhibit-read-only t)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
455 (zmacs-region-stays zmacs-region-stays)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
456 (val (or value 0))) ; preserve from change
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
457 (insert-string message (get-buffer-create " *Gutter Area*"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
458 ;; Do what the device is able to cope with.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
459 (if (not (valid-image-instantiator-format-p 'progress-gauge frame))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
460 (progn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
461 (insert-string
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
462 (concat message (if (eq val 100) "done.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
463 (make-string (/ val 5) ?.))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
464 " *Echo Area*")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
465 (if (not executing-kbd-macro)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
466 (redisplay-echo-area)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
467 ;; do some funky display here.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
468 (unless progress-extent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
469 (setq progress-extent (make-extent 0 0 progress-extent-text))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
470 (set-extent-begin-glyph progress-extent progress-layout-glyph))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
471 ;; fixup the gutter specifiers
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
472 (set-specifier bottom-gutter progress-extent-text frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
473 (set-specifier bottom-gutter-border-width 2 frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
474 (set-image-instance-property
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
475 (glyph-image-instance progress-gauge-glyph) :percent val)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
476 (set-image-instance-property
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
477 (glyph-image-instance progress-text-glyph) :data message)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
478 (if (and (eq (specifier-instance bottom-gutter-height frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
479 'autodetect)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
480 (specifier-instance bottom-gutter-visible-p frame))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
481 (progn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
482 ;; if the gauge is already visible then just draw the gutter
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
483 ;; checking for user events
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
484 (redisplay-gutter-area)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
485 (when (input-pending-p)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
486 (dispatch-event (next-command-event))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
487 ;; otherwise make the gutter visible and redraw the frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
488 (set-specifier bottom-gutter-height 'autodetect frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
489 (set-specifier bottom-gutter-visible-p t frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
490 ;; we have to do this so redisplay is up-to-date and so
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
491 ;; redisplay-gutter-area performs optimally.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
492 (redisplay-frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
493 )))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
494
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
495 (defun display-progress (label message &optional value frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
496 "Display a progress gauge and message in the bottom gutter area.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
497 First argument LABEL is an identifier for this message. MESSAGE is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
498 the string to display. Use `clear-progress' to remove a labelled
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
499 message."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
500 (clear-progress label frame t)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
501 (if (eq value 'abort)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
502 (abort-progress label message frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
503 (append-progress label message value frame)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
504
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
505 (defun current-progress (&optional frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
506 "Return the current progress gauge in the gutter area, or nil.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
507 The FRAME argument is currently unused."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
508 (cdr (car progress-stack)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
509
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
510 ;;; may eventually be frame-dependent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
511 (defun current-progress-label (&optional frame)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
512 (car (car progress-stack)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
513
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
514 (defun progress (fmt &optional value &rest args)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
515 "Print a progress gauge and message in the bottom gutter area of the frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
516 The arguments are the same as to `format'.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
517
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
518 If the only argument is nil, clear any existing progress gauge."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
519 (if (and (null fmt) (null args))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
520 (prog1 nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
521 (clear-progress nil))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
522 (let ((str (apply 'format fmt args)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
523 (display-progress 'progress str value)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
524 str)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
525
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
526 (defun lprogress (label fmt &optional value &rest args)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
527 "Print a progress gauge and message in the bottom gutter area of the frame.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
528 First argument LABEL is an identifier for this progress gauge. The rest of the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
529 arguments are the same as to `format'."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
530 (if (and (null fmt) (null args))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
531 (prog1 nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
532 (clear-progress label nil))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
533 (let ((str (apply 'format fmt args)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
534 (display-progress label str value)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
535 str)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
536
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
537 (provide 'gutter-items)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
538 ;;; gutter-items.el ends here.