X-Git-Url: http://cgit.sxemacs.org/?p=gnus;a=blobdiff_plain;f=lisp%2Feww.el;h=811aa5718730edb63a3de00733e853609ce73b48;hp=ccbd5ee9aac88529f6bba9738d092ca589fcb19a;hb=d35146fa43e9e2d8d346073c3c0692162abf4759;hpb=53ba8f343521c48f295df2a0238aa6b9e55a975e diff --git a/lisp/eww.el b/lisp/eww.el index ccbd5ee9a..811aa5718 100644 --- a/lisp/eww.el +++ b/lisp/eww.el @@ -350,13 +350,14 @@ :value (cdr (assq :value (cdr elem))) :tag (cdr (assq 'text (cdr elem)))) options))) - ;; If we have no selected values, default to the first value. - (unless (plist-get (cdr menu) :value) - (nconc menu (list :value (nth 2 (car options))))) - (nconc menu options) - (apply 'widget-create menu) - (put-text-property start (point) 'eww-widget menu) - (shr-ensure-paragraph))) + (when options + ;; If we have no selected values, default to the first value. + (unless (plist-get (cdr menu) :value) + (nconc menu (list :value (nth 2 (car options))))) + (nconc menu options) + (apply 'widget-create menu) + (put-text-property start (point) 'eww-widget menu) + (shr-ensure-paragraph)))) (defun eww-click-radio (widget &rest ignore) (let ((form (plist-get (cdr widget) :eww-form))