emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 1ac6330 2/4: Remove some compat code from url.el


From: Stefan Kangas
Subject: master 1ac6330 2/4: Remove some compat code from url.el
Date: Thu, 19 Nov 2020 14:50:18 -0500 (EST)

branch: master
commit 1ac6330fce34beaead60f1c5c7573950e9014780
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    Remove some compat code from url.el
    
    * lisp/url/url.el (url-warn): Make into obsolete alias for
    display-warning.
    * lisp/url/url-auth.el (url-register-auth-scheme):
    * lisp/url/url-news.el (url-news-open-host):
    * lisp/url/url-proxy.el (url-find-proxy-for-url): Adjust callers.
---
 lisp/url/url-auth.el  |  3 +--
 lisp/url/url-news.el  |  3 +--
 lisp/url/url-proxy.el |  3 +--
 lisp/url/url.el       | 14 +-------------
 4 files changed, 4 insertions(+), 19 deletions(-)

diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el
index fd800cd..bcb48aa 100644
--- a/lisp/url/url-auth.el
+++ b/lisp/url/url-auth.el
@@ -23,7 +23,6 @@
 
 (require 'url-vars)
 (require 'url-parse)
-(autoload 'url-warn "url")
 (autoload 'auth-source-search "auth-source")
 
 (defsubst url-auth-user-prompt (url realm)
@@ -540,7 +539,7 @@ RATING   a rating between 1 and 10 of the strength of the 
authentication.
                  (t rating)))
         (node (assoc type url-registered-auth-schemes)))
     (if (not (fboundp function))
-       (url-warn
+        (display-warning
         'security
         (format-message
          "Tried to register `%s' as an auth scheme, but it is not a function!"
diff --git a/lisp/url/url-news.el b/lisp/url/url-news.el
index 9ef17cc..78a6aa9 100644
--- a/lisp/url/url-news.el
+++ b/lisp/url/url-news.el
@@ -25,7 +25,6 @@
 (require 'url-util)
 (require 'url-parse)
 (require 'nntp)
-(autoload 'url-warn "url")
 (autoload 'gnus-group-read-ephemeral-group "gnus-group")
 
 ;; Unused.
@@ -42,7 +41,7 @@
        (nntp-send-command "^.*\r?\n" "AUTHINFO USER" user)
        (nntp-send-command "^.*\r?\n" "AUTHINFO PASS" pass)
        (if (not (nntp-server-opened host))
-           (url-warn 'url (format "NNTP authentication to `%s' as `%s' failed"
+            (display-warning 'url (format "NNTP authentication to `%s' as `%s' 
failed"
                                   host user))))))
 
 (defun url-news-fetch-message-id (host message-id)
diff --git a/lisp/url/url-proxy.el b/lisp/url/url-proxy.el
index 9513c39..698a870 100644
--- a/lisp/url/url-proxy.el
+++ b/lisp/url/url-proxy.el
@@ -22,7 +22,6 @@
 ;;; Code:
 
 (require 'url-parse)
-(autoload 'url-warn "url")
 
 (defun url-default-find-proxy-for-url (urlobj host)
   (cond
@@ -60,7 +59,7 @@
      ((string-match "^socks +" proxy)
       (concat "socks://" (substring proxy (match-end 0))))
      (t
-      (url-warn 'url (format "Unknown proxy directive: %s" proxy) 'critical)
+      (display-warning 'url (format "Unknown proxy directive: %s" proxy) 
'critical)
       nil))))
 
 (autoload 'url-http "url-http")
diff --git a/lisp/url/url.el b/lisp/url/url.el
index 33a5ebc..5188007 100644
--- a/lisp/url/url.el
+++ b/lisp/url/url.el
@@ -365,19 +365,7 @@ how long to wait for a response before giving up."
       (if (buffer-live-p buff)
          (kill-buffer buff)))))
 
-(cond
- ((fboundp 'display-warning)
-  (defalias 'url-warn 'display-warning))
- ((fboundp 'warn)
-  (defun url-warn (class message &optional level)
-    (warn "(%s/%s) %s" class (or level 'warning) message)))
- (t
-  (defun url-warn (class message &optional level)
-    (with-current-buffer (get-buffer-create "*URL-WARNINGS*")
-      (goto-char (point-max))
-      (save-excursion
-       (insert (format "(%s/%s) %s\n" class (or level 'warning) message)))
-      (display-buffer (current-buffer))))))
+(define-obsolete-function-alias 'url-warn #'display-warning "28.1")
 
 (provide 'url)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]