2001-12-07 10:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
authorShengHuo ZHU <zsh@cs.rochester.edu>
Fri, 7 Dec 2001 15:13:33 +0000 (15:13 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Fri, 7 Dec 2001 15:13:33 +0000 (15:13 +0000)
* nnwfm.el (nnwfm-create-mapping): Use gnus-url-unhex-string.

* gnus-util.el (gnus-url-unhex-string): Move here.

lisp/ChangeLog
lisp/gnus-art.el
lisp/gnus-util.el
lisp/lpath.el
lisp/nnwfm.el

index 941006a..c6209ee 100644 (file)
@@ -1,3 +1,9 @@
+2001-12-07 10:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * nnwfm.el (nnwfm-create-mapping): Use gnus-url-unhex-string.
+
+       * gnus-util.el (gnus-url-unhex-string): Move here.
+
 2001-12-07 09:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * nnrss.el (nnrss-decode-entities-unibyte-string): Use
index 3cedb09..1d74553 100644 (file)
@@ -5240,38 +5240,6 @@ specified by `gnus-button-alist'."
          (setq retval (cons (list key val) retval)))))
     retval))
 
-(defun gnus-url-unhex (x)
-  (if (> x ?9)
-      (if (>= x ?a)
-         (+ 10 (- x ?a))
-       (+ 10 (- x ?A)))
-    (- x ?0)))
-
-(defun gnus-url-unhex-string (str &optional allow-newlines)
-  "Remove %XXX embedded spaces, etc in a url.
-If optional second argument ALLOW-NEWLINES is non-nil, then allow the
-decoding of carriage returns and line feeds in the string, which is normally
-forbidden in URL encoding."
-  (setq str (or (mm-subst-char-in-string ?+ ?  str) ""))
-  (let ((tmp "")
-       (case-fold-search t))
-    (while (string-match "%[0-9a-f][0-9a-f]" str)
-      (let* ((start (match-beginning 0))
-            (ch1 (gnus-url-unhex (elt str (+ start 1))))
-            (code (+ (* 16 ch1)
-                     (gnus-url-unhex (elt str (+ start 2))))))
-       (setq tmp (concat
-                  tmp (substring str 0 start)
-                  (cond
-                   (allow-newlines
-                    (char-to-string code))
-                   ((or (= code ?\n) (= code ?\r))
-                    " ")
-                   (t (char-to-string code))))
-             str (substring str (match-end 0)))))
-    (setq tmp (concat tmp str))
-    tmp))
-
 (defun gnus-url-mailto (url)
   ;; Send mail to someone
   (when (string-match "mailto:/*\\(.*\\)" url)
index 4f426d1..cc4cbe0 100644 (file)
@@ -1160,6 +1160,38 @@ sure of changing the value of `foo'."
 If you find some problem with the directory separator character, try
 \"[/\\\\\]\" for some systems.")
 
+(defun gnus-url-unhex (x)
+  (if (> x ?9)
+      (if (>= x ?a)
+         (+ 10 (- x ?a))
+       (+ 10 (- x ?A)))
+    (- x ?0)))
+
+(defun gnus-url-unhex-string (str &optional allow-newlines)
+  "Remove %XXX embedded spaces, etc in a url.
+If optional second argument ALLOW-NEWLINES is non-nil, then allow the
+decoding of carriage returns and line feeds in the string, which is normally
+forbidden in URL encoding."
+  (setq str (or (mm-subst-char-in-string ?+ ?  str) ""))
+  (let ((tmp "")
+       (case-fold-search t))
+    (while (string-match "%[0-9a-f][0-9a-f]" str)
+      (let* ((start (match-beginning 0))
+            (ch1 (gnus-url-unhex (elt str (+ start 1))))
+            (code (+ (* 16 ch1)
+                     (gnus-url-unhex (elt str (+ start 2))))))
+       (setq tmp (concat
+                  tmp (substring str 0 start)
+                  (cond
+                   (allow-newlines
+                    (char-to-string code))
+                   ((or (= code ?\n) (= code ?\r))
+                    " ")
+                   (t (char-to-string code))))
+             str (substring str (match-end 0)))))
+    (setq tmp (concat tmp str))
+    tmp))
+
 (provide 'gnus-util)
 
 ;;; gnus-util.el ends here
index 991e764..49e2935 100644 (file)
@@ -13,6 +13,7 @@
 
 (maybe-fbind '(babel-fetch
               babel-wash create-image decode-coding-string display-graphic-p
+              replace-regexp-in-string
               bbdb-complete-name
               display-time-event-handler
               find-image font-create-object gnus-mule-get-coding-system
@@ -72,6 +73,7 @@
                     make-overlay mouse-minibuffer-check mouse-movement-p
                     mouse-scroll-subr overlay-buffer overlay-end
                     overlay-get overlay-lists overlay-put
+                    overlays-in
                     overlay-start posn-point posn-window
                     read-event read-event run-with-idle-timer
                     set-buffer-multibyte set-char-table-range
index 4df938b..ccabdfa 100644 (file)
        (when (re-search-forward "href=\"\\(Thread.*DateLast=\\([^\"]+\\)\\)"
                                 nil t)
          (setq url (match-string 1)
-               time (nnwfm-date-to-time (url-unhex-string (match-string 2))))
+               time (nnwfm-date-to-time (gnus-url-unhex-string 
+                                         (match-string 2))))
          (when (and (nnwfm-new-threads-p group time)
                     (not (member
                           (setq url (concat