unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Setting auto-indentation of braces
Date: Mon, 23 Feb 2009 21:56:00 -0700	[thread overview]
Message-ID: <gnvukc$ujk$1@ger.gmane.org> (raw)
In-Reply-To: <49a27098$0$14890$9b536df3@news.fv.fi>

Juha Nieminen wrote:
> Kevin Rodgers kirjoitti:
>> (global-set-key (kbd "M-7") "{")
> 
>   (global-set-key "M-7" "{") seems to work as well.

Well, it shouldn't: that binds a 3-character sequence (M, dash, 7) to 
left-brace.

>   This is exactly what I was looking for. I didn't know you could give 
> directly a string to global-set-key, rather than a command (as I 
> mentioned, my knowledge of elisp is next to nil).

You can bind anything that satisfies commandp, whose doc string says:

Interactively callable functions include strings and vectors (treated
as keyboard macros), lambda-expressions that contain a top-level call
to `interactive', autoload definitions made by `autoload' with non-nil
fourth argument, and some of the built-in functions of Lisp.

Also, a symbol satisfies `commandp' if its function definition does so.

-- 
Kevin Rodgers
Denver, Colorado, USA





  parent reply	other threads:[~2009-02-24  4:56 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-10 10:10 Setting auto-indentation of braces Juha Nieminen
2009-02-10 16:02 ` Tiago Pierezan Camargo
2009-02-10 16:46 ` Alan Mackenzie
     [not found] ` <mailman.328.1234283149.31690.help-gnu-emacs@gnu.org>
2009-02-11 15:28   ` Juha Nieminen
2009-02-16  9:50 ` Juha Nieminen
2009-02-18  8:44   ` Juha Nieminen
2009-02-18 19:00     ` Peter Dyballa
2009-02-19  4:07       ` Kevin Rodgers
     [not found]       ` <mailman.1146.1235016448.31690.help-gnu-emacs@gnu.org>
2009-02-23  9:47         ` Juha Nieminen
2009-02-23 11:24           ` Teemu Likonen
2009-02-24  4:56           ` Kevin Rodgers [this message]
     [not found]           ` <mailman.1617.1235451361.31690.help-gnu-emacs@gnu.org>
2009-02-24 17:22             ` Juha Nieminen
2009-02-25 16:14           ` Juha Nieminen
2009-03-04 23:59             ` Juha Nieminen
2009-03-05  9:20               ` Nikolaj Schumacher
     [not found]               ` <mailman.2415.1236244816.31690.help-gnu-emacs@gnu.org>
2009-03-09  9:45                 ` Juha Nieminen
2009-03-12  5:15             ` Kevin Rodgers
     [not found]             ` <mailman.2991.1237105197.31690.help-gnu-emacs@gnu.org>
2009-03-23  7:56               ` Juha Nieminen
2009-03-23 16:07                 ` Peter Dyballa
     [not found]                 ` <mailman.3832.1237824475.31690.help-gnu-emacs@gnu.org>
2009-03-23 18:53                   ` Juha Nieminen
2009-03-27  7:15                     ` Juha Nieminen
     [not found]     ` <mailman.1097.1234983644.31690.help-gnu-emacs@gnu.org>
2009-02-18 23:43       ` Juha Nieminen
2009-02-19  9:40         ` Peter Dyballa
2009-02-18 12:57   ` tyler
     [not found]   ` <mailman.1065.1234961877.31690.help-gnu-emacs@gnu.org>
2009-02-18 18:00     ` Juha Nieminen
2009-02-19 11:31   ` Miles Bader

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='gnvukc$ujk$1@ger.gmane.org' \
    --to=kevin.d.rodgers@gmail.com \
    --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.
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).