[Top][All Lists]

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

bug#22721: Make the eww-font-toggle message clear

From: Kaushal Modi
Subject: bug#22721: Make the eww-font-toggle message clear
Date: Wed, 17 Feb 2016 10:01:44 -0500


Here's a little patch where I change things a little bit in eww-font-toggle function.

(1) The message is printed *after* eww-reload so that the font message is not quickly masked by the "Contacting host.." message put out by eww-reload. That way it is more obvious to the user if the proportional fonts were turned on or off.

(2) Instead of "Fonts are now .." message, it now prints "Proportional fonts are now ..". Earlier, I was confused if the monospace fonts were on or proportional fonts were on. Doing "C-h v shr-use-fonts" helped me understand that message better.

diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index da920c1..8536c63 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -1498,11 +1498,11 @@ eww-set-character-encoding
 (defun eww-toggle-fonts ()
   "Toggle whether to use monospaced or font-enabled layouts."
-  (message "Fonts are now %s"
+  (eww-reload)
+  (message "Proportional fonts are now %s"
    (if (setq shr-use-fonts (not shr-use-fonts))
-     "off"))
-  (eww-reload))
+     "off")))
 ;;; Bookmarks code

Kaushal Modi

reply via email to

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