emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Colin Walters
Subject: [Emacs-diffs] Changes to emacs/lisp/ibuffer.el
Date: Wed, 17 Apr 2002 18:38:11 -0400

Index: emacs/lisp/ibuffer.el
diff -c emacs/lisp/ibuffer.el:1.18 emacs/lisp/ibuffer.el:1.19
*** emacs/lisp/ibuffer.el:1.18  Sat Apr 13 21:50:57 2002
--- emacs/lisp/ibuffer.el       Wed Apr 17 18:38:10 2002
***************
*** 842,855 ****
        (forward-line 1))
        (decf arg))))
  
! (defun ibuffer-visit-buffer ()
!   "Visit the buffer on this line."
!   (interactive)
    (let ((buf (ibuffer-current-buffer)))
!     (unless (buffer-live-p buf)
!       (error "Buffer %s has been killed!" buf))
      (bury-buffer (current-buffer))
!     (switch-to-buffer buf)))
  
  (defun ibuffer-visit-buffer-other-window (&optional noselect)
    "Visit the buffer on this line in another window."
--- 842,862 ----
        (forward-line 1))
        (decf arg))))
  
! (defun ibuffer-visit-buffer (&optional single)
!   "Visit the buffer on this line.
! 
! If optional argument SINGLE is non-nil, then also ensure there is only
! one window."
!   (interactive "P")
    (let ((buf (ibuffer-current-buffer)))
!     (if (bufferp buf)
!       (unless (buffer-live-p buf)
!         (error "Buffer %s has been killed!" buf))
!       (error "No buffer on this line"))
      (bury-buffer (current-buffer))
!     (switch-to-buffer buf)
!     (when single
!       (delete-other-windows))))
  
  (defun ibuffer-visit-buffer-other-window (&optional noselect)
    "Visit the buffer on this line in another window."
***************
*** 881,891 ****
  (defun ibuffer-visit-buffer-1-window ()
    "Visit the buffer on this line, and delete other windows."
    (interactive)
!   (let ((buf (ibuffer-current-buffer)))
!     (unless (buffer-live-p buf)
!       (error "Buffer %s has been killed!" buf))
!     (switch-to-buffer buf)
!     (delete-other-windows)))
  
  (defun ibuffer-bury-buffer ()
    "Bury the buffer on this line."
--- 888,894 ----
  (defun ibuffer-visit-buffer-1-window ()
    "Visit the buffer on this line, and delete other windows."
    (interactive)
!   (ibuffer-visit-buffer t))
  
  (defun ibuffer-bury-buffer ()
    "Bury the buffer on this line."
***************
*** 1668,1682 ****
                      (car e)))
                (ibuffer-current-state-list))))
  
! (defun ibuffer-current-state-list ()
!   "Return a list like (BUF . MARK) of all buffers in an ibuffer."
    (let ((ibuffer-current-state-list-tmp '()))
      ;; ah, if only we had closures.  I bet this will mysteriously
      ;; break later.  Don't blame me.
!     (ibuffer-map-lines-nomodify
!      #'(lambda (buf mark)
!        (when (buffer-live-p buf)
!          (push (cons buf mark) ibuffer-current-state-list-tmp))))
      (nreverse ibuffer-current-state-list-tmp)))
  
  (defun ibuffer-current-buffers-with-marks (curbufs)
--- 1671,1692 ----
                      (car e)))
                (ibuffer-current-state-list))))
  
! (defun ibuffer-current-state-list (&optional pos)
!   "Return a list like (BUF . MARK) of all buffers in an ibuffer.
! If POS is non-nil, return a list like (BUF MARK POINT), where POINT is
! the value of point at the beginning of the line for that buffer."
    (let ((ibuffer-current-state-list-tmp '()))
      ;; ah, if only we had closures.  I bet this will mysteriously
      ;; break later.  Don't blame me.
!     (if pos
!       (ibuffer-map-lines-nomodify
!        #'(lambda (buf mark)
!            (when (buffer-live-p buf)
!              (push (list buf mark (point)) ibuffer-current-state-list-tmp))))
!       (ibuffer-map-lines-nomodify
!        #'(lambda (buf mark)
!          (when (buffer-live-p buf)
!            (push (cons buf mark) ibuffer-current-state-list-tmp)))))
      (nreverse ibuffer-current-state-list-tmp)))
  
  (defun ibuffer-current-buffers-with-marks (curbufs)



reply via email to

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