unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: David Andersson <david@symsoft.se>
Subject: Re: (Emacs+CVS) vc-toggle-read-only (cvs checkin) question
Date: 14 Aug 2003 22:00:36 +0200	[thread overview]
Message-ID: <wuekzoqaao.fsf@symsoft.se> (raw)
In-Reply-To: bf23f78f.0308131510.1608b8f1@posting.google.com

seberino@spawar.navy.mil (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	other threads:[~2003-08-14 20:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-12 19:20 (Emacs+CVS) vc-toggle-read-only (cvs checkin) question Christian Seberino
2003-08-13 17:41 ` Kevin Rodgers
2003-08-13 23:10   ` Christian Seberino
2003-08-14 20:00     ` David Andersson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=wuekzoqaao.fsf@symsoft.se \
    --to=david@symsoft.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).