emacs-devel
[Top][All Lists]
Advanced

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

RE: defcustom for ^L display?


From: Drew Adams
Subject: RE: defcustom for ^L display?
Date: Sun, 1 Jul 2007 08:31:26 -0700

Resending, since the release is now out.

> From: Drew Adams Sent: Tuesday, December 12, 2006 1:13 PM
> For possible consideration after the release - Let users
> customize how they want ^L to appear in buffers.

A library with a minor mode implementing such a feature is here:
http://www.emacswiki.org/cgi-bin/wiki/pp-c-l.el. Description:
http://www.emacswiki.org/cgi-bin/wiki/PrettyControlL.

> Here is one approach, to give an idea:
>
> (defcustom ^L-appearance-vector
>   (vconcat (make-vector 10 ?_) " Section (Printable Page) "
>            (make-vector 10 ?_))
>   "Vector determining how a Control-l character is displayed.
> Either a vector of characters or nil.  The characters are displayed in
> place of the Control-l character.  nil means `^L' is displayed.
>
> Some possible values (evaluate the Lisp expressions first):
>  nil: ^L
>  (make-vector 50 ?_): Horizontal line
>  (vconcat (make-vector 10 ?_)
>          \" Section (Printable Page) \" (make-vector 10 ?_)): WYSIWYG"
>
>   :initialize 'custom-initialize-changed'
>   :set (lambda (symb val)
>          (set-default symb val)
>          (aset standard-display-table ?\014 ^L-appearance-vector))
>   :type '(choice
>           (const :tag "^L" nil)
>           (restricted-sexp :match-alternatives (vectorp)
>            :tag "Vector of characters to display"))
>   :group 'convenience :group 'wp)
>
> (aset standard-display-table ?\014 ^L-appearance-vector)
>
> Some people might prefer nil as the default value, but if newbies
> are the target for the uncustomized value, then a default value
> something like that shown here might be better.





reply via email to

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