[xyzzy:08361] Re: バッファリストの表示位置
- Subject: [xyzzy:08361] Re: バッファリストの表示位置
- From: KAMEI Tetsuya <kamei@xxxxxxxxxxxx>
- X-mailer: KaMail-0.0.2.5 (ITS / PDP-10s)
- X-yzzy-version: 0.2.2.228
Hajime Itohさん、こんにちは。
2002年7月28日(日)[23:31:45]の、
[xyzzy:08358] バッファリストの表示位置
への返事です。
| これを、常に下に表示したいのです。
「常に」というのは無理です。
(defun list-buffers (&optional file-only)
(interactive "p")
(let ((selected (selected-buffer)))
(with-output-to-temp-buffer ("*Buffer List*" (- (truncate (window-lines) 2)))
(let ((tmp (selected-buffer)))
(princ " MR Buffer Size Line Mode File\n")
(princ " -- ------ ---- ---- ---- ----\n")
(dolist (buffer (buffer-list))
(when (not (eq buffer tmp))
(let ((bufname (buffer-name buffer))
(filename (get-buffer-file-name buffer)))
(unless (or (string= bufname " " :end1 1)
(and (null filename) file-only))
(let ((size (buffer-size buffer))
(lines (buffer-lines buffer)))
(format t "~:[ ~;.~]~:[ ~;*~]~:[ ~;%~] ~A~VT ~D~VT ~D~35T ~A~:[~;~49T ~:*~A~]~%"
(eq buffer selected)
(buffer-modified-p buffer)
(buffer-local-value buffer 'buffer-read-only)
bufname
(- 24 (if (zerop size) 0 (floor (log size 10)))) size
(- 32 (if (zerop lines) 0 (floor (log lines 10)))) lines
(buffer-local-value buffer 'mode-name)
filename)))))))
(goto-char (point-min))
(buffer-menu-mode))))
--
亀井哲弥(KAMEI Tetsuya)
kamei@xxxxxxxxxxxx