unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Refresh display after changing variable
@ 2021-08-02 16:49 Ken Goldman
  2021-08-02 17:03 ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Ken Goldman @ 2021-08-02 16:49 UTC (permalink / raw)
  To: help-gnu-emacs

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?




^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-08-04 20:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-02 16:49 Refresh display after changing variable Ken Goldman
2021-08-02 17:03 ` 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

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).