emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/bindings.el


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/bindings.el
Date: Sun, 21 Jul 2002 16:23:32 -0400

Index: emacs/lisp/bindings.el
diff -c emacs/lisp/bindings.el:1.103 emacs/lisp/bindings.el:1.104
*** emacs/lisp/bindings.el:1.103        Thu Jul 18 12:03:41 2002
--- emacs/lisp/bindings.el      Sun Jul 21 16:23:32 2002
***************
*** 277,300 ****
  Return the last non-hidden buffer in the buffer list."
    ;; This logic is more or less copied from bury-buffer,
    ;; except that we reverse the buffer list.
!   (let ((fbl  (frame-parameter nil 'buffer-list))
!       (list (buffer-list))
        (pred (frame-parameter nil 'buffer-predicate))
        found notsogood)
!     ;; Merge the frame buffer list with the whole buffer list,
!     ;; and reverse it.
!     (dolist (buffer fbl)
!       (setq list (delq buffer list)))
!     (setq list (nreverse (append fbl list)))
!     (while (not found)
        (unless (or (eq (aref (buffer-name (car list)) 0) ? )
                  ;; If the selected frame has a buffer_predicate,
                  ;; disregard buffers that don't fit the predicate.
                  (and pred (not (funcall pred (car list)))))
        (if (get-buffer-window (car list) 'visible)
!           (unless notsogood (setq notsogood (car list)))
!         (setq found (car list)))))
!     (or found notsogood)))
  
  (defun unbury-buffer () "\
  Switch to the last buffer in the buffer list."
--- 277,300 ----
  Return the last non-hidden buffer in the buffer list."
    ;; This logic is more or less copied from bury-buffer,
    ;; except that we reverse the buffer list.
!   (let ((list (nreverse (buffer-list (selected-frame))))
        (pred (frame-parameter nil 'buffer-predicate))
        found notsogood)
!     (while (and list (not found))
        (unless (or (eq (aref (buffer-name (car list)) 0) ? )
                  ;; If the selected frame has a buffer_predicate,
                  ;; disregard buffers that don't fit the predicate.
                  (and pred (not (funcall pred (car list)))))
        (if (get-buffer-window (car list) 'visible)
!           (or notsogood (eq (car list) (current-buffer)))
!         (setq found (car list))))
!       (pop list))
!     (or found notsogood
!       (get-buffer "*scratch*")
!       (progn
!         (set-buffer-major-mode
!          (get-buffer-create "*scratch*"))
!         (get-buffer "*scratch*")))))
  
  (defun unbury-buffer () "\
  Switch to the last buffer in the buffer list."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]