> 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/ _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel