help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: delete-horizontal-space and NO-BREAK SPACE


From: Detlev Zundel
Subject: Re: delete-horizontal-space and NO-BREAK SPACE
Date: Mon, 23 Aug 2010 23:15:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Hi Andreas,


[...]

> to get rid of nasty single chars, I use forms like this:
>
> (defun delete-zero-fourteen ()
>   "Delete chars ascii octal \\014 "
>   (interactive "*")
>   (let ((beg (cond ((region-active-p)
>                   (region-beginning))
>                  (t (point-min))))
>       (end (cond ((region-active-p)
>                   (region-end))
>                  (t (point-max)))))
>     (save-excursion
>       (goto-char beg)
>       (while (re-search-forward (concat (list 12)) end t 1)
>       (replace-match "")))))
> HTH

Thanks for the code but what I really wanted to know is how Emacs itself
handles this.  I have a feeling that this should not need custom code to
handle.  There is a function 'delete-horizontal-space' and I wanted to
know if and how it applies to this specific 'space' also.

When I encounter a problem not too specific to the special case, I
usually try to find out how other people cope with it before inventing
"yet another wheel(tm)".

If nobody else points me to a already supported way of handling my case
I'll follow Drews advise and pose the question to a wider audience.

Thanks!
  Detlev

-- 
NAN - No Acronym Neccessary




reply via email to

[Prev in Thread] Current Thread [Next in Thread]