Commit | Line | Data |
---|---|---|
5e684428 | 1 | ;;; buff-menu.el --- buffer menu main function and support functions -*- coding:utf-8 -*- |
c0274f38 | 2 | |
f4872033 | 3 | ;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 2000, 2001, 2002, 2003, |
ae940284 | 4 | ;; 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. |
2dd96f23 | 5 | |
9750e079 | 6 | ;; Maintainer: FSF |
6d6c3f84 | 7 | ;; Keywords: convenience |
9750e079 | 8 | |
2dd96f23 JB |
9 | ;; This file is part of GNU Emacs. |
10 | ||
eb3fa2cf | 11 | ;; GNU Emacs is free software: you can redistribute it and/or modify |
2dd96f23 | 12 | ;; it under the terms of the GNU General Public License as published by |
eb3fa2cf GM |
13 | ;; the Free Software Foundation, either version 3 of the License, or |
14 | ;; (at your option) any later version. | |
2dd96f23 JB |
15 | |
16 | ;; GNU Emacs is distributed in the hope that it will be useful, | |
17 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 | ;; GNU General Public License for more details. | |
20 | ||
21 | ;; You should have received a copy of the GNU General Public License | |
eb3fa2cf | 22 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
2dd96f23 | 23 | |
e41b2db1 ER |
24 | ;;; Commentary: |
25 | ||
26 | ;; Edit, delete, or change attributes of all currently active Emacs | |
eb8c3be9 | 27 | ;; buffers from a list summarizing their state. A good way to browse |
e41b2db1 | 28 | ;; any special or scratch buffers you have loaded, since you can't find |
6d6c3f84 | 29 | ;; them by filename. The single entry point is `list-buffers', |
86dbbfc2 ER |
30 | ;; normally bound to C-x C-b. |
31 | ||
32 | ;;; Change Log: | |
33 | ||
42a19c2a RS |
34 | ;; Buffer-menu-view: New function |
35 | ;; Buffer-menu-view-other-window: New function | |
36 | ||
86dbbfc2 ER |
37 | ;; Merged by esr with recent mods to Emacs 19 buff-menu, 23 Mar 1993 |
38 | ;; | |
86dbbfc2 ER |
39 | ;; Modified by Bob Weiner, Motorola, Inc., 4/14/89 |
40 | ;; | |
41 | ;; Added optional backup argument to 'Buffer-menu-unmark' to make it undelete | |
42 | ;; current entry and then move to previous one. | |
43 | ;; | |
44 | ;; Based on FSF code dating back to 1985. | |
e41b2db1 | 45 | |
5de9bdab | 46 | ;;; Code: |
10e1dad9 | 47 | |
d5aacb46 SM |
48 | ;;Trying to preserve the old window configuration works well in |
49 | ;;simple scenarios, when you enter the buffer menu, use it, and exit it. | |
50 | ;;But it does strange things when you switch back to the buffer list buffer | |
51 | ;;with C-x b, later on, when the window configuration is different. | |
52 | ;;The choice seems to be, either restore the window configuration | |
53 | ;;in all cases, or in no cases. | |
54 | ;;I decided it was better not to restore the window config at all. -- rms. | |
08c82d4d | 55 | |
d5aacb46 SM |
56 | ;;But since then, I changed buffer-menu to use the selected window, |
57 | ;;so q now once again goes back to the previous window configuration. | |
08c82d4d | 58 | |
d5aacb46 SM |
59 | ;;(defvar Buffer-menu-window-config nil |
60 | ;; "Window configuration saved from entry to `buffer-menu'.") | |
2dd96f23 | 61 | |
d5aacb46 SM |
62 | ;; Put buffer *Buffer List* into proper mode right away |
63 | ;; so that from now on even list-buffers is enough to get a buffer menu. | |
2dd96f23 | 64 | |
bc7bb432 JB |
65 | (defgroup Buffer-menu nil |
66 | "Show a menu of all buffers in a buffer." | |
67 | :group 'tools | |
68 | :group 'convenience) | |
69 | ||
70 | (defcustom Buffer-menu-use-header-line t | |
9201cc28 | 71 | "Non-nil means to use an immovable header-line." |
bc7bb432 JB |
72 | :type 'boolean |
73 | :group 'Buffer-menu) | |
74 | ||
d247d0fe | 75 | (defface buffer-menu-buffer |
bc7bb432 | 76 | '((t (:weight bold))) |
d247d0fe | 77 | "Face used to highlight buffer names in the buffer menu." |
2a8f2d4c | 78 | :group 'Buffer-menu) |
d247d0fe | 79 | (put 'Buffer-menu-buffer 'face-alias 'buffer-menu-buffer) |
bc7bb432 | 80 | |
4f0992b3 | 81 | (defcustom Buffer-menu-buffer+size-width 26 |
9201cc28 | 82 | "How wide to jointly make the buffer name and size columns." |
bc7bb432 JB |
83 | :type 'number |
84 | :group 'Buffer-menu) | |
85 | ||
4f0992b3 | 86 | (defcustom Buffer-menu-mode-width 16 |
9201cc28 | 87 | "How wide to make the mode name column." |
bc7bb432 JB |
88 | :type 'number |
89 | :group 'Buffer-menu) | |
90 | ||
3ce5f932 LT |
91 | (defcustom Buffer-menu-use-frame-buffer-list t |
92 | "If non-nil, the Buffer Menu uses the selected frame's buffer list. | |
93 | Buffers that were never selected in that frame are listed at the end. | |
94 | If the value is nil, the Buffer Menu uses the global buffer list. | |
95 | This variable matters if the Buffer Menu is sorted by visited order, | |
96 | as it is by default." | |
97 | :type 'boolean | |
98 | :group 'Buffer-menu | |
99 | :version "22.1") | |
100 | ||
d5aacb46 | 101 | ;; This should get updated & resorted when you click on a column heading |
bc7bb432 | 102 | (defvar Buffer-menu-sort-column nil |
84bbd894 RS |
103 | "Which column to sort the menu on. |
104 | Use 2 to sort by buffer names, or 5 to sort by file names. | |
392225ee | 105 | A nil value means sort by visited order (the default).") |
bc7bb432 JB |
106 | |
107 | (defconst Buffer-menu-buffer-column 4) | |
e5ea316b | 108 | |
7b0a86ab LT |
109 | (defvar Buffer-menu-files-only nil |
110 | "Non-nil if the current buffer-menu lists only file buffers. | |
111 | This variable determines whether reverting the buffer lists only | |
112 | file buffers. It affects both manual reverting and reverting by | |
113 | Auto Revert Mode.") | |
114 | ||
392225ee JB |
115 | (make-variable-buffer-local 'Buffer-menu-files-only) |
116 | ||
fb5614e8 | 117 | (defvar Info-current-file) ;; from info.el |
b653cee4 | 118 | (defvar Info-current-node) ;; from info.el |
fb5614e8 | 119 | |
392225ee JB |
120 | (defvar Buffer-menu-mode-map |
121 | (let ((map (make-keymap))) | |
122 | (suppress-keymap map t) | |
392225ee JB |
123 | (define-key map "v" 'Buffer-menu-select) |
124 | (define-key map "2" 'Buffer-menu-2-window) | |
125 | (define-key map "1" 'Buffer-menu-1-window) | |
126 | (define-key map "f" 'Buffer-menu-this-window) | |
127 | (define-key map "e" 'Buffer-menu-this-window) | |
128 | (define-key map "\C-m" 'Buffer-menu-this-window) | |
129 | (define-key map "o" 'Buffer-menu-other-window) | |
130 | (define-key map "\C-o" 'Buffer-menu-switch-other-window) | |
131 | (define-key map "s" 'Buffer-menu-save) | |
132 | (define-key map "d" 'Buffer-menu-delete) | |
133 | (define-key map "k" 'Buffer-menu-delete) | |
134 | (define-key map "\C-d" 'Buffer-menu-delete-backwards) | |
135 | (define-key map "\C-k" 'Buffer-menu-delete) | |
136 | (define-key map "x" 'Buffer-menu-execute) | |
137 | (define-key map " " 'next-line) | |
138 | (define-key map "n" 'next-line) | |
139 | (define-key map "p" 'previous-line) | |
140 | (define-key map "\177" 'Buffer-menu-backup-unmark) | |
141 | (define-key map "~" 'Buffer-menu-not-modified) | |
392225ee JB |
142 | (define-key map "u" 'Buffer-menu-unmark) |
143 | (define-key map "m" 'Buffer-menu-mark) | |
144 | (define-key map "t" 'Buffer-menu-visit-tags-table) | |
145 | (define-key map "%" 'Buffer-menu-toggle-read-only) | |
146 | (define-key map "b" 'Buffer-menu-bury) | |
392225ee JB |
147 | (define-key map "V" 'Buffer-menu-view) |
148 | (define-key map "T" 'Buffer-menu-toggle-files-only) | |
149 | (define-key map [mouse-2] 'Buffer-menu-mouse-select) | |
150 | (define-key map [follow-link] 'mouse-face) | |
9cda680d JL |
151 | (define-key map (kbd "M-s a C-s") 'Buffer-menu-isearch-buffers) |
152 | (define-key map (kbd "M-s a M-C-s") 'Buffer-menu-isearch-buffers-regexp) | |
392225ee JB |
153 | map) |
154 | "Local keymap for `Buffer-menu-mode' buffers.") | |
2dd96f23 JB |
155 | |
156 | ;; Buffer Menu mode is suitable only for specially formatted data. | |
157 | (put 'Buffer-menu-mode 'mode-class 'special) | |
158 | ||
fa9d0f38 | 159 | (define-derived-mode Buffer-menu-mode special-mode "Buffer Menu" |
2dd96f23 JB |
160 | "Major mode for editing a list of buffers. |
161 | Each line describes one of the buffers in Emacs. | |
162 | Letters do not insert themselves; instead, they are commands. | |
163 | \\<Buffer-menu-mode-map> | |
2cf5fc7e RS |
164 | \\[Buffer-menu-mouse-select] -- select buffer you click on, in place of the buffer menu. |
165 | \\[Buffer-menu-this-window] -- select current line's buffer in place of the buffer menu. | |
166 | \\[Buffer-menu-other-window] -- select that buffer in another window, | |
167 | so the buffer menu buffer remains visible in its window. | |
42a19c2a RS |
168 | \\[Buffer-menu-view] -- select current line's buffer, but in view-mode. |
169 | \\[Buffer-menu-view-other-window] -- select that buffer in | |
170 | another window, in view-mode. | |
2cf5fc7e RS |
171 | \\[Buffer-menu-switch-other-window] -- make another window display that buffer. |
172 | \\[Buffer-menu-mark] -- mark current line's buffer to be displayed. | |
173 | \\[Buffer-menu-select] -- select current line's buffer. | |
174 | Also show buffers marked with m, in other windows. | |
dc6d9681 | 175 | \\[Buffer-menu-1-window] -- select that buffer in full-frame window. |
2dd96f23 JB |
176 | \\[Buffer-menu-2-window] -- select that buffer in one window, |
177 | together with buffer selected before this one in another window. | |
1fbb8c2e JL |
178 | \\[Buffer-menu-isearch-buffers] -- Do incremental search in the marked buffers. |
179 | \\[Buffer-menu-isearch-buffers-regexp] -- Isearch for regexp in the marked buffers. | |
2dd96f23 JB |
180 | \\[Buffer-menu-visit-tags-table] -- visit-tags-table this buffer. |
181 | \\[Buffer-menu-not-modified] -- clear modified-flag on that buffer. | |
182 | \\[Buffer-menu-save] -- mark that buffer to be saved, and move down. | |
183 | \\[Buffer-menu-delete] -- mark that buffer to be deleted, and move down. | |
184 | \\[Buffer-menu-delete-backwards] -- mark that buffer to be deleted, and move up. | |
185 | \\[Buffer-menu-execute] -- delete or save marked buffers. | |
186 | \\[Buffer-menu-unmark] -- remove all kinds of marks from current line. | |
86dbbfc2 | 187 | With prefix argument, also move up one line. |
d91e2b1a | 188 | \\[Buffer-menu-backup-unmark] -- back up a line and remove marks. |
0f88624e | 189 | \\[Buffer-menu-toggle-read-only] -- toggle read-only status of buffer on this line. |
fa9d0f38 | 190 | \\[revert-buffer] -- update the list of buffers. |
7b0a86ab | 191 | \\[Buffer-menu-toggle-files-only] -- toggle whether the menu displays only file buffers. |
a59faabe | 192 | \\[Buffer-menu-bury] -- bury the buffer listed on this line." |
7b0a86ab LT |
193 | (set (make-local-variable 'revert-buffer-function) |
194 | 'Buffer-menu-revert-function) | |
195 | (set (make-local-variable 'buffer-stale-function) | |
012ad4a3 | 196 | #'(lambda (&optional noconfirm) 'fast)) |
823316aa | 197 | (setq truncate-lines t) |
392225ee | 198 | (setq buffer-read-only t)) |
710e5da8 | 199 | |
bf48d4ef GM |
200 | (define-obsolete-variable-alias 'buffer-menu-mode-hook |
201 | 'Buffer-menu-mode-hook "23.1") | |
202 | ||
710e5da8 | 203 | (defun Buffer-menu-revert-function (ignore1 ignore2) |
fda73b45 LT |
204 | (or (eq buffer-undo-list t) |
205 | (setq buffer-undo-list nil)) | |
7b0a86ab | 206 | ;; We can not use save-excursion here. The buffer gets erased. |
3f9c9ff7 LT |
207 | (let ((opoint (point)) |
208 | (eobp (eobp)) | |
209 | (ocol (current-column)) | |
bfb2dda4 DP |
210 | (oline (progn (move-to-column 4) |
211 | (get-text-property (point) 'buffer))) | |
fda73b45 LT |
212 | (prop (point-min)) |
213 | ;; do not make undo records for the reversion. | |
214 | (buffer-undo-list t)) | |
63de2160 LT |
215 | ;; We can be called by Auto Revert Mode with the "*Buffer Menu*" |
216 | ;; temporarily the current buffer. Make sure that the | |
217 | ;; interactively current buffer is correctly identified with a `.' | |
218 | ;; by `list-buffers-noselect'. | |
219 | (with-current-buffer (window-buffer) | |
220 | (list-buffers-noselect Buffer-menu-files-only)) | |
3f9c9ff7 LT |
221 | (if oline |
222 | (while (setq prop (next-single-property-change prop 'buffer)) | |
223 | (when (eq (get-text-property prop 'buffer) oline) | |
224 | (goto-char prop) | |
225 | (move-to-column ocol))) | |
226 | (goto-char (if eobp (point-max) opoint))))) | |
7b0a86ab LT |
227 | |
228 | (defun Buffer-menu-toggle-files-only (arg) | |
229 | "Toggle whether the current buffer-menu displays only file buffers. | |
230 | With a positive ARG display only file buffers. With zero or | |
231 | negative ARG, display other buffers as well." | |
232 | (interactive "P") | |
233 | (setq Buffer-menu-files-only | |
234 | (cond ((not arg) (not Buffer-menu-files-only)) | |
235 | ((> (prefix-numeric-value arg) 0) t))) | |
236 | (revert-buffer)) | |
237 | ||
2dd96f23 | 238 | \f |
2dd96f23 JB |
239 | (defun Buffer-menu-buffer (error-if-non-existent-p) |
240 | "Return buffer described by this line of buffer menu." | |
1b40dbed RS |
241 | (let* ((where (save-excursion |
242 | (beginning-of-line) | |
243 | (+ (point) Buffer-menu-buffer-column))) | |
601ed8a0 GM |
244 | (name (and (not (eobp)) (get-text-property where 'buffer-name))) |
245 | (buf (and (not (eobp)) (get-text-property where 'buffer)))) | |
1b40dbed RS |
246 | (if name |
247 | (or (get-buffer name) | |
601ed8a0 | 248 | (and buf (buffer-name buf) buf) |
1b40dbed RS |
249 | (if error-if-non-existent-p |
250 | (error "No buffer named `%s'" name) | |
251 | nil)) | |
601ed8a0 | 252 | (or (and buf (buffer-name buf) buf) |
463a7342 JPW |
253 | (if error-if-non-existent-p |
254 | (error "No buffer on this line") | |
601ed8a0 | 255 | nil))))) |
2dd96f23 | 256 | \f |
06b1a5ef | 257 | (defun buffer-menu (&optional arg) |
2dd96f23 JB |
258 | "Make a menu of buffers so you can save, delete or select them. |
259 | With argument, show only buffers that are visiting files. | |
260 | Type ? after invocation to get help on commands available. | |
6a0d92d3 RS |
261 | Type q to remove the buffer menu from the display. |
262 | ||
263 | The first column shows `>' for a buffer you have | |
264 | marked to be displayed, `D' for one you have marked for | |
265 | deletion, and `.' for the current buffer. | |
266 | ||
bc7bb432 JB |
267 | The C column has a `.' for the buffer from which you came. |
268 | The R column has a `%' if the buffer is read-only. | |
6a0d92d3 RS |
269 | The M column has a `*' if it is modified, |
270 | or `S' if you have marked it for saving. | |
6a0d92d3 RS |
271 | After this come the buffer name, its size in characters, |
272 | its major mode, and the visited file name (if any)." | |
08c82d4d RS |
273 | (interactive "P") |
274 | ;;; (setq Buffer-menu-window-config (current-window-configuration)) | |
275 | (switch-to-buffer (list-buffers-noselect arg)) | |
276 | (message | |
277 | "Commands: d, s, x, u; f, o, 1, 2, m, v; ~, %%; q to quit; ? for help.")) | |
278 | ||
279 | (defun buffer-menu-other-window (&optional arg) | |
280 | "Display a list of buffers in another window. | |
281 | With the buffer list buffer, you can save, delete or select the buffers. | |
282 | With argument, show only buffers that are visiting files. | |
283 | Type ? after invocation to get help on commands available. | |
6a0d92d3 RS |
284 | Type q to remove the buffer menu from the display. |
285 | For more information, see the function `buffer-menu'." | |
2dd96f23 | 286 | (interactive "P") |
3ed788ec | 287 | ;;; (setq Buffer-menu-window-config (current-window-configuration)) |
08c82d4d | 288 | (switch-to-buffer-other-window (list-buffers-noselect arg)) |
2dd96f23 | 289 | (message |
3ed788ec RS |
290 | "Commands: d, s, x, u; f, o, 1, 2, m, v; ~, %%; q to quit; ? for help.")) |
291 | ||
bc7bb432 JB |
292 | (defun Buffer-menu-no-header () |
293 | (beginning-of-line) | |
294 | (if (or Buffer-menu-use-header-line | |
295 | (not (eq (char-after) ?C))) | |
296 | t | |
297 | (ding) | |
298 | (forward-line 1) | |
299 | nil)) | |
300 | ||
2dd96f23 JB |
301 | (defun Buffer-menu-mark () |
302 | "Mark buffer on this line for being displayed by \\<Buffer-menu-mode-map>\\[Buffer-menu-select] command." | |
303 | (interactive) | |
bc7bb432 | 304 | (when (Buffer-menu-no-header) |
70ef8857 | 305 | (let ((inhibit-read-only t)) |
2dd96f23 JB |
306 | (delete-char 1) |
307 | (insert ?>) | |
308 | (forward-line 1)))) | |
309 | ||
86dbbfc2 ER |
310 | (defun Buffer-menu-unmark (&optional backup) |
311 | "Cancel all requested operations on buffer on this line and move down. | |
bfa13d19 | 312 | Optional prefix arg means move up." |
86dbbfc2 | 313 | (interactive "P") |
bc7bb432 | 314 | (when (Buffer-menu-no-header) |
2dd96f23 JB |
315 | (let* ((buf (Buffer-menu-buffer t)) |
316 | (mod (buffer-modified-p buf)) | |
70ef8857 SM |
317 | (readonly (with-current-buffer buf buffer-read-only)) |
318 | (inhibit-read-only t)) | |
2dd96f23 | 319 | (delete-char 3) |
bc7bb432 | 320 | (insert (if readonly (if mod " %*" " % ") (if mod " *" " "))))) |
86dbbfc2 | 321 | (forward-line (if backup -1 1))) |
2dd96f23 JB |
322 | |
323 | (defun Buffer-menu-backup-unmark () | |
324 | "Move up and cancel all requested operations on buffer on line above." | |
325 | (interactive) | |
326 | (forward-line -1) | |
327 | (Buffer-menu-unmark) | |
328 | (forward-line -1)) | |
329 | ||
77a43e01 RS |
330 | (defun Buffer-menu-delete (&optional arg) |
331 | "Mark buffer on this line to be deleted by \\<Buffer-menu-mode-map>\\[Buffer-menu-execute] command. | |
332 | Prefix arg is how many buffers to delete. | |
333 | Negative arg means delete backwards." | |
334 | (interactive "p") | |
bc7bb432 | 335 | (when (Buffer-menu-no-header) |
70ef8857 | 336 | (let ((inhibit-read-only t)) |
77a43e01 RS |
337 | (if (or (null arg) (= arg 0)) |
338 | (setq arg 1)) | |
339 | (while (> arg 0) | |
340 | (delete-char 1) | |
341 | (insert ?D) | |
342 | (forward-line 1) | |
343 | (setq arg (1- arg))) | |
bc7bb432 JB |
344 | (while (and (< arg 0) |
345 | (Buffer-menu-no-header)) | |
77a43e01 RS |
346 | (delete-char 1) |
347 | (insert ?D) | |
348 | (forward-line -1) | |
349 | (setq arg (1+ arg)))))) | |
350 | ||
351 | (defun Buffer-menu-delete-backwards (&optional arg) | |
2dd96f23 | 352 | "Mark buffer on this line to be deleted by \\<Buffer-menu-mode-map>\\[Buffer-menu-execute] command |
77a43e01 RS |
353 | and then move up one line. Prefix arg means move that many lines." |
354 | (interactive "p") | |
bc7bb432 | 355 | (Buffer-menu-delete (- (or arg 1)))) |
2dd96f23 JB |
356 | |
357 | (defun Buffer-menu-save () | |
358 | "Mark buffer on this line to be saved by \\<Buffer-menu-mode-map>\\[Buffer-menu-execute] command." | |
359 | (interactive) | |
bc7bb432 | 360 | (when (Buffer-menu-no-header) |
70ef8857 | 361 | (let ((inhibit-read-only t)) |
bc7bb432 | 362 | (forward-char 2) |
2dd96f23 JB |
363 | (delete-char 1) |
364 | (insert ?S) | |
365 | (forward-line 1)))) | |
366 | ||
a8ce00dc | 367 | (defun Buffer-menu-not-modified (&optional arg) |
2dd96f23 | 368 | "Mark buffer on this line as unmodified (no changes to save)." |
a8ce00dc | 369 | (interactive "P") |
70ef8857 | 370 | (with-current-buffer (Buffer-menu-buffer t) |
a8ce00dc | 371 | (set-buffer-modified-p arg)) |
2dd96f23 JB |
372 | (save-excursion |
373 | (beginning-of-line) | |
bc7bb432 | 374 | (forward-char 2) |
bfa13d19 | 375 | (if (= (char-after) (if arg ?\s ?*)) |
70ef8857 | 376 | (let ((inhibit-read-only t)) |
2dd96f23 | 377 | (delete-char 1) |
bfa13d19 | 378 | (insert (if arg ?* ?\s)))))) |
2dd96f23 | 379 | |
bfb2dda4 DP |
380 | (defun Buffer-menu-beginning () |
381 | (goto-char (point-min)) | |
382 | (unless Buffer-menu-use-header-line | |
383 | (forward-line))) | |
384 | ||
2dd96f23 JB |
385 | (defun Buffer-menu-execute () |
386 | "Save and/or delete buffers marked with \\<Buffer-menu-mode-map>\\[Buffer-menu-save] or \\<Buffer-menu-mode-map>\\[Buffer-menu-delete] commands." | |
387 | (interactive) | |
388 | (save-excursion | |
bfb2dda4 | 389 | (Buffer-menu-beginning) |
bc7bb432 | 390 | (while (re-search-forward "^..S" nil t) |
2dd96f23 | 391 | (let ((modp nil)) |
70ef8857 | 392 | (with-current-buffer (Buffer-menu-buffer t) |
2dd96f23 JB |
393 | (save-buffer) |
394 | (setq modp (buffer-modified-p))) | |
70ef8857 | 395 | (let ((inhibit-read-only t)) |
2dd96f23 | 396 | (delete-char -1) |
bfa13d19 | 397 | (insert (if modp ?* ?\s)))))) |
2dd96f23 | 398 | (save-excursion |
bfb2dda4 | 399 | (Buffer-menu-beginning) |
2dd96f23 | 400 | (let ((buff-menu-buffer (current-buffer)) |
70ef8857 | 401 | (inhibit-read-only t)) |
4f1ab860 | 402 | (while (re-search-forward "^D" nil t) |
2dd96f23 JB |
403 | (forward-char -1) |
404 | (let ((buf (Buffer-menu-buffer nil))) | |
405 | (or (eq buf nil) | |
406 | (eq buf buff-menu-buffer) | |
601ed8a0 GM |
407 | (save-excursion (kill-buffer buf))) |
408 | (if (and buf (buffer-name buf)) | |
2dd96f23 | 409 | (progn (delete-char 1) |
bfa13d19 | 410 | (insert ?\s)) |
2dd96f23 | 411 | (delete-region (point) (progn (forward-line 1) (point))) |
4f1ab860 DL |
412 | (unless (bobp) |
413 | (forward-char -1)))))))) | |
2dd96f23 JB |
414 | |
415 | (defun Buffer-menu-select () | |
416 | "Select this line's buffer; also display buffers marked with `>'. | |
08c82d4d RS |
417 | You can mark buffers with the \\<Buffer-menu-mode-map>\\[Buffer-menu-mark] command. |
418 | This command deletes and replaces all the previously existing windows | |
419 | in the selected frame." | |
2dd96f23 JB |
420 | (interactive) |
421 | (let ((buff (Buffer-menu-buffer t)) | |
10e1dad9 | 422 | (menu (current-buffer)) |
2dd96f23 JB |
423 | (others ()) |
424 | tem) | |
bfb2dda4 | 425 | (Buffer-menu-beginning) |
a9fb4690 | 426 | (while (re-search-forward "^>" nil t) |
2dd96f23 | 427 | (setq tem (Buffer-menu-buffer t)) |
70ef8857 | 428 | (let ((inhibit-read-only t)) |
2dd96f23 | 429 | (delete-char -1) |
bfa13d19 | 430 | (insert ?\s)) |
2dd96f23 JB |
431 | (or (eq tem buff) (memq tem others) (setq others (cons tem others)))) |
432 | (setq others (nreverse others) | |
dc6d9681 | 433 | tem (/ (1- (frame-height)) (1+ (length others)))) |
2dd96f23 JB |
434 | (delete-other-windows) |
435 | (switch-to-buffer buff) | |
436 | (or (eq menu buff) | |
437 | (bury-buffer menu)) | |
86dbbfc2 ER |
438 | (if (equal (length others) 0) |
439 | (progn | |
3ed788ec RS |
440 | ;;; ;; Restore previous window configuration before displaying |
441 | ;;; ;; selected buffers. | |
442 | ;;; (if Buffer-menu-window-config | |
443 | ;;; (progn | |
444 | ;;; (set-window-configuration Buffer-menu-window-config) | |
445 | ;;; (setq Buffer-menu-window-config nil))) | |
86dbbfc2 ER |
446 | (switch-to-buffer buff)) |
447 | (while others | |
448 | (split-window nil tem) | |
449 | (other-window 1) | |
450 | (switch-to-buffer (car others)) | |
451 | (setq others (cdr others))) | |
452 | (other-window 1) ;back to the beginning! | |
453 | ))) | |
454 | ||
9cda680d JL |
455 | (defun Buffer-menu-marked-buffers () |
456 | "Return a list of buffers marked with the \\<Buffer-menu-mode-map>\\[Buffer-menu-mark] command." | |
457 | (let (buffers) | |
458 | (Buffer-menu-beginning) | |
459 | (while (re-search-forward "^>" nil t) | |
460 | (setq buffers (cons (Buffer-menu-buffer t) buffers))) | |
461 | (nreverse buffers))) | |
462 | ||
463 | (defun Buffer-menu-isearch-buffers () | |
464 | "Search for a string through all marked buffers using Isearch." | |
465 | (interactive) | |
466 | (multi-isearch-buffers (Buffer-menu-marked-buffers))) | |
467 | ||
468 | (defun Buffer-menu-isearch-buffers-regexp () | |
469 | "Search for a regexp through all marked buffers using Isearch." | |
470 | (interactive) | |
471 | (multi-isearch-buffers-regexp (Buffer-menu-marked-buffers))) | |
08c82d4d | 472 | |
2dd96f23 JB |
473 | \f |
474 | (defun Buffer-menu-visit-tags-table () | |
475 | "Visit the tags table in the buffer on this line. See `visit-tags-table'." | |
476 | (interactive) | |
477 | (let ((file (buffer-file-name (Buffer-menu-buffer t)))) | |
478 | (if file | |
479 | (visit-tags-table file) | |
480 | (error "Specified buffer has no file")))) | |
481 | ||
482 | (defun Buffer-menu-1-window () | |
dc6d9681 | 483 | "Select this line's buffer, alone, in full frame." |
2dd96f23 JB |
484 | (interactive) |
485 | (switch-to-buffer (Buffer-menu-buffer t)) | |
486 | (bury-buffer (other-buffer)) | |
487 | (delete-other-windows)) | |
488 | ||
2cf5fc7e RS |
489 | (defun Buffer-menu-mouse-select (event) |
490 | "Select the buffer whose line you click on." | |
491 | (interactive "e") | |
492 | (let (buffer) | |
70ef8857 | 493 | (with-current-buffer (window-buffer (posn-window (event-end event))) |
2cf5fc7e RS |
494 | (save-excursion |
495 | (goto-char (posn-point (event-end event))) | |
496 | (setq buffer (Buffer-menu-buffer t)))) | |
497 | (select-window (posn-window (event-end event))) | |
d953b88c RS |
498 | (if (and (window-dedicated-p (selected-window)) |
499 | (eq (selected-window) (frame-root-window))) | |
500 | (switch-to-buffer-other-frame buffer) | |
501 | (switch-to-buffer buffer)))) | |
2cf5fc7e | 502 | |
2dd96f23 JB |
503 | (defun Buffer-menu-this-window () |
504 | "Select this line's buffer in this window." | |
505 | (interactive) | |
506 | (switch-to-buffer (Buffer-menu-buffer t))) | |
507 | ||
508 | (defun Buffer-menu-other-window () | |
509 | "Select this line's buffer in other window, leaving buffer menu visible." | |
510 | (interactive) | |
511 | (switch-to-buffer-other-window (Buffer-menu-buffer t))) | |
512 | ||
35aaf00c RM |
513 | (defun Buffer-menu-switch-other-window () |
514 | "Make the other window select this line's buffer. | |
515 | The current window remains selected." | |
516 | (interactive) | |
a0e4e275 JL |
517 | (let ((pop-up-windows t) |
518 | same-window-buffer-names | |
519 | same-window-regexps) | |
520 | (display-buffer (Buffer-menu-buffer t)))) | |
35aaf00c | 521 | |
2dd96f23 JB |
522 | (defun Buffer-menu-2-window () |
523 | "Select this line's buffer, with previous buffer in second window." | |
524 | (interactive) | |
525 | (let ((buff (Buffer-menu-buffer t)) | |
526 | (menu (current-buffer)) | |
a0e4e275 JL |
527 | (pop-up-windows t) |
528 | same-window-buffer-names | |
529 | same-window-regexps) | |
86dbbfc2 | 530 | (delete-other-windows) |
2dd96f23 JB |
531 | (switch-to-buffer (other-buffer)) |
532 | (pop-to-buffer buff) | |
533 | (bury-buffer menu))) | |
c0274f38 | 534 | |
d91e2b1a | 535 | (defun Buffer-menu-toggle-read-only () |
f450965c | 536 | "Toggle read-only status of buffer on this line, perhaps via version control." |
d91e2b1a ER |
537 | (interactive) |
538 | (let (char) | |
70ef8857 SM |
539 | (with-current-buffer (Buffer-menu-buffer t) |
540 | (toggle-read-only) | |
bfa13d19 | 541 | (setq char (if buffer-read-only ?% ?\s))) |
d91e2b1a ER |
542 | (save-excursion |
543 | (beginning-of-line) | |
bc7bb432 | 544 | (forward-char 1) |
d91e2b1a | 545 | (if (/= (following-char) char) |
70ef8857 | 546 | (let ((inhibit-read-only t)) |
d91e2b1a ER |
547 | (delete-char 1) |
548 | (insert char)))))) | |
549 | ||
36570c92 RS |
550 | (defun Buffer-menu-bury () |
551 | "Bury the buffer listed on this line." | |
552 | (interactive) | |
bc7bb432 | 553 | (when (Buffer-menu-no-header) |
a59faabe RS |
554 | (save-excursion |
555 | (beginning-of-line) | |
556 | (bury-buffer (Buffer-menu-buffer t)) | |
557 | (let ((line (buffer-substring (point) (progn (forward-line 1) (point)))) | |
70ef8857 | 558 | (inhibit-read-only t)) |
a59faabe RS |
559 | (delete-region (point) (progn (forward-line -1) (point))) |
560 | (goto-char (point-max)) | |
561 | (insert line)) | |
562 | (message "Buried buffer moved to the end")))) | |
42a19c2a RS |
563 | |
564 | ||
565 | (defun Buffer-menu-view () | |
566 | "View this line's buffer in View mode." | |
567 | (interactive) | |
568 | (view-buffer (Buffer-menu-buffer t))) | |
569 | ||
570 | ||
571 | (defun Buffer-menu-view-other-window () | |
572 | "View this line's buffer in View mode in another window." | |
573 | (interactive) | |
574 | (view-buffer-other-window (Buffer-menu-buffer t))) | |
0b03ce3a RS |
575 | \f |
576 | ||
577 | (define-key ctl-x-map "\C-b" 'list-buffers) | |
578 | ||
579 | (defun list-buffers (&optional files-only) | |
580 | "Display a list of names of existing buffers. | |
581 | The list is displayed in a buffer named `*Buffer List*'. | |
582 | Note that buffers with names starting with spaces are omitted. | |
583 | Non-null optional arg FILES-ONLY means mention only file buffers. | |
584 | ||
6a0d92d3 | 585 | For more information, see the function `buffer-menu'." |
0b03ce3a | 586 | (interactive "P") |
08c82d4d RS |
587 | (display-buffer (list-buffers-noselect files-only))) |
588 | ||
e1ff8dd0 SM |
589 | (defconst Buffer-menu-short-ellipsis |
590 | ;; This file is preloaded, so we can't use char-displayable-p here | |
591 | ;; because we don't know yet what display we're going to connect to. | |
592 | ":" ;; (if (char-displayable-p ?…) "…" ":") | |
593 | ) | |
31e02fab | 594 | |
bc7bb432 | 595 | (defun Buffer-menu-buffer+size (name size &optional name-props size-props) |
31e02fab SM |
596 | (if (> (+ (string-width name) (string-width size) 2) |
597 | Buffer-menu-buffer+size-width) | |
bc7bb432 | 598 | (setq name |
31e02fab SM |
599 | (let ((tail |
600 | (if (string-match "<[0-9]+>$" name) | |
601 | (match-string 0 name) | |
602 | ""))) | |
603 | (concat (truncate-string-to-width | |
604 | name | |
605 | (- Buffer-menu-buffer+size-width | |
606 | (max (string-width size) 3) | |
607 | (string-width tail) | |
608 | 2)) | |
609 | Buffer-menu-short-ellipsis | |
610 | tail))) | |
ee5861c8 AS |
611 | ;; Don't put properties on (buffer-name). |
612 | (setq name (copy-sequence name))) | |
bc7bb432 JB |
613 | (add-text-properties 0 (length name) name-props name) |
614 | (add-text-properties 0 (length size) size-props size) | |
615 | (concat name | |
616 | (make-string (- Buffer-menu-buffer+size-width | |
a3e5a603 SM |
617 | (string-width name) |
618 | (string-width size)) | |
bfa13d19 | 619 | ?\s) |
bc7bb432 JB |
620 | size)) |
621 | ||
d5aacb46 SM |
622 | (defun Buffer-menu-sort (column) |
623 | "Sort the buffer menu by COLUMN." | |
624 | (interactive "P") | |
625 | (when column | |
626 | (setq column (prefix-numeric-value column)) | |
627 | (if (< column 2) (setq column 2)) | |
628 | (if (> column 5) (setq column 5))) | |
629 | (setq Buffer-menu-sort-column column) | |
70ef8857 | 630 | (let ((inhibit-read-only t) l buf m1 m2) |
bfb2dda4 DP |
631 | (save-excursion |
632 | (Buffer-menu-beginning) | |
633 | (while (not (eobp)) | |
634 | (when (buffer-live-p (setq buf (get-text-property (+ (point) 4) 'buffer))) | |
635 | (setq m1 (char-after) | |
636 | m1 (if (memq m1 '(?> ?D)) m1) | |
637 | m2 (char-after (+ (point) 2)) | |
638 | m2 (if (eq m2 ?S) m2)) | |
639 | (if (or m1 m2) | |
640 | (push (list buf m1 m2) l))) | |
641 | (forward-line))) | |
52a0198d | 642 | (revert-buffer) |
bfb2dda4 DP |
643 | (save-excursion |
644 | (Buffer-menu-beginning) | |
645 | (while (not (eobp)) | |
646 | (when (setq buf (assq (get-text-property (+ (point) 4) 'buffer) l)) | |
647 | (setq m1 (cadr buf) | |
648 | m2 (cadr (cdr buf))) | |
649 | (when m1 | |
650 | (delete-char 1) | |
651 | (insert m1) | |
652 | (backward-char 1)) | |
653 | (when m2 | |
654 | (forward-char 2) | |
655 | (delete-char 1) | |
656 | (insert m2))) | |
657 | (forward-line))))) | |
d5aacb46 | 658 | |
104fc809 CY |
659 | (defun Buffer-menu-sort-by-column (&optional e) |
660 | "Sort the buffer menu by the column clicked on." | |
661 | (interactive (list last-input-event)) | |
662 | (if e (mouse-select-window e)) | |
663 | (let* ((pos (event-start e)) | |
664 | (obj (posn-object pos)) | |
665 | (col (if obj | |
666 | (get-text-property (cdr obj) 'column (car obj)) | |
667 | (get-text-property (posn-point pos) 'column)))) | |
668 | (Buffer-menu-sort col))) | |
669 | ||
670 | (defvar Buffer-menu-sort-button-map | |
671 | (let ((map (make-sparse-keymap))) | |
672 | ;; This keymap handles both nil and non-nil values for | |
673 | ;; Buffer-menu-use-header-line. | |
674 | (define-key map [header-line mouse-1] 'Buffer-menu-sort-by-column) | |
675 | (define-key map [header-line mouse-2] 'Buffer-menu-sort-by-column) | |
676 | (define-key map [mouse-2] 'Buffer-menu-sort-by-column) | |
677 | (define-key map [follow-link] 'mouse-face) | |
678 | (define-key map "\C-m" 'Buffer-menu-sort-by-column) | |
679 | map) | |
680 | "Local keymap for Buffer menu sort buttons.") | |
681 | ||
d5aacb46 SM |
682 | (defun Buffer-menu-make-sort-button (name column) |
683 | (if (equal column Buffer-menu-sort-column) (setq column nil)) | |
104fc809 CY |
684 | (propertize name |
685 | 'column column | |
686 | 'help-echo (concat | |
687 | (if Buffer-menu-use-header-line | |
688 | "mouse-1, mouse-2: sort by " | |
689 | "mouse-2, RET: sort by ") | |
690 | (if column (downcase name) "visited order")) | |
691 | 'mouse-face 'highlight | |
692 | 'keymap Buffer-menu-sort-button-map)) | |
d5aacb46 | 693 | |
61617913 | 694 | (defun list-buffers-noselect (&optional files-only buffer-list) |
08c82d4d RS |
695 | "Create and return a buffer with a list of names of existing buffers. |
696 | The buffer is named `*Buffer List*'. | |
697 | Note that buffers with names starting with spaces are omitted. | |
698 | Non-null optional arg FILES-ONLY means mention only file buffers. | |
699 | ||
61617913 RS |
700 | If BUFFER-LIST is non-nil, it should be a list of buffers; |
701 | it means list those buffers and no others. | |
702 | ||
6a0d92d3 | 703 | For more information, see the function `buffer-menu'." |
bc7bb432 JB |
704 | (let* ((old-buffer (current-buffer)) |
705 | (standard-output standard-output) | |
bfa13d19 | 706 | (mode-end (make-string (- Buffer-menu-mode-width 2) ?\s)) |
5e684428 | 707 | (header (concat "CRM " |
d5aacb46 SM |
708 | (Buffer-menu-buffer+size |
709 | (Buffer-menu-make-sort-button "Buffer" 2) | |
710 | (Buffer-menu-make-sort-button "Size" 3)) | |
711 | " " | |
712 | (Buffer-menu-make-sort-button "Mode" 4) mode-end | |
713 | (Buffer-menu-make-sort-button "File" 5) "\n")) | |
f4872033 | 714 | list desired-point) |
748a336b | 715 | (when Buffer-menu-use-header-line |
d5aacb46 | 716 | (let ((pos 0)) |
fff861a2 JB |
717 | ;; Turn whitespace chars in the header into stretch specs so |
718 | ;; they work regardless of the header-line face. | |
719 | (while (string-match "[ \t\n]+" header pos) | |
748a336b SM |
720 | (setq pos (match-end 0)) |
721 | (put-text-property (match-beginning 0) pos 'display | |
5e684428 | 722 | ;; Assume fixed-size chars in the buffer. |
6d3bce2b | 723 | (list 'space :align-to pos) |
5e684428 SM |
724 | header))) |
725 | ;; Try to better align the one-char headers. | |
726 | (put-text-property 0 3 'face 'fixed-pitch header) | |
727 | ;; Add a "dummy" leading space to align the beginning of the header | |
728 | ;; line with the beginning of the text (rather than with the left | |
c822571a | 729 | ;; scrollbar or the left fringe). --Stef |
5e684428 | 730 | (setq header (concat (propertize " " 'display '(space :align-to 0)) |
a6a2fd5e | 731 | header))) |
d5aacb46 | 732 | (with-current-buffer (get-buffer-create "*Buffer List*") |
08c82d4d RS |
733 | (setq buffer-read-only nil) |
734 | (erase-buffer) | |
735 | (setq standard-output (current-buffer)) | |
bc7bb432 | 736 | (unless Buffer-menu-use-header-line |
c822571a SM |
737 | ;; Use U+2014 (EM DASH) to underline if possible, else use ASCII |
738 | ;; (i.e. U+002D, HYPHEN-MINUS). | |
739 | (let ((underline (if (char-displayable-p ?\u2014) ?\u2014 ?-))) | |
5e684428 SM |
740 | (insert header |
741 | (apply 'string | |
742 | (mapcar (lambda (c) | |
bfa13d19 | 743 | (if (memq c '(?\n ?\s)) c underline)) |
5e684428 | 744 | header))))) |
a6a2fd5e | 745 | ;; Collect info for every buffer we're interested in. |
3ce5f932 LT |
746 | (dolist (buffer (or buffer-list |
747 | (buffer-list | |
748 | (when Buffer-menu-use-frame-buffer-list | |
749 | (selected-frame))))) | |
a6a2fd5e JL |
750 | (with-current-buffer buffer |
751 | (let ((name (buffer-name)) | |
752 | (file buffer-file-name)) | |
753 | (unless (and (not buffer-list) | |
754 | (or | |
755 | ;; Don't mention internal buffers. | |
756 | (and (string= (substring name 0 1) " ") (null file)) | |
757 | ;; Maybe don't mention buffers without files. | |
758 | (and files-only (not file)) | |
759 | (string= name "*Buffer List*"))) | |
760 | ;; Otherwise output info. | |
761 | (let ((mode (concat (format-mode-line mode-name nil nil buffer) | |
762 | (if mode-line-process | |
763 | (format-mode-line mode-line-process | |
764 | nil nil buffer)))) | |
765 | (bits (string | |
bfa13d19 | 766 | (if (eq buffer old-buffer) ?. ?\s) |
a6a2fd5e JL |
767 | ;; Handle readonly status. The output buffer |
768 | ;; is special cased to appear readonly; it is | |
769 | ;; actually made so at a later date. | |
770 | (if (or (eq buffer standard-output) | |
771 | buffer-read-only) | |
bfa13d19 | 772 | ?% ?\s) |
a6a2fd5e | 773 | ;; Identify modified buffers. |
bfa13d19 | 774 | (if (buffer-modified-p) ?* ?\s) |
a6a2fd5e | 775 | ;; Space separator. |
bfa13d19 | 776 | ?\s))) |
a6a2fd5e JL |
777 | (unless file |
778 | ;; No visited file. Check local value of | |
fb5614e8 EZ |
779 | ;; list-buffers-directory and, for Info buffers, |
780 | ;; Info-current-file. | |
781 | (cond ((and (boundp 'list-buffers-directory) | |
782 | list-buffers-directory) | |
783 | (setq file list-buffers-directory)) | |
784 | ((eq major-mode 'Info-mode) | |
785 | (setq file Info-current-file) | |
786 | (cond | |
26f544d3 | 787 | ((equal file "dir") |
fb5614e8 EZ |
788 | (setq file "*Info Directory*")) |
789 | ((eq file 'apropos) | |
790 | (setq file "*Info Apropos*")) | |
791 | ((eq file 'history) | |
792 | (setq file "*Info History*")) | |
793 | ((eq file 'toc) | |
794 | (setq file "*Info TOC*")) | |
795 | ((not (stringp file)) ;; avoid errors | |
b653cee4 EZ |
796 | (setq file nil)) |
797 | (t | |
798 | (setq file (concat "(" | |
799 | (file-name-nondirectory file) | |
9cda680d | 800 | ") " |
b653cee4 | 801 | Info-current-node))))))) |
a6a2fd5e JL |
802 | (push (list buffer bits name (buffer-size) mode file) |
803 | list)))))) | |
804 | ;; Preserve the original buffer-list ordering, just in case. | |
805 | (setq list (nreverse list)) | |
f4872033 | 806 | ;; Place the buffers's info in the output buffer, sorted if necessary. |
bc7bb432 JB |
807 | (dolist (buffer |
808 | (if Buffer-menu-sort-column | |
809 | (sort list | |
810 | (if (eq Buffer-menu-sort-column 3) | |
811 | (lambda (a b) | |
812 | (< (nth Buffer-menu-sort-column a) | |
813 | (nth Buffer-menu-sort-column b))) | |
814 | (lambda (a b) | |
815 | (string< (nth Buffer-menu-sort-column a) | |
816 | (nth Buffer-menu-sort-column b))))) | |
817 | list)) | |
818 | (if (eq (car buffer) old-buffer) | |
819 | (setq desired-point (point))) | |
820 | (insert (cadr buffer) | |
821 | ;; Put the buffer name into a text property | |
822 | ;; so we don't have to extract it from the text. | |
823 | ;; This way we avoid problems with unusual buffer names. | |
392640c4 NR |
824 | (let ((name (nth 2 buffer)) |
825 | (size (int-to-string (nth 3 buffer)))) | |
826 | (Buffer-menu-buffer+size name size | |
827 | `(buffer-name ,name | |
828 | buffer ,(car buffer) | |
829 | font-lock-face buffer-menu-buffer | |
830 | mouse-face highlight | |
9201cc28 | 831 | help-echo |
392640c4 NR |
832 | ,(if (>= (length name) |
833 | (- Buffer-menu-buffer+size-width | |
834 | (max (length size) 3) | |
835 | 2)) | |
836 | name | |
837 | "mouse-2: select this buffer")))) | |
a3e5a603 SM |
838 | " " |
839 | (if (> (string-width (nth 4 buffer)) Buffer-menu-mode-width) | |
840 | (truncate-string-to-width (nth 4 buffer) | |
31e02fab | 841 | Buffer-menu-mode-width) |
bc7bb432 JB |
842 | (nth 4 buffer))) |
843 | (when (nth 5 buffer) | |
844 | (indent-to (+ Buffer-menu-buffer-column Buffer-menu-buffer+size-width | |
845 | Buffer-menu-mode-width 4) 1) | |
846 | (princ (abbreviate-file-name (nth 5 buffer)))) | |
847 | (princ "\n")) | |
0b03ce3a | 848 | (Buffer-menu-mode) |
bc7bb432 | 849 | (when Buffer-menu-use-header-line |
748a336b | 850 | (setq header-line-format header)) |
08c82d4d RS |
851 | ;; DESIRED-POINT doesn't have to be set; it is not when the |
852 | ;; current buffer is not displayed for some reason. | |
0b03ce3a | 853 | (and desired-point |
08c82d4d | 854 | (goto-char desired-point)) |
7b0a86ab LT |
855 | (setq Buffer-menu-files-only files-only) |
856 | (set-buffer-modified-p nil) | |
08c82d4d | 857 | (current-buffer)))) |
0b03ce3a | 858 | |
f4872033 | 859 | ;; arch-tag: e7dfcfc9-6cb2-46e4-bf55-8ef1936d83c6 |
c0274f38 | 860 | ;;; buff-menu.el ends here |