From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Andersson Newsgroups: gmane.emacs.help Subject: Re: (Emacs+CVS) vc-toggle-read-only (cvs checkin) question Date: 14 Aug 2003 22:00:36 +0200 Organization: Symsoft AB, KISTA, SWEDEN Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <3F3A7855.2050802@yahoo.com> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1060892299 23860 80.91.224.253 (14 Aug 2003 20:18:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 14 Aug 2003 20:18:19 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 14 22:18:17 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19nOY5-00023W-00 for ; Thu, 14 Aug 2003 22:18:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19nOVu-000233-Bq for geh-help-gnu-emacs@m.gmane.org; Thu, 14 Aug 2003 16:16:02 -0400 Original-Newsgroups: gnu.emacs.help Original-Lines: 32 X-Newsreader: Gnus v5.7/Emacs 20.7 X-Original-NNTP-Posting-Host: marilyn.symsoft.se X-Original-Trace: 14 Aug 2003 22:00:31 +0200, marilyn.symsoft.se Original-X-Complaints-To: abuse@songnetworks.se Original-NNTP-Posting-Host: news.wineasy.se X-Original-NNTP-Posting-Host: news.wineasy.se Original-X-Trace: wineasy!newsfeed.wineasy.se!news.sto.telegate.se 1060891236 213.131.157.161 (14 Aug 2003 22:00:36 +0200) Original-X-Complaints-To: abuse@songnetworks.se Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!cyclone.bc.net!in.100proofnews.com!in.100proofnews.com!wineasy!newsfeed.wineasy.se!news.sto.telegate.se!news.wineasy.se!news.songnetworks.se!not-for-mail Original-Xref: shelby.stanford.edu gnu.emacs.help:115896 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:11814 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:11814 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)