[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Why can't local-set-key (kbd "n") in diff-mode ?
From: |
boyang |
Subject: |
Why can't local-set-key (kbd "n") in diff-mode ? |
Date: |
Fri, 18 Nov 2016 17:31:53 +0800 |
Hi
Greetings,
I'm a Emacs newbie, when I do the following:
----------------------------------------------------------------------------------------
(add-hook 'diff-mode-hook
(lambda ()
(local-set-key (kbd "n") 'next-error-no-select)
(local-set-key (kbd "p") 'previous-error-no-select)))
----------------------------------------------------------------------------------------
It doesn't work, when I press "n" in "*Diff*", it stills run "diff-hunk-next"
when I "C-h k n", it still shows "diff-hunk-next". Same also for "p".
But
1. If I do the same thing in other mode, say "occur-mode-hook", it works in
that mode.
2. If I set other key other than "n" in "diff-mode-hook", say "x", it works.
So is there somebody can tell me the reason behind this ?
Thank you
Cheers,
Boyang
- Why can't local-set-key (kbd "n") in diff-mode ?,
boyang <=