DWIM commands (upcase, downcase and more4)
(defun url-decode-region (start end)
"Replace a region with the same contents, only URL decoded."
(interactive "r")
(let ((text (url-unhex-string (buffer-substring start end))))
(delete-region start end)
(insert text)))