[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RE: Deleting a word using keybinding
From: |
Christopher Dimech |
Subject: |
Re: RE: Deleting a word using keybinding |
Date: |
Thu, 15 Oct 2020 23:48:23 +0200 |
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'
- Re: Deleting a word using keybinding, (continued)
- Re: Deleting a word using keybinding, Jeremie Juste, 2020/10/15
- Re: Deleting a word using keybinding, Harald Jörg, 2020/10/15
- Re: Deleting a word using keybinding, Christopher Dimech, 2020/10/15
- Re: Deleting a word using keybinding, Christopher Dimech, 2020/10/15
- Re: Deleting a word using keybinding, Harald Jörg, 2020/10/15
- Re: Deleting a word using keybinding, Christopher Dimech, 2020/10/15
- Re: Deleting a word using keybinding, Thien-Thi Nguyen, 2020/10/15
- Re: Deleting a word using keybinding, Christopher Dimech, 2020/10/15
- Re: Deleting a word using keybinding, Christopher Dimech, 2020/10/15
- RE: Deleting a word using keybinding, Drew Adams, 2020/10/15
- Re: RE: Deleting a word using keybinding,
Christopher Dimech <=
- Re: Deleting a word using keybinding, Stephen Berman, 2020/10/15
Re: Deleting a word using keybinding, Stephen Berman, 2020/10/15
Re: Deleting a word using keybinding, Stefan Monnier, 2020/10/15