diff options
| author | Stefan Kangas | 2020-12-14 15:16:13 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2020-12-14 15:16:13 +0100 |
| commit | 4c41a8acc0e3877404ab99e56420bcdd4e27bdc2 (patch) | |
| tree | 2760bd31b70a6aa17ea818a483b34b44dbb423c0 | |
| parent | f1dae2551c9b30f1f1333416df195b0907c54f4f (diff) | |
| download | emacs-4c41a8acc0e3877404ab99e56420bcdd4e27bdc2.tar.gz emacs-4c41a8acc0e3877404ab99e56420bcdd4e27bdc2.zip | |
Make XEmacs compat variable warning-level-aliases obsolete
* lisp/emacs-lisp/warnings.el (warning-level-aliases): Make obsolete.
(display-warning): Warn when using one of the warning levels defined
in above obsolete variable. (Bug#44849)
* lisp/url/url-proxy.el (url-find-proxy-for-url): Replace obsolete
warning type 'critical with :error.
| -rw-r--r-- | lisp/emacs-lisp/warnings.el | 7 | ||||
| -rw-r--r-- | lisp/url/url-proxy.el | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el index f525ea433ad..28458847cc2 100644 --- a/lisp/emacs-lisp/warnings.el +++ b/lisp/emacs-lisp/warnings.el | |||
| @@ -67,6 +67,7 @@ Level :debug is ignored by default (see `warning-minimum-level').") | |||
| 67 | Each element looks like (ALIAS . LEVEL) and defines ALIAS as | 67 | Each element looks like (ALIAS . LEVEL) and defines ALIAS as |
| 68 | equivalent to LEVEL. LEVEL must be defined in `warning-levels'; | 68 | equivalent to LEVEL. LEVEL must be defined in `warning-levels'; |
| 69 | it may not itself be an alias.") | 69 | it may not itself be an alias.") |
| 70 | (make-obsolete-variable 'warning-level-aliases 'warning-levels "28.1") | ||
| 70 | 71 | ||
| 71 | (define-obsolete-variable-alias 'display-warning-minimum-level | 72 | (define-obsolete-variable-alias 'display-warning-minimum-level |
| 72 | 'warning-minimum-level "28.1") | 73 | 'warning-minimum-level "28.1") |
| @@ -256,8 +257,10 @@ entirely by setting `warning-suppress-types' or | |||
| 256 | (setq level :warning)) | 257 | (setq level :warning)) |
| 257 | (unless buffer-name | 258 | (unless buffer-name |
| 258 | (setq buffer-name "*Warnings*")) | 259 | (setq buffer-name "*Warnings*")) |
| 259 | (if (assq level warning-level-aliases) | 260 | (with-suppressed-warnings ((obsolete warning-level-aliases)) |
| 260 | (setq level (cdr (assq level warning-level-aliases)))) | 261 | (when-let ((new (cdr (assq level warning-level-aliases)))) |
| 262 | (warn "Warning level `%s' is obsolete; use `%s' instead" level new) | ||
| 263 | (setq level new))) | ||
| 261 | (or (< (warning-numeric-level level) | 264 | (or (< (warning-numeric-level level) |
| 262 | (warning-numeric-level warning-minimum-log-level)) | 265 | (warning-numeric-level warning-minimum-log-level)) |
| 263 | (warning-suppress-p type warning-suppress-log-types) | 266 | (warning-suppress-p type warning-suppress-log-types) |
diff --git a/lisp/url/url-proxy.el b/lisp/url/url-proxy.el index 698a87098ba..ad04a2d94a3 100644 --- a/lisp/url/url-proxy.el +++ b/lisp/url/url-proxy.el | |||
| @@ -59,7 +59,7 @@ | |||
| 59 | ((string-match "^socks +" proxy) | 59 | ((string-match "^socks +" proxy) |
| 60 | (concat "socks://" (substring proxy (match-end 0)))) | 60 | (concat "socks://" (substring proxy (match-end 0)))) |
| 61 | (t | 61 | (t |
| 62 | (display-warning 'url (format "Unknown proxy directive: %s" proxy) 'critical) | 62 | (display-warning 'url (format "Unknown proxy directive: %s" proxy) :error) |
| 63 | nil)))) | 63 | nil)))) |
| 64 | 64 | ||
| 65 | (autoload 'url-http "url-http") | 65 | (autoload 'url-http "url-http") |