all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: Christopher Dimech <dimech@gmx.com>
Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org>
Subject: Re: Deleting a word using keybinding
Date: Thu, 15 Oct 2020 13:34:33 +0200	[thread overview]
Message-ID: <877drrrad2.fsf@gmx.net> (raw)
In-Reply-To: <trinity-6be12b99-d69d-48e1-8f07-f83ad08ebe2c-1602757619640@3c-app-mailcom-bs02> (Christopher Dimech's message of "Thu, 15 Oct 2020 12:26:59 +0200")

On Thu, 15 Oct 2020 12:26:59 +0200 Christopher Dimech <dimech@gmx.com> wrote:

>    I am trying to delete a word using keybinding string "C-<tab>" but the
>    Chord is still showing as undefined.
>
>    I would like to delete a word even if I happen to be in the middle of
>    it., so I move backward.
>
>    Here is the function
>
>    ( global-set-key (kbd "C-<tab>" )
>        ( lambda () (interactive)
>            ( (backward-word)
>              (kill-word 1)
>            )
>        )
>    )

Other have already shown how to correct your code, but here's some
advice with which you can maybe help yourself in future:

When I evaluate this code and then type `C-<tab>', I see this message:
"Invalid function: (backward-word)".  That tells you what the problem
is.  If you don't understand it, try reading the node "Run a Program" in
the Info manual "An Introduction to Programming in Emacs Lisp", which
you can access by putting the cursor after the closing parenthesis of
the following expression and typing `C-x C-e':

(info "(eintr) Run a Program")

In particular, this part of the node should help you see the problem
with your code:

  The single apostrophe, ‘'’, that I put in front of some of the
  example lists in preceding sections is called a “quote”; when it
  precedes a list, it tells Lisp to do nothing with the list, other than
  take it as it is written.  But if there is no quote preceding a list,
  the first item of the list is special: it is a command for the computer
  to obey.  (In Lisp, these commands are called _functions_.)  The list
  ‘(+ 2 2)’ shown above did not have a quote in front of it, so Lisp
  understands that the ‘+’ is an instruction to do something with the rest
  of the list: add the numbers that follow.

Steve Berman



  parent reply	other threads:[~2020-10-15 11:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-15 10:26 Deleting a word using keybinding Christopher Dimech
2020-10-15 11:10 ` Jeremie Juste
2020-10-15 11:20 ` Harald Jörg
2020-10-15 16:44   ` Christopher Dimech
2020-10-15 18:44   ` Christopher Dimech
2020-10-15 20:25     ` Harald Jörg
2020-10-15 20:59       ` Christopher Dimech
2020-10-15 21:06         ` Thien-Thi Nguyen
2020-10-15 21:14           ` Christopher Dimech
2020-10-15 21:22             ` Christopher Dimech
2020-10-15 21:27               ` Drew Adams
2020-10-15 21:48                 ` Christopher Dimech
2020-10-15 21:24             ` Stephen Berman
2020-10-15 11:34 ` Stephen Berman [this message]
2020-10-15 13:48 ` 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=877drrrad2.fsf@gmx.net \
    --to=stephen.berman@gmx.net \
    --cc=dimech@gmx.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.
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.