diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2023-03-27 17:16:58 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2023-03-27 17:16:58 -0400 |
commit | dfa4fb9a2ab5863a8fc903d0544c4d46d4b8e140 (patch) | |
tree | 089685886983feb89577aed2a824e9822c32f829 | |
parent | 701de494a05f6bac5f1e791be88bfacdc1a98728 (diff) | |
parent | b08bf8286059cb75166401c8cad01e3661cb8833 (diff) | |
download | emacs-dfa4fb9a2ab5863a8fc903d0544c4d46d4b8e140.tar.gz |
Merge from origin/emacs-29
b08bf828605 ; Fix :version of the new defcustom
d941666d859 ; Fix last change
e19b7da7b09 Add 'eww-default-download-directory'.
564c26bdbeb ; Fix edebug spec for 'gv-define-simple-setter' (bug#62256)
-rw-r--r-- | lisp/emacs-lisp/gv.el | 2 | ||||
-rw-r--r-- | lisp/net/eww.el | 20 |
2 files changed, 14 insertions, 8 deletions
diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el index dad91e92a45..ac001af06bd 100644 --- a/lisp/emacs-lisp/gv.el +++ b/lisp/emacs-lisp/gv.el @@ -271,7 +271,7 @@ instead the assignment is turned into something equivalent to (SETTER ARGS... temp) temp) so as to preserve the semantics of `setf'." - (declare (debug (sexp (&or symbolp lambda-expr) &optional sexp))) + (declare (debug (sexp [&or symbolp lambda-expr] &optional sexp))) (when (eq 'lambda (car-safe setter)) (message "Use `gv-define-setter' or name %s's setter function" name)) `(gv-define-setter ,name (val &rest args) diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 73d11c0ef52..1b42ef4e919 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -64,16 +64,22 @@ The action to be taken can be further customized via :version "28.1" :type 'regexp) +(defcustom eww-download-directory "~/Downloads/" + "Default directory where `eww' saves downloaded files." + :version "29.1" + :group 'eww + :type 'directory) + (defun eww--download-directory () - "Return the name of the download directory. -If ~/Downloads/ exists, that will be used, and if not, the -DOWNLOAD XDG user directory will be returned. If that's -undefined, ~/Downloads/ is returned anyway." - (or (and (file-exists-p "~/Downloads/") - "~/Downloads/") + "Return the name of the EWW download directory. +The default is specified by `eww-download-directory'; however, +if that directory doesn't exist and the DOWNLOAD XDG user directory +is defined, use the latter instead." + (or (and (file-exists-p eww-download-directory) + eww-download-directory) (when-let ((dir (xdg-user-dir "DOWNLOAD"))) (file-name-as-directory dir)) - "~/Downloads/")) + eww-download-directory)) (defcustom eww-download-directory 'eww--download-directory "Directory where files will downloaded. |