From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.help Subject: Re: RE: Deleting a word using keybinding Date: Thu, 15 Oct 2020 23:48:23 +0200 Message-ID: References: <1f7ecd80-f927-20c6-b711-d383abe81ca2@posteo.de> <87r1pzxkpe.fsf@gnuvola.org> <0f53d4a0-74e1-40d2-976c-c3f9bd919c85@default> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1195"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help Gnu Emacs , Thien-Thi Nguyen To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 15 23:51:19 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kTB9b-0000AQ-34 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 15 Oct 2020 23:51:19 +0200 Original-Received: from localhost ([::1]:37438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kTB9Z-0005qg-Uf for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 15 Oct 2020 17:51:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51128) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTB7L-0005ob-1X for help-gnu-emacs@gnu.org; Thu, 15 Oct 2020 17:48:59 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:41243) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTB7J-0004aR-0c for help-gnu-emacs@gnu.org; Thu, 15 Oct 2020 17:48:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1602798503; bh=GG5BnE8zObSuAC+Ixnre+wXKXCsNh6uJ8ncnnzznmEg=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=fUrM4ztPbly6qfZjkEN/62mxjjN5/VwxeN9b0d0c8XbWjDNPgimjklwET9CwVwpko f4rv9pBuIhtZZuicXEKoCE/PqRM7o8heVj7C74hXIyrIKOaiIrocFa3ib/A82Uu7kd spXYIHb9MrzBphSurYR8zKq70GduASfiVfywowt8= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs01.server.lan [172.19.170.58]) (via HTTP); Thu, 15 Oct 2020 23:48:23 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <0f53d4a0-74e1-40d2-976c-c3f9bd919c85@default> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:YUECsnQXvSvLHArwE/zptv/sCTanE3wCifv1rokrcEplqn058+IIS8NpOMqmt1Jii5QqB tngii9Oqq0Qh/9OpBdqBpl182hHQ0zZDD9ffLiFiXIfsdZTm9hmRLZ2lU129yI73gEuci1I3LKjm XTY34/6fAVI282wF63NVepOZCHWTOobYMoVhpv3Wau6cOXHpBprf+47dpbnl4hQ2EigWFoLbwWJn 7b0IQN5sofCCT9c+vMx8Re1hZoq7/OW6SvpUJLovC1JIC7+JBmvGA0EDAsOmLlIFF9/WxGr9foQt D4= X-UI-Out-Filterresults: notjunk:1;V03:K0:G13DrPurEK4=:KWt+UZLL4yGDWKWcmMpfo1 bmW7AxKa7fDCYGLT1mK51GjH5dZw8kWeQy0J8aDFZ1BwGJxAx8YYlLLBQAyS2d4O9qrxMcAD/ 9Tvbvfyr+OiaM+pbkRVol6VVcb7DSBk9ptA6I0ZH+0AwLrdkgFbnVjqf7nHBvmoiidYXOTvRw FwwZsplTNsPxyWFIneDEl3kYUVvyBXwCFcQ6TA3SlyBB7GLC6/mluAHXcwNHac1KuPDDluqmo E3R/LfxRvLvIg887T2YPRTs5Q1QybOu4aWV2R9LKHkwhRsC1ctz/hl3I5wDYotQZhZIyFgDZK dqm3jzTRmvASQmk8nXEdtzkLO8tWzs8aOBu88nruVbbe6bLDojRIdztJ1V5sUYTpmJIIU1Cla ak+u6V06NzBnb+uKaABtLRsUVcg+1g8gooYhnZ5IEQiuQ7jam6rHPlzvby+oKZTkc9DYtRDco zedSKedQvAln6aM6P0xonk0xPYbKp0stuHD515FqyrhkThp55OyxXre3SBOlRrdRDYEMYGYwM 3ekGlG3j6S38JYLIyW6/ffVeXEmSB67eUVSb1Rb0mAOToIgK/igmcrJ+eJ1H6ksfs7kI6Mn4a tTQ0b6Qc06XeE= Received-SPF: pass client-ip=212.227.15.15; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/15 17:22:10 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, MIME_HTML_ONLY=0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:124479 Archived-At: 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" To: "Christopher Dimech" Cc: "Help Gnu Emacs" , "Thien-Thi Nguyen" Subject: RE: Deleting a word using keybinding > Is there a way to detect end of buffer? Function `eobp'