From 3c69864a9c9ae45680660420b25807ab14255a11 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sat, 5 Sep 2020 15:50:40 +0200 Subject: [PATCH] Fix default value in selects in eww * lisp/net/eww.el (eww-change-select): Make hitting RET with an empty string use a default (bug#43218). --- lisp/net/eww.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/net/eww.el b/lisp/net/eww.el index dedf1c62717..b800d1890fe 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -1451,7 +1451,9 @@ See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.") (plist-get (cdr elem) :value)))) input))) (display - (completing-read "Change value: " options nil 'require-match)) + (completing-read "Change value: " options nil 'require-match + nil nil (car (rassoc (plist-get input :value) + options)))) (inhibit-read-only t)) (plist-put input :value (cdr (assoc-string display options t))) (goto-char -- 2.39.5