diff options
| author | Dan Nicolaescu | 2008-02-21 08:26:00 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2008-02-21 08:26:00 +0000 |
| commit | 8bb38e87646cd0813f3fe0395fafab86fab7d236 (patch) | |
| tree | 782c48358367131b37aeedbbf5c8c904bec5a737 | |
| parent | 630802d650a0e69f96fd5464fe16cbb293c69a0a (diff) | |
| download | emacs-8bb38e87646cd0813f3fe0395fafab86fab7d236.tar.gz emacs-8bb38e87646cd0813f3fe0395fafab86fab7d236.zip | |
(vc-status-mark, vc-status-unmark): New functions.
(vc-status-mode-map, vc-status-mode-menu): Mark them instead for
vc-status-mark-file and vc-status-unmark-file.
(vc-status-mark-unmark): New function.
(vc-status-previous-line, vc-status-mark-all-files): No longer
interactive.
| -rw-r--r-- | lisp/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/vc.el | 40 |
2 files changed, 41 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ce1d263b0ae..6a8753690a6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2008-02-21 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 2 | |||
| 3 | * vc.el (vc-status-mark, vc-status-unmark): New functions. | ||
| 4 | (vc-status-mode-map, vc-status-mode-menu): Mark them instead for | ||
| 5 | vc-status-mark-file and vc-status-unmark-file. | ||
| 6 | (vc-status-mark-unmark): New function. | ||
| 7 | (vc-status-previous-line, vc-status-mark-all-files): No longer | ||
| 8 | interactive. | ||
| 9 | |||
| 1 | 2008-02-21 Glenn Morris <rgm@gnu.org> | 10 | 2008-02-21 Glenn Morris <rgm@gnu.org> |
| 2 | 11 | ||
| 3 | * composite.el (encode-composition-rule): Fix typo in error message. | 12 | * composite.el (encode-composition-rule): Fix typo in error message. |
diff --git a/lisp/vc.el b/lisp/vc.el index 1af8bfc80c0..64a9f7bf1ce 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -2684,9 +2684,9 @@ With prefix arg READ-SWITCHES, specify a value to override | |||
| 2684 | (let ((map (make-keymap))) | 2684 | (let ((map (make-keymap))) |
| 2685 | (suppress-keymap map) | 2685 | (suppress-keymap map) |
| 2686 | ;; Marking. | 2686 | ;; Marking. |
| 2687 | (define-key map "m" 'vc-status-mark-file) | 2687 | (define-key map "m" 'vc-status-mark) |
| 2688 | (define-key map "M" 'vc-status-mark-all-files) | 2688 | (define-key map "M" 'vc-status-mark-all-files) |
| 2689 | (define-key map "u" 'vc-status-unmark-file) | 2689 | (define-key map "u" 'vc-status-unmark) |
| 2690 | (define-key map "\C-?" 'vc-status-unmark-file-up) | 2690 | (define-key map "\C-?" 'vc-status-unmark-file-up) |
| 2691 | (define-key map "\M-\C-?" 'vc-status-unmark-all-files) | 2691 | (define-key map "\M-\C-?" 'vc-status-unmark-all-files) |
| 2692 | ;; Movement. | 2692 | ;; Movement. |
| @@ -2754,11 +2754,11 @@ With prefix arg READ-SWITCHES, specify a value to override | |||
| 2754 | :help "Go to the previous line"] | 2754 | :help "Go to the previous line"] |
| 2755 | "----" | 2755 | "----" |
| 2756 | ;; Marking. | 2756 | ;; Marking. |
| 2757 | ["Mark" vc-status-mark-file | 2757 | ["Mark" vc-status-mark |
| 2758 | :help "Mark the current file and move to the next line"] | 2758 | :help "Mark the current file and move to the next line"] |
| 2759 | ["Marl All" vc-status-mark-all-files | 2759 | ["Marl All" vc-status-mark-all-files |
| 2760 | :help "Mark all files"] | 2760 | :help "Mark all files"] |
| 2761 | ["Unmark" vc-status-unmark-file | 2761 | ["Unmark" vc-status-unmark |
| 2762 | :help "Unmark the current file and move to the next line"] | 2762 | :help "Unmark the current file and move to the next line"] |
| 2763 | ["Unmark previous " vc-status-unmark-file-up | 2763 | ["Unmark previous " vc-status-unmark-file-up |
| 2764 | :help "Move to the previous line and unmark the file"] | 2764 | :help "Move to the previous line and unmark the file"] |
| @@ -2828,15 +2828,32 @@ If a prefix argument is given, move by that many lines." | |||
| 2828 | (ewoc-goto-prev vc-status arg) | 2828 | (ewoc-goto-prev vc-status arg) |
| 2829 | (vc-status-move-to-goal-column)) | 2829 | (vc-status-move-to-goal-column)) |
| 2830 | 2830 | ||
| 2831 | (defun vc-status-mark-unmark (mark-unmark-function) | ||
| 2832 | (if (use-region-p) | ||
| 2833 | (let ((firstl (line-number-at-pos (region-beginning))) | ||
| 2834 | (lastl (line-number-at-pos (region-end)))) | ||
| 2835 | (save-excursion | ||
| 2836 | (goto-char (region-beginning)) | ||
| 2837 | (while (<= (line-number-at-pos) lastl) | ||
| 2838 | (funcall mark-unmark-function)))) | ||
| 2839 | (funcall mark-unmark-function))) | ||
| 2840 | |||
| 2831 | (defun vc-status-mark-file () | 2841 | (defun vc-status-mark-file () |
| 2832 | "Mark the current file and move to the next line." | 2842 | ;; Mark the current file and move to the next line. |
| 2833 | (interactive) | ||
| 2834 | (let* ((crt (ewoc-locate vc-status)) | 2843 | (let* ((crt (ewoc-locate vc-status)) |
| 2835 | (file (ewoc-data crt))) | 2844 | (file (ewoc-data crt))) |
| 2836 | (setf (vc-status-fileinfo->marked file) t) | 2845 | (setf (vc-status-fileinfo->marked file) t) |
| 2837 | (ewoc-invalidate vc-status crt) | 2846 | (ewoc-invalidate vc-status crt) |
| 2838 | (vc-status-next-line 1))) | 2847 | (vc-status-next-line 1))) |
| 2839 | 2848 | ||
| 2849 | (defun vc-status-mark () | ||
| 2850 | "Mark the current file or all files in the region. | ||
| 2851 | If the region is active, mark all the files in the region. | ||
| 2852 | Otherwise mark the file on the current line and move to the next | ||
| 2853 | line." | ||
| 2854 | (interactive) | ||
| 2855 | (vc-status-mark-unmark 'vc-status-mark-file)) | ||
| 2856 | |||
| 2840 | (defun vc-status-mark-all-files () | 2857 | (defun vc-status-mark-all-files () |
| 2841 | "Mark all files." | 2858 | "Mark all files." |
| 2842 | (interactive) | 2859 | (interactive) |
| @@ -2848,14 +2865,21 @@ If a prefix argument is given, move by that many lines." | |||
| 2848 | vc-status)) | 2865 | vc-status)) |
| 2849 | 2866 | ||
| 2850 | (defun vc-status-unmark-file () | 2867 | (defun vc-status-unmark-file () |
| 2851 | "Unmark the current file and move to the next line." | 2868 | ;; Unmark the current file and move to the next line. |
| 2852 | (interactive) | ||
| 2853 | (let* ((crt (ewoc-locate vc-status)) | 2869 | (let* ((crt (ewoc-locate vc-status)) |
| 2854 | (file (ewoc-data crt))) | 2870 | (file (ewoc-data crt))) |
| 2855 | (setf (vc-status-fileinfo->marked file) nil) | 2871 | (setf (vc-status-fileinfo->marked file) nil) |
| 2856 | (ewoc-invalidate vc-status crt) | 2872 | (ewoc-invalidate vc-status crt) |
| 2857 | (vc-status-next-line 1))) | 2873 | (vc-status-next-line 1))) |
| 2858 | 2874 | ||
| 2875 | (defun vc-status-unmark () | ||
| 2876 | "Unmark the current file or all files in the region. | ||
| 2877 | If the region is active, unmark all the files in the region. | ||
| 2878 | Otherwise mark the file on the current line and move to the next | ||
| 2879 | line." | ||
| 2880 | (interactive) | ||
| 2881 | (vc-status-mark-unmark 'vc-status-unmark-file)) | ||
| 2882 | |||
| 2859 | (defun vc-status-unmark-file-up () | 2883 | (defun vc-status-unmark-file-up () |
| 2860 | "Move to the previous line and unmark the file." | 2884 | "Move to the previous line and unmark the file." |
| 2861 | (interactive) | 2885 | (interactive) |