all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nick Helm <nick@tenpoint.co.nz>
To: help-gnu-emacs@gnu.org
Subject: How can I change a buffer-local glyphless char table?
Date: Wed, 06 Jun 2018 14:27:59 +1200	[thread overview]
Message-ID: <m2sh60d4y8.fsf@tenpoint.co.nz> (raw)

Occasionally, I find it useful to use
glyphless-char-display-control to visualise normally invisible
characters. I do this with something like:

  (update-glyphless-char-display 'glyphless-char-display-control
    '((c0-control     . empty-box)
      (c1-control     . empty-box)
      (format-control . empty-box)
      (no-font        . hex-code)))

and turn it off again with:

  (update-glyphless-char-display 'glyphless-char-display-control
    (eval (car (get 'glyphless-char-display-control
                    'standard-value))))

However this has a global effect. I would like it to only act on the
current buffer. I've tried creating a buffer-local char table with:

  (make-local-variable 'glyphless-char-display)

and repeating the call to update-glyphless-char-display, but it
affects both local and global values regardless.

If I make glyphless-char-display buffer-local and tweak its value
directly, it works fine.

Any ideas how I can do this more easily?



             reply	other threads:[~2018-06-06  2:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-06  2:27 Nick Helm [this message]
2018-06-06 14:50 ` How can I change a buffer-local glyphless char table? Eli Zaretskii
2018-06-06 22:13   ` Nick Helm
2018-06-06 17:45 ` Stefan Monnier
2018-06-06 22:34   ` Nick Helm

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2sh60d4y8.fsf@tenpoint.co.nz \
    --to=nick@tenpoint.co.nz \
    --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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.