Commit 3d95242e authored by Lars Magne Ingebrigtsen's avatar Lars Magne Ingebrigtsen Committed by Katsumi Yamaoka

lisp/gnus/shr.el (shr-tag-table-1): Mark the preliminary table renderings...

lisp/gnus/shr.el (shr-tag-table-1): Mark the preliminary table renderings instead of the final one so that we can more easily distinguish them
lisp/gnus/eww.el (eww-submit): Compute the submission URL correctly
parent 1b8dff23
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.
......
......@@ -192,7 +192,9 @@
(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))))
......@@ -235,11 +237,9 @@
: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)
......@@ -331,11 +331,12 @@
(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))
......@@ -353,7 +354,9 @@
(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)))
......
......@@ -115,7 +115,7 @@ cid: URL as the argument.")
(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)))
......@@ -1167,6 +1167,7 @@ ones, in case fg and bg are nil."
(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.
......@@ -1188,8 +1189,8 @@ ones, in case fg and bg are nil."
(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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment