emacs-devel
[Top][All Lists]
Advanced

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

Re: fringe symbol for newline


From: David Reitter
Subject: Re: fringe symbol for newline
Date: Thu, 10 Jul 2008 14:40:58 -0400

On 9 Jul 2008, at 23:06, Miles Bader wrote:

David Reitter <address@hidden> writes:
Now that we have improved wrapping to support DTWW, it would be nice if
the fringe could mark visual lines that end with a newline.

Note that you can rather easily cause a special symbol (e.g. ¶, ↲, or what-have-you) to be displayed before newlines, using the display- table.

That seems to be what most other apps do anyway (rather than putting
something "in the fringe")?

Right, and they also don't have fringes (at least not used for similar purposes).

That said, below is some code that does this for me (put together from code by Drew Adams and whitespace.el). It's not simple enough for your average user to do this, and since it's a standard function in other editors, I would like to see this as a simple-to-enable standard function in 23, possibly even with an entry in the Options menu. (I couldn't make whitespace (in 22) do the same.)

Also, I'd still prefer this to be in the fringe. It's a lot less intrusive. You need this sort of information only occasionally.


(defface blank-newline
  '((((class color) (background dark))
     (:foreground "lightgrey" :bold t))
    (((class color) (background light))
     ( :foreground "lightgrey" :bold t))
    (t (:bold t :underline t)))
  "Face used to visualize NEWLINE char mapping.

See `blank-display-mappings'."
  :group 'blank)

;; 2230 = \x8B6
(setq buffer-display-table (make-display-table))
(aset buffer-display-table 10 (vector  32 (make-glyph-code  2230
                                                 'blank-newline) 10)) 

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

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