all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "B. T. Raven" <nihil@nihilo.net>
To: help-gnu-emacs@gnu.org
Subject: Re: Change C-d binding from delete-char to backward-delete-char-untabify
Date: Thu, 07 Apr 2011 12:25:24 -0500	[thread overview]
Message-ID: <7JqdnTAL-PPhbgDQnZ2dnUVZ_oednZ2d@sysmatrix.net> (raw)
In-Reply-To: <mailman.3.1302171076.24221.help-gnu-emacs@gnu.org>

Deniz Dogan wrote:
> 2011/4/7 B. T. Raven <nihil@nihilo.net>:
>> 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


  parent reply	other threads:[~2011-04-07 17:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-06 23:59 Change C-d binding from delete-char to backward-delete-char-untabify B. T. Raven
2011-04-07  9:19 ` Andrea Crotti
2011-04-07 10:10 ` Deniz Dogan
     [not found] ` <mailman.3.1302171076.24221.help-gnu-emacs@gnu.org>
2011-04-07 17:25   ` B. T. Raven [this message]
2011-04-10  2:59     ` Stefan Monnier

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

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

  git send-email \
    --in-reply-to=7JqdnTAL-PPhbgDQnZ2dnUVZ_oednZ2d@sysmatrix.net \
    --to=nihil@nihilo.net \
    --cc=help-gnu-emacs@gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.