From: Eduardo Ochs <eduardoochs@gmail.com>
To: Christopher Dimech <dimech@gmx.com>
Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Re: Why do I find ^L in elisp code?
Date: Sat, 22 May 2021 14:02:33 -0300 [thread overview]
Message-ID: <CADs++6gvfDDcyw50h=rR+6PfKjzP7U_GC_BmPap27mCErAYYLQ@mail.gmail.com> (raw)
In-Reply-To: <trinity-c606e758-26e8-4982-bb93-06d439ad60e0-1621698465204@3c-app-mailcom-bs14>
Hi Christopher,
On Sat, 22 May 2021 at 12:48, Christopher Dimech <dimech@gmx.com> wrote:
>
> Is it still useful in new code?
>
> The Form Feed is hard to type. Most text editors do not provide easy ways to type it.
> Could emacs cease using invisible glyphs as they could be are confusing and hard to read
> and type? Sometimes I see an ASCII art box.
>
> Regards
> Christopher
This is what I use to make the formfeed and a few other special characters
be displayed as colored glyphs (and stand out):
;; Screenshot:
;; http://angg.twu.net/glyphs/eev-glyphs.el.png
;; The code below was mostly taken from:
;; http://angg.twu.net/eev-current/eepitch.el.html#glyphs
;; http://angg.twu.net/eev-current/eepitch.el
(defface eev-glyph-face-bluebg
'((t (:background "blue")))
"Face used for the glyph for backspace (char 8; a solid blue box).")
(defface eev-glyph-face-yellow-on-red
'((t (:foreground "yellow" :background "red")))
"Face used for the formfeed glyph (char 12).")
(defface eev-glyph-face-blue
'((t (:foreground "blue")))
"Face used for the glyph for CR (char 13).")
(defface eepitch-star-face
'((t (:foreground "red")))
"Face used for the red star glyph (char 15).")
(defun eepitch-set-glyph0 (pos &optional char face)
"See: (find-eepitch-intro \"glyph\")"
(aset standard-display-table pos
(if char (vector (make-glyph-code char face)))))
(defun eepitch-set-glyph (pos &optional char face)
"See: (find-eepitch-intro \"glyph\")
and: (find-anchors-intro \"glyphs\")
This is the high-level version of `eepitch-set-glyph0', with a hack
to make it work similarly in unibyte and multibyte buffers."
(eepitch-set-glyph0 pos char face)
(if (<= 128 pos)
(eepitch-set-glyph0 (make-char 'eight-bit pos) char face)))
(if (not standard-display-table)
(setq standard-display-table (make-display-table)))
(eepitch-set-glyph 8 32 'eev-glyph-face-bluebg)
(eepitch-set-glyph 12 ?L 'eev-glyph-face-yellow-on-red)
(eepitch-set-glyph 13 ?M 'eev-glyph-face-blue)
(eepitch-set-glyph 15 ?* 'eepitch-star-face)
;; Test: (insert "\n" 8 12 13 15)
;; Cheers,
;; Eduardo Ochs =)
;; http://angg.twu.net/#eev
next prev parent reply other threads:[~2021-05-22 17:02 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-22 14:53 Why do I find ^L in elisp code? Christopher Dimech
2021-05-22 15:05 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 15:12 ` Christopher Dimech
2021-05-22 15:19 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 19:14 ` [External] : " Drew Adams
2021-05-22 15:15 ` Eli Zaretskii
2021-05-22 15:17 ` Omar Polo
2021-05-22 15:22 ` 2QdxY4RzWzUUiLuE
2021-05-22 15:30 ` arthur miller
2021-05-22 15:41 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 15:47 ` Christopher Dimech
2021-05-22 15:58 ` Omar Polo
2021-05-22 16:51 ` arthur miller
2021-05-22 19:15 ` [External] : " Drew Adams
2021-05-22 16:18 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 16:18 ` 2QdxY4RzWzUUiLuE
2021-05-22 16:21 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 16:43 ` 2QdxY4RzWzUUiLuE
2021-05-22 17:06 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 16:27 ` arthur miller
2021-05-22 17:32 ` Christopher Dimech
2021-05-22 18:27 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 18:32 ` Christopher Dimech
2021-05-22 18:40 ` music with/from Emacs (was: Re: Why do I find ^L in elisp code?) Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 21:09 ` music with/from Emacs Arthur Miller
2021-05-22 21:45 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 21:53 ` Arthur Miller
2021-05-22 21:59 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-24 1:32 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-24 11:44 ` Arthur Miller
2021-05-22 16:33 ` Why do I find ^L in elisp code? Jean Louis
2021-05-22 17:02 ` Eduardo Ochs [this message]
2021-05-22 20:08 ` Jean Louis
2021-05-22 20:18 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 20:25 ` Jean Louis
2021-05-23 6:42 ` Eli Zaretskii
2021-05-23 19:14 ` Unicode fonts - " Jean Louis
2021-05-23 19:42 ` Input method generator package - Re: Unicode fonts Jean Louis
2021-05-24 8:00 ` Unicode fonts - Re: Why do I find ^L in elisp code? Yuri Khan
2021-05-24 8:18 ` Christopher Dimech
2021-05-24 8:48 ` Jean Louis
2021-05-24 9:38 ` Christopher Dimech
2021-05-24 14:06 ` Yuri Khan
2021-05-24 14:24 ` Jean Louis
2021-05-24 14:36 ` Yuri Khan
2021-05-24 17:39 ` Jean Louis
2021-05-24 15:02 ` Eli Zaretskii
2021-05-24 17:31 ` Christopher Dimech
2021-05-24 18:05 ` Jean Louis
2021-05-24 18:12 ` Eli Zaretskii
2021-05-24 20:19 ` Jean Louis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADs++6gvfDDcyw50h=rR+6PfKjzP7U_GC_BmPap27mCErAYYLQ@mail.gmail.com' \
--to=eduardoochs@gmail.com \
--cc=dimech@gmx.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).