help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (Emacs+CVS) vc-toggle-read-only (cvs checkin) question


From: David Andersson
Subject: Re: (Emacs+CVS) vc-toggle-read-only (cvs checkin) question
Date: 14 Aug 2003 22:00:36 +0200

address@hidden (Christian Seberino) writes:

> Thanks for the help.  Like many people I bounded my own key combos
> to various Emacs functions with global-set-key in .emacs.
> 
> I just prefer another key combo to announce that I am done
> editing my CVS log other than C-c C-c.
> 
> From your email it sounds like this would be as simple
> as something like this...
> 
>      (global-set-key   "\C-as"  'vc-finish-logentry)

I would not recommend GLOBAL-set-key for this.
1) It may be that the command 'vc-finish-logentry' would not do the
   right thing if it is issued in a buffer that is not the *VC-log* buffer.
2) In many other modes the keys combo C-c C-c is used for what is
   the natural "finish" command in their modes. (E.g this message
   is sent using C-c C-c.)
   Such modes will override your global definition (wouldn't they?),
   so they will still work, but it not very elegant.

In stead define a command on a key in the mode where it will be used.
The key map in the *VC-Log* buffer is named 'vc-log-entry-mode'
and thus you can have this in your .emacs:

    (define-key vc-log-entry-mode "\C-as" 'vc-finish-logentry)

But first i think you will have to undefine C-a (go to beginning of line)
so it can be a prefix key.

(I have not tested this)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]