Boris Kheyfets | 23 Mar 2012 12:10
Picon
Gravatar

How do I bind to xgit-diff-mode-map?

I have in my .emacs:

(require 'dvc-autoloads)

I try to bind delete-other-windows to M-1. I tried to do it:
(define-key 'xgit-diff-mode-map (kbd "M-1") 'delete-other-windows)
I got:
keymapp, xgit-diff-mode-map

I think the problem is - dvc is not loadede at start up. So I tired:
(eval-after-load "dvc-autoloads" '(define-key 'xgit-diff-mode-map (kbd "M-1") 'delete-other-windows))

No help!



_______________________________________________
Dvc-dev mailing list
Dvc-dev <at> gna.org
https://mail.gna.org/listinfo/dvc-dev
Stefan Reichör | 2 Apr 2012 07:58
Picon

Re: How do I bind to xgit-diff-mode-map?

Boris Kheyfets <kheyfboris <at> gmail.com> writes:

> I have in my .emacs:
>
> (require 'dvc-autoloads)
>
> I try to bind delete-other-windows to M-1. I tried to do it:
> (define-key 'xgit-diff-mode-map (kbd "M-1") 'delete-other-windows)
> I got:
> keymapp, xgit-diff-mode-map
>
> I think the problem is - dvc is not loadede at start up. So I tired:
> (eval-after-load "dvc-autoloads" '(define-key 'xgit-diff-mode-map (kbd "M-1")
> 'delete-other-windows))

I think that quoting xgit-diff-mode-map is the problem. Try the following:

(define-key xgit-diff-mode-map (kbd "M-1") 'delete-other-windows)

Stefan.
Boris Kheyfets | 2 Apr 2012 15:34
Picon
Gravatar

Re: How do I bind to xgit-diff-mode-map?

Oh - I always mess up with those quotes. Your answer is not correct though. Here's a correction:

(require 'xgit-dvc)

after that all those

(define-key xgit-diff-mode-map (kbd "M-1") 'delete-other-windows)
(define-key xgit-diff-mode-map (kbd "M-2") 'split-window-vertically)
(define-key xgit-diff-mode-map (kbd "M- <at> ") 'split-window-horizontally)
(define-key xgit-diff-mode-map (kbd "M-!") 'delete-window)

work fine.

Thank You for Your answer.

With great respect, Boris.

On Mon, Apr 2, 2012 at 9:58 AM, Stefan Reichör <stefan <at> xsteve.at> wrote:
Boris Kheyfets <kheyfboris <at> gmail.com> writes:

> I have in my .emacs:
>
> (require 'dvc-autoloads)
>
> I try to bind delete-other-windows to M-1. I tried to do it:
> (define-key 'xgit-diff-mode-map (kbd "M-1") 'delete-other-windows)
> I got:
> keymapp, xgit-diff-mode-map
>
> I think the problem is - dvc is not loadede at start up. So I tired:
> (eval-after-load "dvc-autoloads" '(define-key 'xgit-diff-mode-map (kbd "M-1")
> 'delete-other-windows))

I think that quoting xgit-diff-mode-map is the problem. Try the following:

(define-key xgit-diff-mode-map (kbd "M-1") 'delete-other-windows)


Stefan.

_______________________________________________
Dvc-dev mailing list
Dvc-dev <at> gna.org
https://mail.gna.org/listinfo/dvc-dev

Gmane