diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/bs.el | 33 |
2 files changed, 22 insertions, 20 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f6e3dd0bdf2..b8be970a74c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,6 +1,11 @@ | |||
| 1 | 2007-10-11 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * bs.el (bs--mark-unmark): New function. | ||
| 4 | (bs-mark-current, bs-unmark-current): Use it. | ||
| 5 | |||
| 1 | 2007-10-11 Eric S. Raymond <esr@snark.thyrsus.com> | 6 | 2007-10-11 Eric S. Raymond <esr@snark.thyrsus.com> |
| 2 | 7 | ||
| 3 | * vc.el (vc-diff): | 8 | * vc.el (vc-diff): |
| 4 | (vc-diff-internal): Bug fixes by Juanma Barranquero. Temporarily | 9 | (vc-diff-internal): Bug fixes by Juanma Barranquero. Temporarily |
| 5 | disable the check for his edge case, it's calling some brittle | 10 | disable the check for his edge case, it's calling some brittle |
| 6 | code. | 11 | code. |
| @@ -13,7 +18,7 @@ | |||
| 13 | 18 | ||
| 14 | 2007-10-11 Eric S. Raymond <esr@snark.thyrsus.com> | 19 | 2007-10-11 Eric S. Raymond <esr@snark.thyrsus.com> |
| 15 | 20 | ||
| 16 | * vc.el: Address an edge case in vc-diff pointed out by | 21 | * vc.el: Address an edge case in vc-diff pointed out by |
| 17 | Juanma Barranquero. This is an experimental fix and may change. | 22 | Juanma Barranquero. This is an experimental fix and may change. |
| 18 | 23 | ||
| 19 | * vc-hooks.el (vc-registered): Robustify this function a bit | 24 | * vc-hooks.el (vc-registered): Robustify this function a bit |
diff --git a/lisp/bs.el b/lisp/bs.el index 4d13c97c2fd..6390bd2dd81 100644 --- a/lisp/bs.el +++ b/lisp/bs.el | |||
| @@ -864,35 +864,32 @@ the status of buffer on current line." | |||
| 864 | (bs--set-window-height) | 864 | (bs--set-window-height) |
| 865 | (bs--show-config-message what)) | 865 | (bs--show-config-message what)) |
| 866 | 866 | ||
| 867 | (defun bs--mark-unmark (count fun) | ||
| 868 | "Call FUN on COUNT consecutive buffers of *buffer-selection*." | ||
| 869 | (let ((dir (if (> count 0) 1 -1))) | ||
| 870 | (dotimes (i (abs count)) | ||
| 871 | (let ((buffer (bs--current-buffer))) | ||
| 872 | (when buffer (funcall fun buffer)) | ||
| 873 | (bs--update-current-line) | ||
| 874 | (bs-down dir))))) | ||
| 875 | |||
| 867 | (defun bs-mark-current (count) | 876 | (defun bs-mark-current (count) |
| 868 | "Mark buffers. | 877 | "Mark buffers. |
| 869 | COUNT is the number of buffers to mark. | 878 | COUNT is the number of buffers to mark. |
| 870 | Move cursor vertically down COUNT lines." | 879 | Move cursor vertically down COUNT lines." |
| 871 | (interactive "p") | 880 | (interactive "p") |
| 872 | (let ((dir (if (> count 0) 1 -1)) | 881 | (bs--mark-unmark count |
| 873 | (count (abs count))) | 882 | (lambda (buf) |
| 874 | (while (> count 0) | 883 | (add-to-list 'bs--marked-buffers buf)))) |
| 875 | (let ((buffer (bs--current-buffer))) | ||
| 876 | (if buffer | ||
| 877 | (setq bs--marked-buffers (cons buffer bs--marked-buffers))) | ||
| 878 | (bs--update-current-line) | ||
| 879 | (bs-down dir)) | ||
| 880 | (setq count (1- count))))) | ||
| 881 | 884 | ||
| 882 | (defun bs-unmark-current (count) | 885 | (defun bs-unmark-current (count) |
| 883 | "Unmark buffers. | 886 | "Unmark buffers. |
| 884 | COUNT is the number of buffers to unmark. | 887 | COUNT is the number of buffers to unmark. |
| 885 | Move cursor vertically down COUNT lines." | 888 | Move cursor vertically down COUNT lines." |
| 886 | (interactive "p") | 889 | (interactive "p") |
| 887 | (let ((dir (if (> count 0) 1 -1)) | 890 | (bs--mark-unmark count |
| 888 | (count (abs count))) | 891 | (lambda (buf) |
| 889 | (while (> count 0) | 892 | (setq bs--marked-buffers (delq buf bs--marked-buffers))))) |
| 890 | (let ((buffer (bs--current-buffer))) | ||
| 891 | (if buffer | ||
| 892 | (setq bs--marked-buffers (delq buffer bs--marked-buffers))) | ||
| 893 | (bs--update-current-line) | ||
| 894 | (bs-down dir)) | ||
| 895 | (setq count (1- count))))) | ||
| 896 | 893 | ||
| 897 | (defun bs--show-config-message (what) | 894 | (defun bs--show-config-message (what) |
| 898 | "Show message indicating the new showing status WHAT. | 895 | "Show message indicating the new showing status WHAT. |