help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to show all characters in a specific line


From: Harry Putnam
Subject: Re: How to show all characters in a specific line
Date: Sun, 04 Jan 2015 08:19:32 -0500
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

Drew Adams <drew.adams@oracle.com> writes:

[...]

>> But still (And no religious scrap intended) neither of those is
>> really as readable and handy as vim's :l  Which puts only an icon
>> in the place of \t (^I). It collapses the whitespace and puts a
>> series of ^I for however many \t were used.
>
> To get that effect, all you need to do is to tell Emacs to treat
> TAB the same way it treats other control characters (except newline):
>
> (aset (window-display-table) 9
>       (vector (make-glyph-code ?^ 'escape-glyph)
>               (make-glyph-code (+ 9 64) 'escape-glyph)))
>

Thanks for the helpful input and taking the time to walk me thru a
bit.

[...]

Looking for something else I stumbled upon the code snippet I thought
i'd lost:

Its pretty week, I guess,  since it only covers 2 things: 

(defun vi-list ()
  "Simulate a :set list in Vi."
  (interactive)
  (standard-display-ascii ?\t "^I")
  (standard-display-ascii ?\n "$\n")
  )

(defun vi-nolist ()
  "Simulate a :set nolist in Vi."
  (interactive)
  (standard-display-ascii ?\t "\t")
  (standard-display-ascii ?\n "\n")
  )






reply via email to

[Prev in Thread] Current Thread [Next in Thread]