help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: introduction to lisp


From: Kaushal Modi
Subject: Re: introduction to lisp
Date: Tue, 20 Jun 2017 00:25:20 +0000

On Mon, Jun 19, 2017, 8:14 PM John Ankarström <john@ankarstrom.se> wrote:

> Emanuel Berg <moasen@zoho.com> writes:
>
> > Also I would write
> >
> >     (global-set-key (kbd "C-c C-d") 'buster-disable-test)
> >
> > like this:
> >
> >     (global-set-key "\C-c\C-d" #'buster-disable-test)
>
> I'm 100% with you on everything else you said, but I personally
> prefer the `kbd' notation. It's clearer and easier to understand,
> because it's consistent with how Emacs itself displays key
> bindings for the user (through `describe-key').
>

+1. It's simply type what you see.

Example:
- How do I bind F1?
- Do C-h k F1.. Realize that emacs shows that as <f1>
- Simply wrap that with (kbd "...") and you have (kbd "<f1>")
- Put that in the global-set-key or define-key form.

I do agree that #' is better than ' for functions :-)
>

+1

> --

Kaushal Modi


reply via email to

[Prev in Thread] Current Thread [Next in Thread]