diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2020-09-05 15:50:40 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2020-09-05 15:50:40 +0200 |
commit | 3c69864a9c9ae45680660420b25807ab14255a11 (patch) | |
tree | 5831eae18140515f4aa9c88566ac70fc390de94e | |
parent | b9bdc48b4c79c88e36216b404997084fecf1bed2 (diff) | |
download | emacs-3c69864a9c9ae45680660420b25807ab14255a11.tar.gz |
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).
-rw-r--r-- | lisp/net/eww.el | 4 |
1 files changed, 3 insertions, 1 deletions
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 |