all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Andreas Röhler" <andreas.roehler@online.de>
To: help-gnu-emacs@gnu.org
Subject: Re: blue underscores
Date: Wed, 19 Dec 2007 12:22:39 +0100	[thread overview]
Message-ID: <200712191222.42320.andreas.roehler@online.de> (raw)
In-Reply-To: <088097DA-030D-4BCD-A5ED-FEBA79B711B7@Web.DE>

Am Mittwoch, 19. Dezember 2007 11:24 schrieb Peter Dyballa:
> Am 19.12.2007 um 10:09 schrieb Andreas Röhler:
> > Any ideas what the cause may be?
>
> NO-BREAK SPACE (U+00A0)
>
> Position the cursor on such a character and type: C-u C-x =
>
> Probably the environment from which you copy tries to preserve some
> of its beloved features ... (I get brown ones)
>
> --
> Greetings
>
>    Pete
>

Thanks, I see, according to 

hardcoded face: nobreak-space

Notwithstanding, wouldn't it be good, to have a
mode-hook which weeps them out?

Customized `delete-nobreak-spaces' as text-mode-hook
displays correctly after reload/revert.

(defun delete-nobreak-spaces ()
  "Delete nobreak space, char 2208, #o4240, #x8a0 from buffer or region. "
  (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 (char-to-string 2208) end t 1)
	(replace-match "")))))

(defun region-active-p ()
  "Provide mark-active transient-mark-mode
 (not (eq (region-beginning) (region-end))))"
  (if (featurep 'xemacs)
      'region-active-p
    (and mark-active transient-mark-mode
	 (not (eq (region-beginning) (region-end))))))

Any idea how to realise that on the fly?

Andreas Röhler

  reply	other threads:[~2007-12-19 11:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-19  9:09 blue underscores Andreas Röhler
2007-12-19 10:24 ` Peter Dyballa
2007-12-19 11:22   ` Andreas Röhler [this message]
2007-12-19 11:53     ` Peter Dyballa
2007-12-19 11:54   ` Andreas Röhler
2007-12-19 11:57     ` Peter Dyballa
2007-12-19 13:30       ` Andreas Röhler
2007-12-19 13:59         ` Peter Dyballa
2007-12-19 20:27           ` Andreas Röhler

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200712191222.42320.andreas.roehler@online.de \
    --to=andreas.roehler@online.de \
    --cc=help-gnu-emacs@gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.