(gnus-summary-refer-thread): Implement a version that uses *-request-thread.
[gnus] / lisp / shr.el
index 8a0e814..ee54e30 100644 (file)
@@ -56,17 +56,17 @@ fit these criteria."
 (defcustom shr-table-line ?-
   "Character used to draw table line."
   :group 'shr
-  :type 'char)
+  :type 'character)
 
 (defcustom shr-table-corner ?+
   "Character used to draw table corner."
   :group 'shr
-  :type 'char)
+  :type 'character)
 
 (defcustom shr-hr-line ?-
   "Character used to draw hr line."
   :group 'shr
-  :type 'char)
+  :type 'character)
 
 (defcustom shr-width fill-column
   "Frame width to use for rendering."
@@ -219,8 +219,8 @@ redirects somewhere else."
        (unless shr-start
          (setq shr-start (point)))
        (insert elem)
-       (when (> (shr-current-column) shr-width)
-         (if (not (search-backward " " (line-beginning-position) t))
+       (while (> (current-column) shr-width)
+         (if (not (shr-find-fill-point))
              (insert "\n")
            (delete-char 1)
            (insert "\n")
@@ -235,23 +235,16 @@ redirects somewhere else."
 (defun shr-find-fill-point ()
   (let ((found nil))
     (while (and (not found)
-               (not (bolp)))
-      (when (or (eq (preceding-char) ? )
-               (aref fill-find-break-point-function-table (preceding-char)))
+               (> (current-column) shr-indentation))
+      (when (and (or (eq (preceding-char) ? )
+                    (aref fill-find-break-point-function-table
+                          (preceding-char)))
+                (<= (current-column) shr-width))
        (setq found (point)))
       (backward-char 1))
     (or found
        (end-of-line))))
 
-(defun shr-current-column ()
-  (let ((column 0))
-    (save-excursion
-      (beginning-of-line)
-      (while (not (eolp))
-       (incf column (char-width (following-char)))
-       (forward-char 1)))
-    column))
-
 (defun shr-ensure-newline ()
   (unless (zerop (current-column))
     (insert "\n")))
@@ -386,9 +379,10 @@ Return a string with image data."
        shr-start)
     (shr-generic cont)
     (widget-convert-button
-     'link (or shr-start start) (point)
-     :help-echo url)
-    (put-text-property (or shr-start start) (point) 'keymap shr-map)
+     'url-link (or shr-start start) (point)
+     :help-echo url
+     :keymap shr-map
+     url)
     (put-text-property (or shr-start start) (point) 'shr-url url)))
 
 (defun shr-encode-url (url)