From: Lars Ingebrigtsen Date: Sat, 5 Sep 2020 13:50:40 +0000 (+0200) Subject: Fix default value in selects in eww X-Git-Tag: emacs-28.0.90~6238 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3c69864a9c9ae45680660420b25807ab14255a11;p=emacs.git 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). --- 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