From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "B. T. Raven" Newsgroups: gmane.emacs.help Subject: Re: Change C-d binding from delete-char to backward-delete-char-untabify Date: Thu, 07 Apr 2011 12:25:24 -0500 Message-ID: <7JqdnTAL-PPhbgDQnZ2dnUVZ_oednZ2d@sysmatrix.net> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1302198055 18616 80.91.229.12 (7 Apr 2011 17:40:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 7 Apr 2011 17:40:55 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 07 19:40:51 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 1Q7tCG-0007BG-2b for geh-help-gnu-emacs@m.gmane.org; Thu, 07 Apr 2011 19:40:49 +0200 Original-Received: from localhost ([127.0.0.1]:41424 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7tCA-0000cH-Sn for geh-help-gnu-emacs@m.gmane.org; Thu, 07 Apr 2011 13:40:38 -0400 Original-Path: usenet.stanford.edu!postnews.google.com!news1.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.sysmatrix.net!news.sysmatrix.net.POSTED!not-for-mail Original-NNTP-Posting-Date: Thu, 07 Apr 2011 12:25:15 -0500 User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) Original-Newsgroups: gnu.emacs.help In-Reply-To: X-No-Archive: yes Original-Lines: 38 X-Usenet-Provider: http://www.giganews.com Original-NNTP-Posting-Host: 12.73.132.39 Original-X-Trace: sv3-YH16kTkBuQQT2Mr+u8TOfRJ6LbMu1wD2zpHoWPzdmKu4PMM4zft0z/l8EI/k2lNb/rqOagtz7dga2Tq!Wa6JKBr4mhYvs1oybnSi5OH/NaQcdJkv4XFd+ZrAGDLJPRx9jga4iDrJvA8Z8sUGsobvUp/lgka3!6Fmg5rVnCd6usVjhTGCZ9UjBpNhD2Q== Original-X-Complaints-To: abuse@sysmatrix.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2523 Original-Xref: usenet.stanford.edu gnu.emacs.help:186558 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 X-Gmane-Expiry: 2011-04-21 Xref: news.gmane.org gmane.emacs.help:80672 Archived-At: Deniz Dogan wrote: > 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... > Thanks, Andrea and Deniz. My usage of these functions has been unsophisticated enough that it doesn't seem to have made any practical difference. Here the current global map and the default global map appear to be synonymous. I haven't noticed any problems with mixing these functions promiscuously in org, text, lisp, tex, etc. modes. Ed