|
From: | Andreas Röhler |
Subject: | Re: delete-horizontal-space and NO-BREAK SPACE |
Date: | Mon, 23 Aug 2010 18:28:13 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6 |
Am 23.08.2010 15:33, schrieb Detlev Zundel:
Hi, more and more often I get emails with NO-BREAK SPACE characters (ascii 160) in them which are used for alignment purposes. When replying to such e-mails, I usually have to edit this a lot and wish 'M-\' would erase the whole stretch of the characters. Looking up the definition of delete-horizontal-space, it is obvious that it doesn't do this as it only erases " \t". Is there another nice function really erasing all space characters (i.e. chars belonging to the "space" category) or should the funtion be improved? Thanks Detlev
Hi, 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 Andreas
[Prev in Thread] | Current Thread | [Next in Thread] |