; Fix last change

* lisp/net/eww.el (eww-download-directory): Rename from
'eww-default-download-directory'.  All users changed.  Change
:type to be a directory.  Doc fix.  (Bug#62435)
This commit is contained in:
Eli Zaretskii 2023-03-26 14:56:57 +03:00
parent e19b7da7b0
commit d941666d85

View file

@ -64,21 +64,22 @@ The action to be taken can be further customized via
:version "28.1" :version "28.1"
:type 'regexp) :type 'regexp)
(defcustom eww-default-download-directory "~/Downloads/" (defcustom eww-download-directory "~/Downloads/"
"The default directory where downloaded files will be saved." "Default directory where `eww' saves downloaded files."
:version "30.1" :version "30.1"
:group 'eww :group 'eww
:type 'string) :type 'directory)
(defun eww--download-directory () (defun eww--download-directory ()
"Return the name of the download directory based on the value of "Return the name of the EWW download directory.
`eww-default-download-directory'. If the specified directory exists, it The default is specified by `eww-download-directory'; however,
will be used. Otherwise, the DOWNLOAD XDG user directory will be returned." if that directory doesn't exist and the DOWNLOAD XDG user directory
(or (and (file-exists-p eww-default-download-directory) is defined, use the latter instead."
eww-default-download-directory) (or (and (file-exists-p eww-download-directory)
eww-download-directory)
(when-let ((dir (xdg-user-dir "DOWNLOAD"))) (when-let ((dir (xdg-user-dir "DOWNLOAD")))
(file-name-as-directory dir)) (file-name-as-directory dir))
eww-default-download-directory)) eww-download-directory))
(defcustom eww-download-directory 'eww--download-directory (defcustom eww-download-directory 'eww--download-directory
"Directory where files will downloaded. "Directory where files will downloaded.