Mercurial > emacs
changeset 45839:a3da6ddded28
(ibuffer-movement-cycle): New variable.
(ibuffer-backward-line, ibuffer-forward-line): Use it.
author | Colin Walters <walters@gnu.org> |
---|---|
date | Sat, 15 Jun 2002 18:59:03 +0000 |
parents | 431d068148c7 |
children | 6de944301f8a |
files | lisp/ibuffer.el |
diffstat | 1 files changed, 15 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ibuffer.el Sat Jun 15 18:58:51 2002 +0000 +++ b/lisp/ibuffer.el Sat Jun 15 18:59:03 2002 +0000 @@ -221,6 +221,11 @@ (defvar ibuffer-current-format nil) +(defcustom ibuffer-movement-cycle t + "If non-nil, then forward and backwards movement commands cycle." + :type 'boolean + :group 'ibuffer) + (defcustom ibuffer-modified-char ?* "The character to display for modified buffers." :type 'character @@ -893,9 +898,10 @@ (beginning-of-line) (while (> arg 0) (forward-line -1) - (when (or (get-text-property (point) 'ibuffer-title) - (and skip-group-names - (get-text-property (point) 'ibuffer-filter-group-name))) + (when (and ibuffer-movement-cycle + (or (get-text-property (point) 'ibuffer-title) + (and skip-group-names + (get-text-property (point) 'ibuffer-filter-group-name)))) (goto-char (point-max)) (beginning-of-line)) (ibuffer-skip-properties (append '(ibuffer-summary) @@ -914,8 +920,9 @@ (unless arg (setq arg 1)) (beginning-of-line) - (when (or (eobp) - (get-text-property (point) 'ibuffer-summary)) + (when (and ibuffer-movement-cycle + (or (eobp) + (get-text-property (point) 'ibuffer-summary))) (goto-char (point-min))) (when (or (get-text-property (point) 'ibuffer-title) (and skip-group-names @@ -930,8 +937,9 @@ (ibuffer-backward-line (- arg)) (while (> arg 0) (forward-line 1) - (when (or (eobp) - (get-text-property (point) 'ibuffer-summary)) + (when (and ibuffer-movement-cycle + (or (eobp) + (get-text-property (point) 'ibuffer-summary))) (goto-char (point-min))) (decf arg) (ibuffer-skip-properties (append '(ibuffer-title)