From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Deniz Dogan Newsgroups: gmane.emacs.help Subject: Re: Change C-d binding from delete-char to backward-delete-char-untabify Date: Thu, 7 Apr 2011 12:10:45 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1302171120 9650 80.91.229.12 (7 Apr 2011 10:12:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 7 Apr 2011 10:12:00 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "B. T. Raven" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 07 12:11:55 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q7mBu-0007cm-T7 for geh-help-gnu-emacs@m.gmane.org; Thu, 07 Apr 2011 12:11:55 +0200 Original-Received: from localhost ([127.0.0.1]:53763 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7mBt-00039J-P7 for geh-help-gnu-emacs@m.gmane.org; Thu, 07 Apr 2011 06:11:53 -0400 Original-Received: from [140.186.70.92] (port=38675 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7mBF-000365-Di for help-gnu-emacs@gnu.org; Thu, 07 Apr 2011 06:11:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q7mB9-0005BD-F4 for help-gnu-emacs@gnu.org; Thu, 07 Apr 2011 06:11:12 -0400 Original-Received: from mail-iw0-f169.google.com ([209.85.214.169]:60704) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q7mB8-0005AZ-LQ for help-gnu-emacs@gnu.org; Thu, 07 Apr 2011 06:11:07 -0400 Original-Received: by iwg8 with SMTP id 8so3117200iwg.0 for ; Thu, 07 Apr 2011 03:11:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=2MtXkgq5Zy4/k1qKLRWErTxupY7oQH+B5BYHqDRWaGY=; b=tPNaS4aiA1tJ6w4xi3dIQCoLqCGFzUk0h0i3UPhTs6Tja/FdQrhFHwDDeoKBsHWvLS UX0pEHN9p2kcLXnAB/8rVlpEJvuJnYTJoyMxi+MkKCBDnnKHNE3Nn8fVUxXbLLQgpZlY 5RDYZRrRbu52M0vDFgaqaRo/y2WYM95poySF4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=g1USD7t1hj2kKmJlP/fgMogjcsI55BYHHfL+LLLOkJU3otG7aTMFYE2/bG6BiisbcM bCGt96JvSeIFcDwQfNmBXHQS+qPMd+Y4IprG1qpeLSRXA/5WyFTNIVUY1OnQGRMvhEiW 4CWBmKaWnqhz728jR6ncb07VRgi38v6Vy1bf8= Original-Received: by 10.231.33.205 with SMTP id i13mr703826ibd.54.1302171065093; Thu, 07 Apr 2011 03:11:05 -0700 (PDT) Original-Received: by 10.231.208.71 with HTTP; Thu, 7 Apr 2011 03:10:45 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.214.169 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:80652 Archived-At: 2011/4/7 B. T. Raven : > I notice that I use both of these functions in my .emacs: > > global-set-key > define-key global-map > > Is it enough to make the new binding with either of these or does the > default binding have to be unbound first? What is the difference between > using those two methods? Can I then use the same method to bind > [backspace] to delete-char? > > Thanks, > > Ed > The definition of global-set-key is basically: (define-key (current-global-map) key command) `current-global-map' is a function which simply returns the current global keymap. The global keymap is set using `use-global-keymap'. When you use (define-key global-map ...) you're making a binding in the default global keymap, not necessarily the one currently being used. At least that's how I understand it... -- Deniz Dogan