* mm-url.el (mm-url-package-name): New variable.
authorShengHuo ZHU <zsh@cs.rochester.edu>
Sat, 27 Apr 2002 17:39:54 +0000 (17:39 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Sat, 27 Apr 2002 17:39:54 +0000 (17:39 +0000)
(mm-url-package-version): New variable.
(mm-url-insert-file-contents): Bind url-package-name and
url-package-version here.
* nnrss.el (nnrss-insert-w3): Move the bindings.

* nnrss.el (nnrss-insert-w3): Bind url-package-name and
url-package-version. Trivial change from Andrew J Cosgriff
<ajc@polydistortion.net>

lisp/ChangeLog
lisp/mm-url.el
lisp/nnrss.el

index 0875d84..6b02657 100644 (file)
@@ -1,5 +1,11 @@
 2002-04-27  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
+       * mm-url.el (mm-url-package-name): New variable.
+       (mm-url-package-version): New variable.
+       (mm-url-insert-file-contents): Bind url-package-name and
+       url-package-version here.
+       * nnrss.el (nnrss-insert-w3): Move the bindings.
+
        * nnrss.el (nnrss-insert-w3): Bind url-package-name and
        url-package-version. Trivial change from Andrew J Cosgriff
        <ajc@polydistortion.net>
index 434132a..561f89a 100644 (file)
@@ -32,6 +32,7 @@
 (eval-when-compile (require 'cl))
 
 (require 'mm-util)
+(require 'gnus)
 
 (eval-and-compile
   (autoload 'executable-find "executable"))
 \f
 ;;; Internal variables
 
+(defvar mm-url-package-name
+  (gnus-replace-in-string
+   (gnus-replace-in-string gnus-version " v.*$" "")
+   " " "-"))
+
+(defvar        mm-url-package-version gnus-version-number)
+
 ;; Stolen from w3.
 (defvar mm-url-html-entities
   '(
@@ -266,7 +274,11 @@ This is taken from RFC 2396.")
          (insert-file-contents (substring url (1- (match-end 0))))
        (mm-url-insert-file-contents-external url))
     (mm-url-load-url)
-    (let ((name buffer-file-name))
+    (let ((name buffer-file-name)
+         (url-package-name (or mm-url-package-name
+                               url-package-name))
+         (url-package-version (or mm-url-package-version
+                                  url-package-version)))
       (prog1
          (url-insert-file-contents url)
        (save-excursion
index ffb8bb9..c8adc36 100644 (file)
@@ -450,13 +450,8 @@ ARTICLE is the article number of the current headline.")
   "")
 
 (defun nnrss-insert-w3 (url)
-  (let ((url-package-name 
-        (gnus-replace-in-string 
-         (gnus-replace-in-string gnus-version " v.*$" "")
-         " " ""))
-       (url-package-version gnus-version-number))
-    (mm-with-unibyte-current-buffer
-      (mm-url-insert url))))
+  (mm-with-unibyte-current-buffer
+    (mm-url-insert url)))
 
 (defun nnrss-decode-entities-unibyte-string (string)
   (mm-with-unibyte-buffer