all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ken Goldman <kgoldman@us.ibm.com>
To: help-gnu-emacs@gnu.org
Subject: Refresh display after changing variable
Date: Mon, 2 Aug 2021 12:49:41 -0400	[thread overview]
Message-ID: <se97n5$1343$1@ciao.gmane.io> (raw)

I have this to toggle a variable:

(defun kg-toggle-whitespace-line-column ()
   "Toggle whitespace line column between 80 and 101"
   (interactive)
   (setq whitespace-line-column (if (= whitespace-line-column 80) 101 80))
   (font-lock-fontify-buffer))
(global-set-key "\C-cw" 'kg-toggle-whitespace-line-column)

However, the buffer is not refreshed with the different colors.

I also tried (refresh-display) - no success

(revert-buffer) works but seems crude.

What's the correct function?




             reply	other threads:[~2021-08-02 16:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-02 16:49 Ken Goldman [this message]
2021-08-02 17:03 ` Refresh display after changing variable Eli Zaretskii
2021-08-02 19:36   ` Ken Goldman
2021-08-02 19:40     ` Eli Zaretskii
2021-08-02 20:56       ` Michael Heerdegen
2021-08-02 21:26         ` 2QdxY4RzWzUUiLuE
2021-08-03 15:42           ` Ken Goldman
2021-08-03 15:52             ` Eli Zaretskii
2021-08-03 16:17               ` Ken Goldman
2021-08-03 17:00             ` 2QdxY4RzWzUUiLuE
2021-08-03 17:03               ` Eli Zaretskii
2021-08-04 20:17               ` Ken Goldman

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='se97n5$1343$1@ciao.gmane.io' \
    --to=kgoldman@us.ibm.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.
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.