From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Alexander Koptelov Newsgroups: gmane.emacs.help Subject: Re: Tab Date: 26 Mar 2002 15:59:39 +0300 Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: <20020319140511.A2178@sasken.com> <20020319092050.960E9CD2B9@smtp.bcn.isoco.net> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1017147475 27567 127.0.0.1 (26 Mar 2002 12:57:55 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 26 Mar 2002 12:57:55 +0000 (UTC) Cc: Praveen D V , help-gnu-emacs@gnu.org Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16pqWR-0007AW-00 for ; Tue, 26 Mar 2002 13:57:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16pqVe-0003ae-00; Tue, 26 Mar 2002 07:57:06 -0500 Original-Received: from [195.208.53.253] (helo=pluton.ispras.ru) by fencepost.gnu.org with smtp (Exim 3.34 #1 (Debian)) id 16pqSg-0003Hf-00 for ; Tue, 26 Mar 2002 07:54:02 -0500 Original-Received: (qmail 80855 invoked from network); 26 Mar 2002 12:46:48 -0000 Original-Received: from unknown (HELO gate.ispras.ru) (195.208.32.200) by pluton.ispras.ru with SMTP; 26 Mar 2002 12:46:48 -0000 Original-Received: from fog.ispras.ru ([195.208.32.129]) by gate.ispras.ru (8.12.2/8.12.2) with SMTP id g2QCsFfM005671 for ; Tue, 26 Mar 2002 15:54:16 +0300 (MSK) Original-Received: tid PAA23400; Wed, 26 Mar 1997 15:53:13 +0200 Original-Received: (from steve@localhost) by pegas.kazbek.ispras.ru (8.11.2/8.11.2) id g2QCxdW16687; Tue, 26 Mar 2002 15:59:39 +0300 X-Authentication-Warning: pegas.kazbek.ispras.ru: steve set sender to steve@ispras.ru using -f Original-To: "F.Xavier Noria" In-Reply-To: <20020319092050.960E9CD2B9@smtp.bcn.isoco.net> Original-Lines: 34 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.5 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:13 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:13 --=-=-= >>>>> "fxn" == F Xavier Noria writes: fxn> On Tue, 19 Mar 2002 14:05:11 +0530 fxn> Praveen D V wrote: fxn> : Is it possible to see characters, like ^I, in Emacs?? fxn> I used glyph-highlight for that, but the link in the Emacs Lisp List fxn> seems to be broken and I cleaned this hard disk recently :-(. Anyone fxn> keeps a copy of the source? Here it is. --=-=-= Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=glyph-highlight.el ;;; glyph-highlight.el --- Highlight special characters, such as control chars ;; Copyright (C) 2001 Samuel Padgett ;; Author: Samuel Padgett ;; Created: March 5, 2001 ;; Version: 0.2 ;; Time-stamp: <2001/03/09 21:31:46 est -- Samuel Padgett> ;; Keywords: faces ;; This file is not part of GNU Emacs. ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as ;; published by the Free Software Foundation; either version 2, or (at ;; your option) any later version. ;; This program is distributed in the hope that it will be useful, but ;; WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;; General Public License for more details. ;;; Commentary: ;; This packages highlights various special characters with faces. ;; The intent is to make it easy to distinguish between ordinary ;; characters in a buffer and the glyphs Emacs uses when displaying ;; control characters and octal codes and the like. ;; To use, simply put glyph-highlight.el in your `load-path' and the ;; following lines in your .emacs: ;; (require 'glyph-highlight) ;; (glyph-highlight-do-it) ;; You can customize the different faces used with M-x customize-group ;; RET glyph-highlight RET. ;; Special thanks to Eli Zaretskii who helped me understand glyphs and ;; display tables. ;;; Change Log: ;; Changes from 0.1 to 0.2 ;; * Changed name from special-char.el to glyph-highlight.el ;; * Defined `glyph-highlight' group ;;; TODO: ;; * Don't frob all "extra slot" display table entries in Emacs 21? ;; * Port to XEmacs. ;; * Define faces for dark backgrounds. ;; * Allow glyph characters used to be customized. ;; * Highlight the entire control sequence or octal code. (For ;; instance, highlight ^L instead of simply ^.) Can this be done ;; easily? ;;; Code: (defgroup glyph-highlight nil "Highlights special characters, such as control characters.") (defface truncated-line-face '((t (:foreground "Tan"))) "Face used for the glyph indicating that a line of text is truncated." :group 'glyph-highlight) (defface wrapped-line-face '((t (:foreground "Tan"))) "Face used for the glyph indicating that a line of text is wrapped." :group 'glyph-highlight) (defface octal-code-face '((t (:background "Blue" :foreground "White"))) "Face used for the glyph indicating the presence of an octal code character." :group 'glyph-highlight) (defface ctrl-char-face '((t (:background "Coral" :foreground "White"))) "Face used for the glyph indicating the presence of a control character." :group 'glyph-highlight) (defface invisible-lines-face '((t (:background "LightGrey" :foreground "Black"))) "Face used for the glyph indicating the presence of invisible lines." :group 'glyph-highlight) (defun glyph-highlight-create-glyph (char face) "Make a glyph of character CHAR with face FACE. For instance, (glyph-highlight-create-glyph ?^ 'ctrl-char-face) creates a glyph of `^' with face `ctrl-char-face'." (+ char (lsh (face-id face) 19))) ;;;###autoload (defun glyph-highlight-do-it () "Frob the `standard-display-table' to highlight special characters." (interactive) (when window-system (set-display-table-slot standard-display-table 'truncation (glyph-highlight-create-glyph ?$ 'truncated-line-face)) (set-display-table-slot standard-display-table 'wrap (glyph-highlight-create-glyph ?\\ 'wrapped-line-face)) (set-display-table-slot standard-display-table 'escape (glyph-highlight-create-glyph ?\\ 'octal-code-face)) (set-display-table-slot standard-display-table 'control (glyph-highlight-create-glyph ?^ 'ctrl-char-face)) (set-display-table-slot standard-display-table 'selective-display (make-vector 3 (glyph-highlight-create-glyph ?. 'invisible-lines-face))))) (provide 'glyph-highlight) ;;; glyph-highlight.el ends here --=-=-= I haven't found it in gnu.emacs.sources (strange =\), but message with this file attached can be found at http://wuarchive.wustl.edu/usenet/gnu.emacs.sources/articles/6203482.Z fxn> -- fxn Best regards fxn> _______________________________________________ Help-gnu-emacs mailing fxn> list Help-gnu-emacs@gnu.org fxn> http://mail.gnu.org/mailman/listinfo/help-gnu-emacs -- Alexander Koptelov Institute for System Programming, Russian Academy of Sciences e-mail: steve@ispras.ru icq: 36208499 --=-=-=--