From: Andreas Roehler <andreas.roehler@online.de>
Subject: Re: last-non-white-space-on-line
Date: Tue, 06 Jun 2006 13:23:21 +0200 [thread overview]
Message-ID: <e63o95$4gv$1@online.de> (raw)
In-Reply-To: 1149495020.670542.324190@h76g2000cwa.googlegroups.com
Arndt Jonasson wrote:
> Andreas Roehler wrote:
>> is there a function known to jump to the last
>> non-whitspace char in line - as (back-to-indentation)
>> does in the other direction?
>>
>> Could write something like
>>
>> (defun last-non-white-space-on-line ()
>> " "
>> (interactive)
>> (end-of-line)
>> (skip-chars-backward "[ \t]"))
>>
>> Nonetheles, would prever to use an already existing
>> macro.
>
> Not one function of course, but I would do C-e M-\
> This deletes the whitespace, but that's what I want to happen
> anyway if I'm not adding more to the line.
Basicaly you are right, don't imagine any use of
whitespaces at the end of line.
Thanks
Andreas Roehler
BTW.: Got a hint concerning an error in the previous
draft. Here a better one:
(defun last-non-white-space-on-line ()
" "
(interactive)
(end-of-line)
(skip-chars-backward " \t"))
;; To do it with (delete-horizontal-space):
(defun last-non-white-space-on-line ()
" "
(interactive)
(end-of-line)
(delete-horizontal-space)
;; (skip-chars-backward " \t")
(backward-char 1))
next prev parent reply other threads:[~2006-06-06 11:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-03 11:07 last-non-white-space-on-line Andreas Roehler
2006-06-05 8:10 ` last-non-white-space-on-line Arndt Jonasson
2006-06-06 11:23 ` Andreas Roehler [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-06-05 6:53 last-non-white-space-on-line martin rudalics
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='e63o95$4gv$1@online.de' \
--to=andreas.roehler@online.de \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).