[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r110917: Fix prefix arg handling in i
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r110917: Fix prefix arg handling in ibuffer marking commands. |
Date: |
Sat, 17 Nov 2012 15:15:23 +0800 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 110917
fixes bug: http://debbugs.gnu.org/12795
author: Andreas Politz <address@hidden>
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sat 2012-11-17 15:15:23 +0800
message:
Fix prefix arg handling in ibuffer marking commands.
* ibuffer.el (ibuffer-mark-forward, ibuffer-unmark-forward)
(ibuffer-unmark-backward, ibuffer-mark-interactive): Support plain
prefix and negative numeric prefix args.
modified:
lisp/ChangeLog
lisp/ibuffer.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-11-17 07:00:35 +0000
+++ b/lisp/ChangeLog 2012-11-17 07:15:23 +0000
@@ -1,3 +1,9 @@
+2012-11-17 Andreas Politz <address@hidden>
+
+ * ibuffer.el (ibuffer-mark-forward, ibuffer-unmark-forward)
+ (ibuffer-unmark-backward, ibuffer-mark-interactive): Support plain
+ prefix and negative numeric prefix args (Bug#12795).
+
2012-11-17 Stephen Berman <address@hidden>
* play/gamegrid.el (gamegrid-add-score-with-update-game-score-1):
=== modified file 'lisp/ibuffer.el'
--- a/lisp/ibuffer.el 2012-11-11 02:22:26 +0000
+++ b/lisp/ibuffer.el 2012-11-17 07:15:23 +0000
@@ -1362,24 +1362,27 @@
(defun ibuffer-mark-forward (arg)
"Mark 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 ibuffer-marked-char 1))
+ (interactive "p")
+ (ibuffer-mark-interactive arg ibuffer-marked-char))
(defun ibuffer-unmark-forward (arg)
"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))
+ (interactive "p")
+ (ibuffer-mark-interactive arg ?\s))
(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))
+ (interactive "p")
+ (ibuffer-unmark-forward (- arg)))
-(defun ibuffer-mark-interactive (arg mark movement)
+(defun ibuffer-mark-interactive (arg mark &optional movement)
(ibuffer-assert-ibuffer-mode)
(or arg (setq arg 1))
+ ;; deprecated movement argument
+ (when (and movement (< movement 0))
+ (setq arg (- arg)))
(ibuffer-forward-line 0)
(ibuffer-aif (get-text-property (point) 'ibuffer-filter-group-name)
(progn
@@ -1389,8 +1392,12 @@
(let ((inhibit-read-only t))
(while (> arg 0)
(ibuffer-set-mark mark)
- (ibuffer-forward-line movement t)
- (setq arg (1- arg))))))
+ (ibuffer-forward-line 1 t)
+ (setq arg (1- arg)))
+ (while (< arg 0)
+ (ibuffer-forward-line -1 t)
+ (ibuffer-set-mark mark)
+ (setq arg (1+ arg))))))
(defun ibuffer-set-mark (mark)
(ibuffer-assert-ibuffer-mode)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r110917: Fix prefix arg handling in ibuffer marking commands.,
Chong Yidong <=