Mercurial > emacs
comparison lisp/vc-dispatcher.el @ 95016:ebce6f4852ad
Move vc-dir menu hook back to vc-dispatcher.
author | Eric S. Raymond <esr@snark.thyrsus.com> |
---|---|
date | Thu, 15 May 2008 13:50:55 +0000 |
parents | 183ac8cfca91 |
children | 7be06414cb71 |
comparison
equal
deleted
inserted
replaced
95015:183ac8cfca91 | 95016:ebce6f4852ad |
---|---|
654 vc-create-client-object (name | 654 vc-create-client-object (name |
655 headers | 655 headers |
656 file-to-info | 656 file-to-info |
657 file-to-state | 657 file-to-state |
658 file-to-extra | 658 file-to-extra |
659 updater)) | 659 updater |
660 extra-menu)) | |
660 (:conc-name vc-client-object->)) | 661 (:conc-name vc-client-object->)) |
661 name | 662 name |
662 headers | 663 headers |
663 file-to-info | 664 file-to-info |
664 file-to-state | 665 file-to-state |
665 file-to-extra | 666 file-to-extra |
666 updater) | 667 updater |
668 extra-menu) | |
667 | 669 |
668 (defvar vc-ewoc nil) | 670 (defvar vc-ewoc nil) |
669 (defvar vc-dir-process-buffer nil | 671 (defvar vc-dir-process-buffer nil |
670 "The buffer used for the asynchronous call that computes status.") | 672 "The buffer used for the asynchronous call that computes status.") |
671 | 673 |
748 '(menu-item "Open file" vc-dir-find-file | 750 '(menu-item "Open file" vc-dir-find-file |
749 :help "Find the file on the current line")) | 751 :help "Find the file on the current line")) |
750 map) | 752 map) |
751 "Menu for dispatcher status") | 753 "Menu for dispatcher status") |
752 | 754 |
755 ;; This is used to that vlient modes can add mode-specific menu | |
756 ;; items to vc-dir-menu-map. | |
757 (defun vc-dir-menu-map-filter (orig-binding) | |
758 (when (and (symbolp orig-binding) (fboundp orig-binding)) | |
759 (setq orig-binding (indirect-function orig-binding))) | |
760 (let ((ext-binding | |
761 (funcall (vc-client-object->extra-menu vc-client-mode)))) | |
762 (if (null ext-binding) | |
763 orig-binding | |
764 (append orig-binding | |
765 '("----") | |
766 ext-binding)))) | |
767 | |
753 (defvar vc-dir-mode-map | 768 (defvar vc-dir-mode-map |
754 (let ((map (make-keymap))) | 769 (let ((map (make-keymap))) |
755 (suppress-keymap map) | 770 (suppress-keymap map) |
756 ;; Marking. | 771 ;; Marking. |
757 (define-key map "m" 'vc-dir-mark) | 772 (define-key map "m" 'vc-dir-mark) |
779 (define-key map "g" 'vc-dir-refresh) | 794 (define-key map "g" 'vc-dir-refresh) |
780 (define-key map "\C-c\C-c" 'vc-dir-kill-dir-status-process) | 795 (define-key map "\C-c\C-c" 'vc-dir-kill-dir-status-process) |
781 (define-key map [(down-mouse-3)] 'vc-dir-menu) | 796 (define-key map [(down-mouse-3)] 'vc-dir-menu) |
782 (define-key map [(mouse-2)] 'vc-dir-toggle-mark) | 797 (define-key map [(mouse-2)] 'vc-dir-toggle-mark) |
783 | 798 |
784 ;; FIXME: Calls back into vc.el | |
785 ;; Hook up the menu. | 799 ;; Hook up the menu. |
786 (define-key map [menu-bar vc-dir-mode] | 800 (define-key map [menu-bar vc-dir-mode] |
787 '(menu-item | 801 '(menu-item |
788 ;; This is used so that client modes can add mode-specific | 802 ;; This is used so that client modes can add mode-specific |
789 ;; menu items to vc-dir-menu-map. | 803 ;; menu items to vc-dir-menu-map. |