From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: non-break-space in tutorial Date: Wed, 08 Jun 2005 23:47:28 +0300 Organization: JURTA Message-ID: <87fyvs4lun.fsf@jurta.org> References: <87y8a1o9u0.fsf-monnier+emacs@gnu.org> <87ll5yqbya.fsf@jurta.org> <87mzq3r70q.fsf@jurta.org> <873bruw4nw.fsf@jurta.org> <87wtp5raj4.fsf@jurta.org> <87wtp5hapg.fsf@jurta.org> <87br6gj0q7.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1118265091 5932 80.91.229.2 (8 Jun 2005 21:11:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Jun 2005 21:11:31 +0000 (UTC) Cc: miles@gnu.org, snogglethorpe@gmail.com, emacs-devel@gnu.org, storm@cua.dk Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 08 23:11:28 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dg7oC-0000mm-G3 for ged-emacs-devel@m.gmane.org; Wed, 08 Jun 2005 23:09:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dg7uz-0004U7-6w for ged-emacs-devel@m.gmane.org; Wed, 08 Jun 2005 17:16:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dg7r1-000337-19 for emacs-devel@gnu.org; Wed, 08 Jun 2005 17:12:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dg7qt-0002y4-Qg for emacs-devel@gnu.org; Wed, 08 Jun 2005 17:12:46 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dg7qs-0002ly-1w for emacs-devel@gnu.org; Wed, 08 Jun 2005 17:12:42 -0400 Original-Received: from [194.126.101.111] (helo=mail.neti.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Dg7Zp-0001N0-B1; Wed, 08 Jun 2005 16:55:05 -0400 Original-Received: from mail.neti.ee (80-235-42-209-dsl.mus.estpak.ee [80.235.42.209]) by Relayhost2.neti.ee (Postfix) with ESMTP id DEDB4214F; Wed, 8 Jun 2005 23:55:00 +0300 (EEST) Original-To: Stefan Monnier In-Reply-To: <87br6gj0q7.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Wed, 08 Jun 2005 12:05:06 -0400") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Virus-Scanned: by amavisd-new-2.2.1 (20041222) (Debian) at neti.ee X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:38373 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:38373 > 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/