unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
Cc: miles@gnu.org, snogglethorpe@gmail.com, emacs-devel@gnu.org,
	storm@cua.dk
Subject: Re: non-break-space in tutorial
Date: Wed, 08 Jun 2005 23:47:28 +0300	[thread overview]
Message-ID: <87fyvs4lun.fsf@jurta.org> (raw)
In-Reply-To: <87br6gj0q7.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Wed, 08 Jun 2005 12:05:06 -0400")

> The display-table allows you to do just that, even more flexibly.
>
>> Here is a generic approach (similar to using a display table,
>> but without the overhead):
>
> What overhead?  Just for the record, could all you people check the value of
> `standard-display-table' in your current Emacs session?  My bet is that most
> of you have it non-nil already.

I don't know the reasons for not using the display table by default
neither what overhead it causes, but among other benefits using the
standard display table would be more user-friendly.  Currently users
unaware about the new faces for NBSP and escape characters have
difficulties in finding ways to configure them.  With display tables
and the patch below it will be possible to find used faces by typing
C-u C-x = directly on NBSP and escape characters.  It will display
a clickable button with the face name leading to the face configuration,
e.g.:

  The display table entry is displayed by these fonts (glyph codes):
   : -Misc-Fixed-Medium-R-Normal--10-100-75-75-C-60-ISO8859-1 (0x20)
   face: [escape-glyph]

Index: lisp/descr-text.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/descr-text.el,v
retrieving revision 1.35
diff -u -r1.35 descr-text.el
--- lisp/descr-text.el	26 May 2005 12:41:52 -0000	1.35
+++ lisp/descr-text.el	8 Jun 2005 19:16:48 -0000
@@ -619,7 +625,21 @@
 			      (format "%s (0x%02X)" (cadr (aref disp-vector i))
 				      (cddr (aref disp-vector i)))
 			    "-- no font --")
-			  "\n ")))
+			  "\n")
+		  (when (> (car (aref disp-vector i)) #x7ffff)
+		    (let* ((face-id (lsh (car (aref disp-vector i)) -19))
+			   (face (car (delq nil (mapcar (lambda (face)
+							  (and (eq (face-id face)
+								   face-id) face))
+							(face-list))))))
+		      (when face
+			(insert (propertize " " 'display '(space :align-to 5))
+				"face: ")
+			(widget-create
+			 'link
+			 :notify `(lambda (&rest ignore) (describe-face ',face))
+			 (format "%S" face))
+			(insert "\n"))))))
 	    (insert "these terminal codes:\n")
 	    (dotimes (i (length disp-vector))
 	      (insert (car (aref disp-vector i))

-- 
Juri Linkov
http://www.jurta.org/emacs/

  reply	other threads:[~2005-06-08 20:47 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-26 23:19 non-break-space in tutorial Stefan Monnier
2005-05-27 11:57 ` Juri Linkov
2005-05-27 13:07   ` Paul Pogonyshev
2005-05-28 11:53   ` Richard Stallman
2005-05-29 16:08     ` Juri Linkov
2005-05-29 17:40       ` Eli Zaretskii
2005-05-30  8:48         ` Juri Linkov
2005-05-30 16:08           ` Eli Zaretskii
2005-05-31  4:18       ` Richard Stallman
2005-05-31  5:17         ` Miles Bader
2005-05-31  8:56         ` Kim F. Storm
2005-05-31 17:47           ` Richard Stallman
2005-06-06 12:52         ` Juri Linkov
2005-06-06 14:07           ` Stefan Monnier
2005-06-07  0:17           ` Miles Bader
2005-06-07 15:33             ` Juri Linkov
2005-06-07 17:12               ` Daniel Brockman
2005-06-08  0:59                 ` Juri Linkov
2005-06-08  2:22                   ` Henrik Enberg
2005-06-07 22:31               ` Miles Bader
2005-06-07 23:12                 ` Gaëtan LEURENT
2005-06-07 23:53                   ` Miles Bader
2005-06-08  0:01                     ` Luc Teirlinck
2005-06-08  0:17                       ` Miles Bader
2005-06-08 23:29                   ` Gaëtan LEURENT
2005-06-08 23:57                     ` Juri Linkov
2005-06-07 23:52                 ` Juri Linkov
2005-06-08  0:17                   ` Miles Bader
2005-06-08  0:57                     ` Juri Linkov
2005-06-08  2:37                       ` Miles Bader
2005-06-08  8:35                         ` Kim F. Storm
2005-06-08  8:53                           ` Miles Bader
2005-06-08 16:05                           ` Stefan Monnier
2005-06-08 20:47                             ` Juri Linkov [this message]
2005-06-08 21:25                             ` Kim F. Storm
2005-06-08 22:53                               ` Stefan Monnier
2005-06-09 14:40                             ` Richard Stallman
2005-06-09 15:29                               ` David Kastrup
2005-06-09 16:44                                 ` Juanma Barranquero
2005-05-28 11:53 ` Richard Stallman

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=87fyvs4lun.fsf@jurta.org \
    --to=juri@jurta.org \
    --cc=emacs-devel@gnu.org \
    --cc=miles@gnu.org \
    --cc=snogglethorpe@gmail.com \
    --cc=storm@cua.dk \
    /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 public inbox

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

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