(require 'w3)
(require 'url)
(require 'w3-forms)))
+
;; Report failure to find w3 at load time if appropriate.
-(eval '(progn
- (require 'w3)
- (require 'url)
- (require 'w3-forms)))
+(unless noninteractive
+ (eval '(progn
+ (require 'w3)
+ (require 'url)
+ (require 'w3-forms))))
(nnoo-declare nnweb)
(setq url-current-callback-data data
url-be-asynchronous t
url-current-callback-func callback)
- (url-retrieve url))
+ (url-retrieve url nil))
(setq-default url-be-asynchronous old-asynch)))
+(if (fboundp 'url-retrieve-synchronously)
+ (defun nnweb-url-retrieve-asynch (url callback &rest data)
+ (url-retrieve url callback data)))
+
;;;
;;; DejaNews functions.
;;;
(setq elem (char-to-string elem)))
(replace-match elem t t))))
-(defun nnweb-decode-entities-string (str)
+(defun nnweb-decode-entities-string (string)
(with-temp-buffer
- (insert str)
+ (insert string)
(nnweb-decode-entities)
(buffer-substring (point-min) (point-max))))
(listp (cdr element)))
(nnweb-text-1 element)))))
+(defun nnweb-replace-in-string (string match newtext)
+ (while (string-match match string)
+ (setq string (replace-match newtext t t string)))
+ string)
+
(provide 'nnweb)
;;; nnweb.el ends here