+2013-06-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * shr.el (shr-tag-table-1): Mark the preliminary table renderings
+ instead of the final one so that we can more easily distinguish them.
+
+ * eww.el (eww-submit): Compute the submission URL correctly.
+
2013-06-13 Stefan Monnier <monnier@iro.umontreal.ca>
* sieve-manage.el (sieve-manage-open-server): Don't quote lambda.
(start (point)))
(shr-ensure-paragraph)
(shr-generic cont)
- (shr-ensure-paragraph)
+ (unless (bolp)
+ (insert "\n"))
+ (insert "\n")
(when (> (point) start)
(put-text-property start (1+ start)
'eww-form eww-form))))
:name (cdr (assq :name cont))
:eww-form eww-form)))))
(if (eq (car widget) 'hidden)
- (when shr-final-table-render
- (nconc eww-form (list widget)))
- (apply 'widget-create widget))
- (put-text-property start (point) 'eww-widget widget)
- (insert " ")))
+ (nconc eww-form (list widget))
+ (apply 'widget-create widget)
+ (put-text-property start (point) 'eww-widget widget))))
(defun eww-tag-select (cont)
(shr-ensure-paragraph)
(url-request-data (mm-url-encode-www-form-urlencoded values)))
(eww-browse-url (shr-expand-url (cdr (assq :action form)))))
(eww-browse-url
- (shr-expand-url
(concat
- (cdr (assq :action form))
+ (if (cdr (assq :action form))
+ (shr-expand-url (cdr (assq :action form)))
+ eww-current-url)
"?"
- (mm-url-encode-www-form-urlencoded values))))))))
+ (mm-url-encode-www-form-urlencoded values)))))))
(defun eww-convert-widgets ()
(let ((start (point-min))
(plist-get (overlay-properties overlay) 'field))
(delete-overlay overlay)))
(delete-region start end))
- (apply 'widget-create widget))
+ (when (and widget
+ (not (eq (car widget) 'hidden)))
+ (apply 'widget-create widget)))
(widget-setup)
(eww-fix-widget-keymap)))
(defvar shr-base nil)
(defvar shr-ignore-cache nil)
(defvar shr-external-rendering-functions nil)
-(defvar shr-final-table-render nil)
+(defvar shr-preliminary-table-render nil)
(defvar shr-map
(let ((map (make-sparse-keymap)))
(setq cont (or (cdr (assq 'tbody cont))
cont))
(let* ((shr-inhibit-images t)
+ (shr-preliminary-table-render t)
(shr-table-depth (1+ shr-table-depth))
(shr-kinsoku-shorten t)
;; Find all suggested widths.
(frame-width))
(setq truncate-lines t))
;; Then render the table again with these new "hard" widths.
- (let ((shr-final-table-render t))
- (shr-insert-table (shr-make-table cont sketch-widths t) sketch-widths)))
+ (setq shr-preliminary-table-render nil)
+ (shr-insert-table (shr-make-table cont sketch-widths t) sketch-widths))
;; Finally, insert all the images after the table. The Emacs buffer
;; model isn't strong enough to allow us to put the images actually
;; into the tables.