diff options
author | Stefan Kangas <stefan@marxist.se> | 2022-08-02 01:17:05 +0200 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2022-08-02 10:21:54 +0200 |
commit | 5e010f0522fcfbb1f3340daef0dfc2a32fd05b2d (patch) | |
tree | 71aeee4f4fe6f01447b41562f9209f3a31c82b28 /lisp/gnus/gnus-util.el | |
parent | 6c3bafbc2cf9853f3082fb643ee20c78a80bb69e (diff) | |
download | emacs-5e010f0522fcfbb1f3340daef0dfc2a32fd05b2d.tar.gz emacs-5e010f0522fcfbb1f3340daef0dfc2a32fd05b2d.tar.bz2 emacs-5e010f0522fcfbb1f3340daef0dfc2a32fd05b2d.zip |
Make gnus-url-unhex into alias for url-unhex
* lisp/gnus/gnus-util.el (gnus-url-unhex): Make into obsolete function
alias for url-unhex; they are identical. Update callers.
Diffstat (limited to 'lisp/gnus/gnus-util.el')
-rw-r--r-- | lisp/gnus/gnus-util.el | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 9bf48b1f4c3..2c10969ba07 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -1134,14 +1134,11 @@ 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))) - -;; Fixme: Do it like QP. +(autoload 'url-unhex "url-util") +(define-obsolete-function-alias 'gnus-url-unhex #'url-unhex "29.1") + +;; FIXME: Make obsolete in favor of `url-unhex-string', which is +;; identical except for the call to `char-to-string'. (defun gnus-url-unhex-string (str &optional allow-newlines) "Remove %XX, embedded spaces, etc in a url. If optional second argument ALLOW-NEWLINES is non-nil, then allow the @@ -1151,9 +1148,9 @@ forbidden in URL encoding." (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)))) + (ch1 (url-unhex (elt str (+ start 1)))) (code (+ (* 16 ch1) - (gnus-url-unhex (elt str (+ start 2)))))) + (url-unhex (elt str (+ start 2)))))) (setq tmp (concat tmp (substring str 0 start) (cond |