[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/buff-menu.el [lexbind]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/buff-menu.el [lexbind] |
Date: |
Wed, 08 Dec 2004 18:49:02 -0500 |
Index: emacs/lisp/buff-menu.el
diff -c emacs/lisp/buff-menu.el:1.54.4.8 emacs/lisp/buff-menu.el:1.54.4.9
*** emacs/lisp/buff-menu.el:1.54.4.8 Thu Nov 4 13:12:40 2004
--- emacs/lisp/buff-menu.el Wed Dec 8 23:31:42 2004
***************
*** 1,7 ****
;;; buff-menu.el --- buffer menu main function and support functions
! ;; Copyright (C) 1985, 86, 87, 93, 94, 95, 2000, 2001, 2002, 03, 2004
! ;; Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: convenience
--- 1,7 ----
;;; buff-menu.el --- buffer menu main function and support functions
! ;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 2000, 2001, 2002, 2003,
! ;; 2004 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: convenience
***************
*** 632,643 ****
(Buffer-menu-sort ,column))))
map)))
! (defun list-buffers-noselect (&optional files-only)
"Create and return a buffer with a list of names of existing buffers.
The buffer is named `*Buffer List*'.
Note that buffers with names starting with spaces are omitted.
Non-null optional arg FILES-ONLY means mention only file buffers.
For more information, see the function `buffer-menu'."
(let* ((old-buffer (current-buffer))
(standard-output standard-output)
--- 632,646 ----
(Buffer-menu-sort ,column))))
map)))
! (defun list-buffers-noselect (&optional files-only buffer-list)
"Create and return a buffer with a list of names of existing buffers.
The buffer is named `*Buffer List*'.
Note that buffers with names starting with spaces are omitted.
Non-null optional arg FILES-ONLY means mention only file buffers.
+ If BUFFER-LIST is non-nil, it should be a list of buffers;
+ it means list those buffers and no others.
+
For more information, see the function `buffer-menu'."
(let* ((old-buffer (current-buffer))
(standard-output standard-output)
***************
*** 649,655 ****
" "
(Buffer-menu-make-sort-button "Mode" 4) mode-end
(Buffer-menu-make-sort-button "File" 5) "\n"))
! list desired-point name mode file)
(when Buffer-menu-use-header-line
(let ((pos 0))
;; Turn spaces in the header into stretch specs so they work
--- 652,658 ----
" "
(Buffer-menu-make-sort-button "Mode" 4) mode-end
(Buffer-menu-make-sort-button "File" 5) "\n"))
! list desired-point)
(when Buffer-menu-use-header-line
(let ((pos 0))
;; Turn spaces in the header into stretch specs so they work
***************
*** 669,711 ****
(insert (Buffer-menu-buffer+size "------" "----"))
(insert " ----" mode-end "----\n")
(put-text-property 1 (point) 'intangible t))
! (setq list
! (delq t
! (mapcar
! (lambda (buffer)
! (with-current-buffer buffer
! (setq name (buffer-name)
! mode (concat (format-mode-line mode-name nil nil
buffer)
! (if mode-line-process
! (format-mode-line
mode-line-process nil nil buffer)))
! file (buffer-file-name))
! (cond
! ;; Don't mention internal buffers.
! ((and (string= (substring name 0 1) " ") (null file)))
! ;; Maybe don't mention buffers without files.
! ((and files-only (not file)))
! ((string= name "*Buffer List*"))
! ;; Otherwise output info.
! (t
! (unless file
! ;; No visited file. Check local value of
! ;; list-buffers-directory.
! (when (and (boundp 'list-buffers-directory)
! list-buffers-directory)
! (setq file list-buffers-directory)))
! (list buffer
! (format "%c%c%c "
! (if (eq buffer old-buffer) ?. ? )
! ;; Handle readonly status. The output
buffer is special
! ;; cased to appear readonly; it is
actually made so at a
! ;; later date.
! (if (or (eq buffer standard-output)
! buffer-read-only)
! ?% ? )
! ;; Identify modified buffers.
! (if (buffer-modified-p) ?* ? ))
! name (buffer-size) mode file)))))
! (buffer-list))))
(dolist (buffer
(if Buffer-menu-sort-column
(sort list
--- 672,719 ----
(insert (Buffer-menu-buffer+size "------" "----"))
(insert " ----" mode-end "----\n")
(put-text-property 1 (point) 'intangible t))
! (if buffer-list
! (setq list buffer-list)
! ;; Collect info for every buffer we're interested in.
! (dolist (buffer (buffer-list))
! (with-current-buffer buffer
! (let ((name (buffer-name))
! (file buffer-file-name))
! (cond
! ;; Don't mention internal buffers.
! ((and (string= (substring name 0 1) " ") (null file)))
! ;; Maybe don't mention buffers without files.
! ((and files-only (not file)))
! ((string= name "*Buffer List*"))
! ;; Otherwise output info.
! (t
! (let ((mode (concat (format-mode-line mode-name nil nil buffer)
! (if mode-line-process
! (format-mode-line mode-line-process
! nil nil buffer))))
! (bits (string
! (if (eq buffer old-buffer) ?. ?\ )
! ;; Handle readonly status. The output buffer
! ;; is special cased to appear readonly; it is
! ;; actually made so at a later date.
! (if (or (eq buffer standard-output)
! buffer-read-only)
! ?% ?\ )
! ;; Identify modified buffers.
! (if (buffer-modified-p) ?* ?\ )
! ;; Space separator.
! ?\ )))
! (unless file
! ;; No visited file. Check local value of
! ;; list-buffers-directory.
! (when (and (boundp 'list-buffers-directory)
! list-buffers-directory)
! (setq file list-buffers-directory)))
! (push (list buffer bits name (buffer-size) mode file)
! list)))))))
! ;; Preserve the original buffer-list ordering, just in case.
! (setq list (nreverse list)))
! ;; Place the buffers's info in the output buffer, sorted if necessary.
(dolist (buffer
(if Buffer-menu-sort-column
(sort list
***************
*** 750,754 ****
(set-buffer-modified-p nil)
(current-buffer))))
! ;;; arch-tag: e7dfcfc9-6cb2-46e4-bf55-8ef1936d83c6
;;; buff-menu.el ends here
--- 758,762 ----
(set-buffer-modified-p nil)
(current-buffer))))
! ;; arch-tag: e7dfcfc9-6cb2-46e4-bf55-8ef1936d83c6
;;; buff-menu.el ends here
- [Emacs-diffs] Changes to emacs/lisp/buff-menu.el [lexbind],
Miles Bader <=