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.