diff options
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/ibuffer.el | 25 |
2 files changed, 22 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8ac744bb980..8da19539c9a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-11-17 Andreas Politz <politza@fh-trier.de> | ||
| 2 | |||
| 3 | * ibuffer.el (ibuffer-mark-forward, ibuffer-unmark-forward) | ||
| 4 | (ibuffer-unmark-backward, ibuffer-mark-interactive): Support plain | ||
| 5 | prefix and negative numeric prefix args (Bug#12795). | ||
| 6 | |||
| 1 | 2012-11-17 Stephen Berman <stephen.berman@gmx.net> | 7 | 2012-11-17 Stephen Berman <stephen.berman@gmx.net> |
| 2 | 8 | ||
| 3 | * play/gamegrid.el (gamegrid-add-score-with-update-game-score-1): | 9 | * play/gamegrid.el (gamegrid-add-score-with-update-game-score-1): |
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 72ca189e9d5..4e0ac1a4856 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el | |||
| @@ -1362,24 +1362,27 @@ group." | |||
| 1362 | (defun ibuffer-mark-forward (arg) | 1362 | (defun ibuffer-mark-forward (arg) |
| 1363 | "Mark the buffer on this line, and move forward ARG lines. | 1363 | "Mark the buffer on this line, and move forward ARG lines. |
| 1364 | If point is on a group name, this function operates on that group." | 1364 | If point is on a group name, this function operates on that group." |
| 1365 | (interactive "P") | 1365 | (interactive "p") |
| 1366 | (ibuffer-mark-interactive arg ibuffer-marked-char 1)) | 1366 | (ibuffer-mark-interactive arg ibuffer-marked-char)) |
| 1367 | 1367 | ||
| 1368 | (defun ibuffer-unmark-forward (arg) | 1368 | (defun ibuffer-unmark-forward (arg) |
| 1369 | "Unmark the buffer on this line, and move forward ARG lines. | 1369 | "Unmark the buffer on this line, and move forward ARG lines. |
| 1370 | If point is on a group name, this function operates on that group." | 1370 | If point is on a group name, this function operates on that group." |
| 1371 | (interactive "P") | 1371 | (interactive "p") |
| 1372 | (ibuffer-mark-interactive arg ?\s 1)) | 1372 | (ibuffer-mark-interactive arg ?\s)) |
| 1373 | 1373 | ||
| 1374 | (defun ibuffer-unmark-backward (arg) | 1374 | (defun ibuffer-unmark-backward (arg) |
| 1375 | "Unmark the buffer on this line, and move backward ARG lines. | 1375 | "Unmark the buffer on this line, and move backward ARG lines. |
| 1376 | If point is on a group name, this function operates on that group." | 1376 | If point is on a group name, this function operates on that group." |
| 1377 | (interactive "P") | 1377 | (interactive "p") |
| 1378 | (ibuffer-mark-interactive arg ?\s -1)) | 1378 | (ibuffer-unmark-forward (- arg))) |
| 1379 | 1379 | ||
| 1380 | (defun ibuffer-mark-interactive (arg mark movement) | 1380 | (defun ibuffer-mark-interactive (arg mark &optional movement) |
| 1381 | (ibuffer-assert-ibuffer-mode) | 1381 | (ibuffer-assert-ibuffer-mode) |
| 1382 | (or arg (setq arg 1)) | 1382 | (or arg (setq arg 1)) |
| 1383 | ;; deprecated movement argument | ||
| 1384 | (when (and movement (< movement 0)) | ||
| 1385 | (setq arg (- arg))) | ||
| 1383 | (ibuffer-forward-line 0) | 1386 | (ibuffer-forward-line 0) |
| 1384 | (ibuffer-aif (get-text-property (point) 'ibuffer-filter-group-name) | 1387 | (ibuffer-aif (get-text-property (point) 'ibuffer-filter-group-name) |
| 1385 | (progn | 1388 | (progn |
| @@ -1389,8 +1392,12 @@ If point is on a group name, this function operates on that group." | |||
| 1389 | (let ((inhibit-read-only t)) | 1392 | (let ((inhibit-read-only t)) |
| 1390 | (while (> arg 0) | 1393 | (while (> arg 0) |
| 1391 | (ibuffer-set-mark mark) | 1394 | (ibuffer-set-mark mark) |
| 1392 | (ibuffer-forward-line movement t) | 1395 | (ibuffer-forward-line 1 t) |
| 1393 | (setq arg (1- arg)))))) | 1396 | (setq arg (1- arg))) |
| 1397 | (while (< arg 0) | ||
| 1398 | (ibuffer-forward-line -1 t) | ||
| 1399 | (ibuffer-set-mark mark) | ||
| 1400 | (setq arg (1+ arg)))))) | ||
| 1394 | 1401 | ||
| 1395 | (defun ibuffer-set-mark (mark) | 1402 | (defun ibuffer-set-mark (mark) |
| 1396 | (ibuffer-assert-ibuffer-mode) | 1403 | (ibuffer-assert-ibuffer-mode) |