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: Juanma Barranquero
Subject: [Emacs-diffs] Changes to emacs/lisp/ibuffer.el
Date: Fri, 29 Jul 2005 11:10:38 -0400

Index: emacs/lisp/ibuffer.el
diff -c emacs/lisp/ibuffer.el:1.69 emacs/lisp/ibuffer.el:1.70
*** emacs/lisp/ibuffer.el:1.69  Mon Jul  4 23:08:54 2005
--- emacs/lisp/ibuffer.el       Fri Jul 29 15:10:37 2005
***************
*** 1,6 ****
  ;;; ibuffer.el --- operate on buffers like dired
  
! ;; Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
  
  ;; Author: Colin Walters <address@hidden>
  ;; Maintainer: John Paul Wallington <address@hidden>
--- 1,7 ----
  ;;; ibuffer.el --- operate on buffers like dired
  
! ;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005
! ;;   Free Software Foundation, Inc.
  
  ;; Author: Colin Walters <address@hidden>
  ;; Maintainer: John Paul Wallington <address@hidden>
***************
*** 193,203 ****
  (defvar ibuffer-sorting-reversep nil)
  
  (defcustom ibuffer-elide-long-columns nil
!   "If non-nil, then elide column entries which exceed their max length.
! This variable is deprecated; use the :elide argument of
! `ibuffer-formats' to elide just certain columns."
    :type 'boolean
    :group 'ibuffer)
  
  (defcustom ibuffer-eliding-string "..."
    "The string to use for eliding long columns."
--- 194,205 ----
  (defvar ibuffer-sorting-reversep nil)
  
  (defcustom ibuffer-elide-long-columns nil
!   "If non-nil, then elide column entries which exceed their max length."
    :type 'boolean
    :group 'ibuffer)
+ (make-obsolete-variable 'ibuffer-elide-long-columns
+                         "use the :elide argument of `ibuffer-formats'."
+                         "22.1")
  
  (defcustom ibuffer-eliding-string "..."
    "The string to use for eliding long columns."
***************
*** 307,319 ****
    "Hook run when `ibuffer' is called."
    :type 'hook
    :group 'ibuffer)
! (defvaralias 'ibuffer-hooks 'ibuffer-hook)
  
  (defcustom ibuffer-mode-hook nil
    "Hook run upon entry into `ibuffer-mode'."
    :type 'hook
    :group 'ibuffer)
! (defvaralias 'ibuffer-mode-hooks 'ibuffer-mode-hook)
  
  (defcustom ibuffer-load-hook nil
    "Hook run when Ibuffer is loaded."
--- 309,323 ----
    "Hook run when `ibuffer' is called."
    :type 'hook
    :group 'ibuffer)
! (define-obsolete-variable-alias 'ibuffer-hooks
!                                 'ibuffer-hook "22.1")
  
  (defcustom ibuffer-mode-hook nil
    "Hook run upon entry into `ibuffer-mode'."
    :type 'hook
    :group 'ibuffer)
! (define-obsolete-variable-alias 'ibuffer-mode-hooks
!                                 'ibuffer-mode-hook "22.1")
  
  (defcustom ibuffer-load-hook nil
    "Hook run when Ibuffer is loaded."
***************
*** 838,844 ****
        (while list
        (dotimes (i (1- columns))
          (insert (concat (car list) (make-string (- max (length (car list)))
!                                                 ? )))
          (setq list (cdr list)))
        (when (not (null list))
          (insert (pop list)))
--- 842,848 ----
        (while list
        (dotimes (i (1- columns))
          (insert (concat (car list) (make-string (- max (length (car list)))
!                                                 ?\s)))
          (setq list (cdr list)))
        (when (not (null list))
          (insert (pop list)))
***************
*** 861,867 ****
          (let ((mark (ibuffer-current-mark)))
            (setq buffer-read-only nil)
            (if (eq mark ibuffer-marked-char)
!               (ibuffer-set-mark ? )
              (ibuffer-set-mark ibuffer-marked-char)))))
      (setq buffer-read-only t)))
  
--- 865,871 ----
          (let ((mark (ibuffer-current-mark)))
            (setq buffer-read-only nil)
            (if (eq mark ibuffer-marked-char)
!               (ibuffer-set-mark ?\s)
              (ibuffer-set-mark ibuffer-marked-char)))))
      (setq buffer-read-only t)))
  
***************
*** 1153,1159 ****
    (if all
        (ibuffer-map-lines-nomodify
         #'(lambda (buf mark)
!          (not (char-equal mark ? ))))
      (ibuffer-map-lines-nomodify
       #'(lambda (buf mark)
         (char-equal mark ibuffer-marked-char)))))
--- 1157,1163 ----
    (if all
        (ibuffer-map-lines-nomodify
         #'(lambda (buf mark)
!          (not (char-equal mark ?\s))))
      (ibuffer-map-lines-nomodify
       #'(lambda (buf mark)
         (char-equal mark ibuffer-marked-char)))))
***************
*** 1227,1244 ****
       ((char-equal mark ibuffer-marked-char)
        (ibuffer-map-marked-lines
         #'(lambda (buf mark)
!          (ibuffer-set-mark-1 ? )
           t)))
       ((char-equal mark ibuffer-deletion-char)
        (ibuffer-map-deletion-lines
         #'(lambda (buf mark)
!          (ibuffer-set-mark-1 ? )
           t)))
       (t
        (ibuffer-map-lines
         #'(lambda (buf mark)
!          (when (not (char-equal mark ? ))
!            (ibuffer-set-mark-1 ? ))
           t)))))
    (ibuffer-redisplay t))
  
--- 1231,1248 ----
       ((char-equal mark ibuffer-marked-char)
        (ibuffer-map-marked-lines
         #'(lambda (buf mark)
!          (ibuffer-set-mark-1 ?\s)
           t)))
       ((char-equal mark ibuffer-deletion-char)
        (ibuffer-map-deletion-lines
         #'(lambda (buf mark)
!          (ibuffer-set-mark-1 ?\s)
           t)))
       (t
        (ibuffer-map-lines
         #'(lambda (buf mark)
!          (when (not (char-equal mark ?\s))
!            (ibuffer-set-mark-1 ?\s))
           t)))))
    (ibuffer-redisplay t))
  
***************
*** 1255,1263 ****
         (ibuffer-map-lines
          #'(lambda (buf mark)
              (cond ((eq mark ibuffer-marked-char)
!                    (ibuffer-set-mark-1 ? )
                     nil)
!                   ((eq mark ? )
                     (ibuffer-set-mark-1 ibuffer-marked-char)
                     t)
                    (t
--- 1259,1267 ----
         (ibuffer-map-lines
          #'(lambda (buf mark)
              (cond ((eq mark ibuffer-marked-char)
!                    (ibuffer-set-mark-1 ?\s)
                     nil)
!                   ((eq mark ?\s)
                     (ibuffer-set-mark-1 ibuffer-marked-char)
                     t)
                    (t
***************
*** 1276,1288 ****
    "Unmark the buffer on this line, and move forward ARG lines.
  If point is on a group name, this function operates on that group."
    (interactive "P")
!   (ibuffer-mark-interactive arg ?  1))
  
  (defun ibuffer-unmark-backward (arg)
    "Unmark the buffer on this line, and move backward ARG lines.
  If point is on a group name, this function operates on that group."
    (interactive "P")
!   (ibuffer-mark-interactive arg ?  -1))
  
  (defun ibuffer-mark-interactive (arg mark movement)
    (assert (eq major-mode 'ibuffer-mode))
--- 1280,1292 ----
    "Unmark the buffer on this line, and move forward ARG lines.
  If point is on a group name, this function operates on that group."
    (interactive "P")
!   (ibuffer-mark-interactive arg ?\s 1))
  
  (defun ibuffer-unmark-backward (arg)
    "Unmark the buffer on this line, and move backward ARG lines.
  If point is on a group name, this function operates on that group."
    (interactive "P")
!   (ibuffer-mark-interactive arg ?\s -1))
  
  (defun ibuffer-mark-interactive (arg mark movement)
    (assert (eq major-mode 'ibuffer-mode))
***************
*** 1409,1416 ****
      `(substring ,strvar 0 ,maxvar)))
  
  (defun ibuffer-compile-make-format-form (strvar widthform alignment)
!   (let* ((left `(make-string tmp2 ? ))
!        (right `(make-string (- tmp1 tmp2) ? )))
      `(progn
         (setq tmp1 ,widthform
             tmp2 (/ tmp1 2))
--- 1413,1420 ----
      `(substring ,strvar 0 ,maxvar)))
  
  (defun ibuffer-compile-make-format-form (strvar widthform alignment)
!   (let* ((left `(make-string tmp2 ?\s))
!        (right `(make-string (- tmp1 tmp2) ?\s)))
      `(progn
         (setq tmp1 ,widthform
             tmp2 (/ tmp1 2))
***************
*** 1690,1696 ****
         (and (boundp 'dired-directory)
              (if (stringp dired-directory)
                  dired-directory
!               (car dired-directory))) 
         ""))))
  
  (define-ibuffer-column filename-and-process
--- 1694,1700 ----
         (and (boundp 'dired-directory)
              (if (stringp dired-directory)
                  dired-directory
!               (car dired-directory)))
         ""))))
  
  (define-ibuffer-column filename-and-process
***************
*** 1724,1731 ****
        filename)))
  
  (defun ibuffer-format-column (str width alignment)
!   (let ((left (make-string (/ width 2) ? ))
!       (right (make-string (- width (/ width 2)) ? )))
      (case alignment
        (:right (concat left right str))
        (:center (concat left str right))
--- 1728,1735 ----
        filename)))
  
  (defun ibuffer-format-column (str width alignment)
!   (let ((left (make-string (/ width 2) ?\s))
!       (right (make-string (- width (/ width 2)) ?\s)))
      (case alignment
        (:right (concat left right str))
        (:center (concat left str right))
***************
*** 1881,1887 ****
      (mapcar #'(lambda (buf) (let ((e (assq buf bufs)))
                              (if e
                                  e
!                               (cons buf ? ))))
            curbufs)))
  
  (defun ibuffer-buf-matches-predicates (buf predicates)
--- 1885,1891 ----
      (mapcar #'(lambda (buf) (let ((e (assq buf bufs)))
                              (if e
                                  e
!                               (cons buf ?\s))))
            curbufs)))
  
  (defun ibuffer-buf-matches-predicates (buf predicates)
***************
*** 1989,1998 ****
                      (buffer-substring (point) (line-end-position)))))
           (apply #'insert (mapcar
                            #'(lambda (c)
!                               (if (not (or (char-equal c ? )
                                             (char-equal c ?\n)))
                                    ?-
!                                 ? ))
                            str)))
         (insert "\n"))
         (point))
--- 1993,2002 ----
                      (buffer-substring (point) (line-end-position)))))
           (apply #'insert (mapcar
                            #'(lambda (c)
!                               (if (not (or (char-equal c ?\s)
                                             (char-equal c ?\n)))
                                    ?-
!                                 ?\s))
                            str)))
         (insert "\n"))
         (point))
***************
*** 2011,2017 ****
           (dolist (element format)
             (insert
              (if (stringp element)
!                 (make-string (length element) ? )
                (let ((sym (car element)))
                  (let ((min (cadr element))
                        ;; (max (caddr element))
--- 2015,2021 ----
           (dolist (element format)
             (insert
              (if (stringp element)
!                 (make-string (length element) ?\s)
                (let ((sym (car element)))
                  (let ((min (cadr element))
                        ;; (max (caddr element))
***************
*** 2023,2029 ****
                                        (funcall (get sym 
'ibuffer-column-summarizer)
                                                 (get sym 
'ibuffer-column-summary))
                                      (make-string (length (get sym 
'ibuffer-column-name))
!                                                  ? )))
                           (len (length summary)))
                      (if (< len min)
                          (ibuffer-format-column summary
--- 2027,2033 ----
                                        (funcall (get sym 
'ibuffer-column-summarizer)
                                                 (get sym 
'ibuffer-column-summary))
                                      (make-string (length (get sym 
'ibuffer-column-name))
!                                                  ?\s)))
                           (len (length summary)))
                      (if (< len min)
                          (ibuffer-format-column summary
***************
*** 2241,2262 ****
  ;;;###autoload
  (defun ibuffer (&optional other-window-p name qualifiers noselect
                          shrink filter-groups formats)
!   "Begin using `ibuffer' to edit a list of buffers.
  Type 'h' after entering ibuffer for more information.
  
! Optional argument OTHER-WINDOW-P says to use another window.
! Optional argument NAME specifies the name of the buffer; it defaults
! to \"*Ibuffer*\".
! Optional argument QUALIFIERS is an initial set of filtering qualifiers
! to use; see `ibuffer-filtering-qualifiers'.
! Optional argument NOSELECT means don't select the Ibuffer buffer.
! Optional argument SHRINK means shrink the buffer to minimal size.  The
! special value `onewindow' means always use another window.
! Optional argument FILTER-GROUPS is an initial set of filtering
! groups to use; see `ibuffer-filter-groups'.
! Optional argument FORMATS is the value to use for `ibuffer-formats'.
! If specified, then the variable `ibuffer-formats' will have that value
! locally in this buffer."
    (interactive "P")
    (when ibuffer-use-other-window
      (setq other-window-p t))
--- 2245,2266 ----
  ;;;###autoload
  (defun ibuffer (&optional other-window-p name qualifiers noselect
                          shrink filter-groups formats)
!   "Begin using Ibuffer to edit a list of buffers.
  Type 'h' after entering ibuffer for more information.
  
! All arguments are optional.
! OTHER-WINDOW-P says to use another window.
! NAME specifies the name of the buffer (defaults to \"*Ibuffer*\").
! QUALIFIERS is an initial set of filtering qualifiers to use;
!   see `ibuffer-filtering-qualifiers'.
! NOSELECT means don't select the Ibuffer buffer.
! SHRINK means shrink the buffer to minimal size.  The special
!   value `onewindow' means always use another window.
! FILTER-GROUPS is an initial set of filtering groups to use;
!   see `ibuffer-filter-groups'.
! FORMATS is the value to use for `ibuffer-formats'.
!   If specified, then the variable `ibuffer-formats' will have
!   that value locally in this buffer."
    (interactive "P")
    (when ibuffer-use-other-window
      (setq other-window-p t))
***************
*** 2297,2303 ****
  (put 'ibuffer-mode 'mode-class 'special)
  (defun ibuffer-mode ()
    "A major mode for viewing a list of buffers.
! In ibuffer, you can conveniently perform many operations on the
  currently open buffers, in addition to filtering your view to a
  particular subset of them, and sorting by various criteria.
  
--- 2301,2307 ----
  (put 'ibuffer-mode 'mode-class 'special)
  (defun ibuffer-mode ()
    "A major mode for viewing a list of buffers.
! In Ibuffer, you can conveniently perform many operations on the
  currently open buffers, in addition to filtering your view to a
  particular subset of them, and sorting by various criteria.
  




reply via email to

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