]> git.eshelyaron.com Git - emacs.git/commitdiff
Delete compat code in `url` library
authorStefan Kangas <stefankangas@gmail.com>
Sun, 4 Feb 2024 09:28:40 +0000 (10:28 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sun, 4 Feb 2024 11:06:14 +0000 (12:06 +0100)
* lisp/url/url-cid.el (url-cid): Delete compat code for ancient Gnus.
* lisp/url/url-ldap.el (url-ldap-certificate-formatter): Delete compat
code; ssl.el has never been in Emacs.
* lisp/url/url-mailto.el (url-mail): Make into alias for 'message-mail',
since it is always fboundp.

(cherry picked from commit 9bbf8232dba746db90b90285e9e4ed6d299d251a)

lisp/url/url-cid.el
lisp/url/url-ldap.el
lisp/url/url-mailto.el

index 17a0318e6523fc90e7dc17a5602e81d73732e2a0..d80037f8fe9b053cbc1d3f569b110c9ea483dc64 100644 (file)
@@ -1,6 +1,6 @@
 ;;; url-cid.el --- Content-ID URL loader  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 1998-1999, 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
 
 ;; Keywords: comm, data, processes
 
 
 ;;;###autoload
 (defun url-cid (url)
-  (cond
-   ((fboundp 'mm-get-content-id)
-    ;; Using Pterodactyl Gnus or later
-    (with-current-buffer (generate-new-buffer " *url-cid*")
-      (url-cid-gnus (url-filename url))))
-   (t
-    (message "Unable to handle CID URL: %s" url))))
+  (with-current-buffer (generate-new-buffer " *url-cid*")
+    (url-cid-gnus (url-filename url))))
 
 ;;; url-cid.el ends here
index 1bdd5099637e5f9b56050cdf3971206944972ae3..6aaea606c270e4370f11956cc082dd83b50cbefb 100644 (file)
@@ -1,6 +1,6 @@
 ;;; url-ldap.el --- LDAP Uniform Resource Locator retrieval code  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 1998-1999, 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
 
 ;; Keywords: comm, data, processes
 
          "'>" dn "</a>"))
 
 (defun url-ldap-certificate-formatter (data)
-  (condition-case ()
-      (require 'ssl)
-    (error nil))
-  (let ((vals (if (fboundp 'ssl-certificate-information)
-                 (ssl-certificate-information data)
-               (tls-certificate-information data))))
+  ;; FIXME: tls.el is obsolete.
+  (let ((vals (tls-certificate-information data)))
     (if (not vals)
        "<b>Unable to parse certificate</b>"
       (concat "<table border=0>\n"
index c2d347a16467b17c4e39db9f3c4e63a33dc6d502..50293ab3f054937abacdc34b159e8b581cafe379 100644 (file)
@@ -1,6 +1,6 @@
 ;;; url-mailto.el --- Mail Uniform Resource Locator retrieval code  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 1996-1999, 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
 
 ;; Keywords: comm, data, processes
 
 (require 'url-util)
 
 ;;;###autoload
-(defun url-mail (&rest args)
-  (interactive "P")
-  (if (fboundp 'message-mail)
-      (apply 'message-mail args)
-    (or (apply 'mail args)
-       (error "Mail aborted"))))
+(defalias 'url-mail #'message-mail)
 
 (defun url-mail-goto-field (field)
   (if (not field)
@@ -57,8 +52,6 @@
        (save-excursion
          (insert "\n"))))))
 
-(declare-function mail-send-and-exit "sendmail")
-
 ;;;###autoload
 (defun url-mailto (url)
   "Handle the mailto: URL syntax."
        ;; (setq func (intern-soft (concat "mail-" (caar args))))
        (insert (mapconcat 'identity (cdar args) ", ")))
       (setq args (cdr args)))
-    ;; (url-mail-goto-field "User-Agent")
-;;     (insert url-package-name "/" url-package-version " URL/" url-version)
     (if (not url-request-data)
        (progn
          (set-buffer-modified-p nil)
       (goto-char (point-max))
       (insert url-request-data)
       ;; It seems Microsoft-ish to send without warning.
-      ;; Fixme: presumably this should depend on a privacy setting.
-      (if (y-or-n-p "Send this auto-generated mail? ")
+      ;; FIXME: presumably this should depend on a privacy setting.
+      (if (y-or-n-p "Send this auto-generated mail?")
          (let ((buffer (current-buffer)))
            (cond ((eq url-mail-command 'compose-mail)
                   (funcall (get mail-user-agent 'sendfunc) nil))