all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christopher Dimech <dimech@gmx.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org>,
	Thien-Thi Nguyen <ttn@gnuvola.org>
Subject: Re: RE: Deleting a word using keybinding
Date: Thu, 15 Oct 2020 23:48:23 +0200	[thread overview]
Message-ID: <trinity-2a1a995a-02b9-4b63-be67-2dbf41953997-1602798503860@3c-app-mailcom-bs01> (raw)
In-Reply-To: <0f53d4a0-74e1-40d2-976c-c3f9bd919c85@default>


   I have made some imporvement.  Been using the following text for
   testing, and when I am
   getting a comma, dash, or period, the function is deleting backwards.
   When this happens
   I just want it to behave as (kill-word)

   ;; This buffer is for text that is not saved, and for Lisp evaluation.
   ;; To create a file, visit it with C-x C-f and enter text in its
   buffer.

   (defun kill-spacword ()
     "Kills Word forward including Current Word.
   Multiple Spaces are reduced to one space, but without deleting
   next word."
     (interactive)
       (if (looking-at "[ \t\n]")
          ;; Space detected.
          (progn
             (forward-char)
             (if (looking-at "[ \t\n]")
               (just-one-space)
               (progn (backward-char) (kill-word 1) )
            )
          )
          ;; Current Point found on a word
          ( progn
              (if (eobp)
                 nil
                 ;;(progn (backward-word) (kill-word 1))
                 (progn
                   (backward-char)
                   (if (looking-at "[ \t\n]")
                      (kill-word 1)
                      (progn (backward-word) (kill-word 1))
                   )
                 )
             )
          )
       )
   )




   Sent: Thursday, October 15, 2020 at 11:27 PM
   From: "Drew Adams" <drew.adams@oracle.com>
   To: "Christopher Dimech" <dimech@gmx.com>
   Cc: "Help Gnu Emacs" <help-gnu-emacs@gnu.org>, "Thien-Thi Nguyen"
   <ttn@gnuvola.org>
   Subject: RE: Deleting a word using keybinding
   > Is there a way to detect end of buffer?
   Function `eobp'


  reply	other threads:[~2020-10-15 21:48 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 [this message]
2020-10-15 21:24             ` Stephen Berman
2020-10-15 11:34 ` Stephen Berman
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=trinity-2a1a995a-02b9-4b63-be67-2dbf41953997-1602798503860@3c-app-mailcom-bs01 \
    --to=dimech@gmx.com \
    --cc=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=ttn@gnuvola.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.