* bug#22721: Make the eww-font-toggle message clear
@ 2016-02-17 15:01 Kaushal Modi
2016-02-17 15:05 ` Kaushal Modi
0 siblings, 1 reply; 3+ messages in thread
From: Kaushal Modi @ 2016-02-17 15:01 UTC (permalink / raw
To: 22721, larsi
[-- Attachment #1: Type: text/plain, Size: 1101 bytes --]
Hi,
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."
(interactive)
- (message "Fonts are now %s"
+ (eww-reload)
+ (message "Proportional fonts are now %s"
(if (setq shr-use-fonts (not shr-use-fonts))
"on"
- "off"))
- (eww-reload))
+ "off")))
;;; Bookmarks code
--
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 1842 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#22721: Make the eww-font-toggle message clear
2016-02-17 15:01 bug#22721: Make the eww-font-toggle message clear Kaushal Modi
@ 2016-02-17 15:05 ` Kaushal Modi
2016-02-19 5:56 ` Lars Ingebrigtsen
0 siblings, 1 reply; 3+ messages in thread
From: Kaushal Modi @ 2016-02-17 15:05 UTC (permalink / raw
To: 22721
[-- Attachment #1: Type: text/plain, Size: 656 bytes --]
Made a "duh" mistake in my earlier patch.
Here's the fixed version:
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index da920c1..185b9e6 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -1498,11 +1498,10 @@ eww-set-character-encoding
(defun eww-toggle-fonts ()
"Toggle whether to use monospaced or font-enabled layouts."
(interactive)
- (message "Fonts are now %s"
- (if (setq shr-use-fonts (not shr-use-fonts))
- "on"
- "off"))
- (eww-reload))
+ (setq shr-use-fonts (not shr-use-fonts))
+ (eww-reload)
+ (message "Proportional fonts are now %s"
+ (if shr-use-fonts "on" "off")))
;;; Bookmarks code
--
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 1337 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#22721: Make the eww-font-toggle message clear
2016-02-17 15:05 ` Kaushal Modi
@ 2016-02-19 5:56 ` Lars Ingebrigtsen
0 siblings, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-19 5:56 UTC (permalink / raw
To: Kaushal Modi; +Cc: 22721
Kaushal Modi <kaushal.modi@gmail.com> writes:
> Here's the fixed version:
Thanks; applied to emacs-25.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-02-19 5:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-17 15:01 bug#22721: Make the eww-font-toggle message clear Kaushal Modi
2016-02-17 15:05 ` Kaushal Modi
2016-02-19 5:56 ` Lars Ingebrigtsen
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.