diff options
| author | Eli Zaretskii | 2023-03-26 14:56:57 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2023-03-26 14:56:57 +0300 |
| commit | d941666d8593bbee5a50262b2c4177ffa2010e56 (patch) | |
| tree | 4b794103860aec9cae592c781f8f35279ebe6a41 | |
| parent | e19b7da7b09ed44bf08b06be082abdfc23d44e6f (diff) | |
| download | emacs-d941666d8593bbee5a50262b2c4177ffa2010e56.tar.gz emacs-d941666d8593bbee5a50262b2c4177ffa2010e56.zip | |
; 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)
| -rw-r--r-- | lisp/net/eww.el | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 9552138bb6e..52951074bea 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el | |||
| @@ -64,21 +64,22 @@ The action to be taken can be further customized via | |||
| 64 | :version "28.1" | 64 | :version "28.1" |
| 65 | :type 'regexp) | 65 | :type 'regexp) |
| 66 | 66 | ||
| 67 | (defcustom eww-default-download-directory "~/Downloads/" | 67 | (defcustom eww-download-directory "~/Downloads/" |
| 68 | "The default directory where downloaded files will be saved." | 68 | "Default directory where `eww' saves downloaded files." |
| 69 | :version "30.1" | 69 | :version "30.1" |
| 70 | :group 'eww | 70 | :group 'eww |
| 71 | :type 'string) | 71 | :type 'directory) |
| 72 | 72 | ||
| 73 | (defun eww--download-directory () | 73 | (defun eww--download-directory () |
| 74 | "Return the name of the download directory based on the value of | 74 | "Return the name of the EWW download directory. |
| 75 | `eww-default-download-directory'. If the specified directory exists, it | 75 | The default is specified by `eww-download-directory'; however, |
| 76 | will be used. Otherwise, the DOWNLOAD XDG user directory will be returned." | 76 | if that directory doesn't exist and the DOWNLOAD XDG user directory |
| 77 | (or (and (file-exists-p eww-default-download-directory) | 77 | is defined, use the latter instead." |
| 78 | eww-default-download-directory) | 78 | (or (and (file-exists-p eww-download-directory) |
| 79 | eww-download-directory) | ||
| 79 | (when-let ((dir (xdg-user-dir "DOWNLOAD"))) | 80 | (when-let ((dir (xdg-user-dir "DOWNLOAD"))) |
| 80 | (file-name-as-directory dir)) | 81 | (file-name-as-directory dir)) |
| 81 | eww-default-download-directory)) | 82 | eww-download-directory)) |
| 82 | 83 | ||
| 83 | (defcustom eww-download-directory 'eww--download-directory | 84 | (defcustom eww-download-directory 'eww--download-directory |
| 84 | "Directory where files will downloaded. | 85 | "Directory where files will downloaded. |