unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* how to display a character with a specific glyph and face ?
@ 2014-10-23 12:57 Boiteux Frederic
  2014-10-23 15:44 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Boiteux Frederic @ 2014-10-23 12:57 UTC (permalink / raw)
  To: help-gnu-emacs

	Hello,


When I was using Emacs23, I had a piece of config to display « no-break space » character with another glyph (centered dot) an a specific face (with a blue background) :

(make-face 'nbsp-face)
(set-face-background 'nbsp-face "LightBlue")

(require 'disp-table)
(aset standard-display-table
      (make-char 'latin-iso8859-1  (- ?\240 128))
      (vector (+ ?\267 (* 524288 (face-id 'nbsp-face)))))

It was very helpful when editing text mixing standard and no-break spaces. 
Now, I use Emacs24 and mainly UTF-8 encoded files/buffers, and I tried to do the same, without success. I tried :

(aset standard-display-table
      #xA0 ;; NO-BREAK SPACE
      (vector (+ #xB7 ;; MIDDLE DOT
                 (* 524288 (face-id 'nbsp-face)))))

But it doesn't work as expected : I get an Unicode character not mapped to a glyph (giving a number written in a square), with a red background (!).

Do you know how I could do this display with Emacs24 ?

    With regards,
               Fred.





^ permalink raw reply	[flat|nested] 7+ messages in thread
[parent not found: <mailman.11860.1414070397.1147.help-gnu-emacs@gnu.org>]

end of thread, other threads:[~2014-10-24 14:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-23 12:57 how to display a character with a specific glyph and face ? Boiteux Frederic
2014-10-23 15:44 ` Eli Zaretskii
     [not found] <mailman.11860.1414070397.1147.help-gnu-emacs@gnu.org>
2014-10-23 13:30 ` Stefan Monnier
2014-10-24  6:14   ` Boiteux Frederic
2014-10-24  7:02     ` Eli Zaretskii
     [not found]     ` <<837fzq6jbw.fsf@gnu.org>
2014-10-24 14:01       ` Drew Adams
2014-10-24 14:49         ` Boiteux Frederic

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).