Reputation: 40748
I am using view-file
to display some help information.When I press F3 the help file is opened with view-file
. I want to close the view-file
buffer using the same key F3. But for all other buffers, the shortcut should not be defined, that is: the usual C-x k should still work here.
Upvotes: 2
Views: 82
Reputation: 9380
To summarize discussion, and to solve the question of "witch buffer to kill?", here is a solution:
(eval-after-load "view"
'(define-key view-mode-map [(f3)] 'kill-this-buffer))
Upvotes: 4