diff options
Diffstat (limited to 'lisp/gnus/nndraft.el')
-rw-r--r-- | lisp/gnus/nndraft.el | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/lisp/gnus/nndraft.el b/lisp/gnus/nndraft.el index 1f87beda5f5..394b6fcc4fc 100644 --- a/lisp/gnus/nndraft.el +++ b/lisp/gnus/nndraft.el @@ -1,4 +1,4 @@ -;;; nndraft.el --- draft article access for Gnus +;;; nndraft.el --- draft article access for Gnus -*- lexical-binding: t; -*- ;; Copyright (C) 1995-2021 Free Software Foundation, Inc. @@ -79,7 +79,7 @@ are generated if and only if they are also in `message-draft-headers'." server nndraft-directory) t))) -(deffoo nndraft-retrieve-headers (articles &optional group server fetch-old) +(deffoo nndraft-retrieve-headers (articles &optional group server _fetch-old) (nndraft-possibly-change-group group) (with-current-buffer nntp-server-buffer (erase-buffer) @@ -108,7 +108,7 @@ are generated if and only if they are also in `message-draft-headers'." (nnheader-fold-continuation-lines) 'headers)))) -(deffoo nndraft-request-article (id &optional group server buffer) +(deffoo nndraft-request-article (id &optional group _server buffer) (nndraft-possibly-change-group group) (when (numberp id) ;; We get the newest file of the auto-saved file and the @@ -145,7 +145,7 @@ are generated if and only if they are also in `message-draft-headers'." ;;(message-remove-header "date") t)) -(deffoo nndraft-request-update-info (group info &optional server) +(deffoo nndraft-request-update-info (group info &optional _server) (nndraft-possibly-change-group group) (setf (gnus-info-read info) (gnus-update-read-articles @@ -204,13 +204,13 @@ are generated if and only if they are also in `message-draft-headers'." (setq buffer-file-name (expand-file-name file) buffer-auto-save-file-name (make-auto-save-file-name)) (clear-visited-file-modtime) - (add-hook 'write-contents-functions 'nndraft-generate-headers nil t) - (add-hook 'after-save-hook 'nndraft-update-unread-articles nil t) + (add-hook 'write-contents-functions #'nndraft-generate-headers nil t) + (add-hook 'after-save-hook #'nndraft-update-unread-articles nil t) (message-add-action '(nndraft-update-unread-articles) 'exit 'postpone 'kill) article)) -(deffoo nndraft-request-group (group &optional server dont-check info) +(deffoo nndraft-request-group (group &optional server dont-check _info) (nndraft-possibly-change-group group) (unless dont-check (let* ((pathname (nnmail-group-pathname group nndraft-directory)) @@ -229,7 +229,7 @@ are generated if and only if they are also in `message-draft-headers'." (list group server dont-check))) (deffoo nndraft-request-move-article (article group server accept-form - &optional last move-is-internal) + &optional _last _move-is-internal) (nndraft-possibly-change-group group) (let ((buf (gnus-get-buffer-create " *nndraft move*")) result) @@ -238,7 +238,7 @@ are generated if and only if they are also in `message-draft-headers'." (with-current-buffer buf (erase-buffer) (insert-buffer-substring nntp-server-buffer) - (setq result (eval accept-form)) + (setq result (eval accept-form t)) (kill-buffer (current-buffer)) result) (null (nndraft-request-expire-articles (list article) group server 'force)) @@ -292,7 +292,7 @@ are generated if and only if they are also in `message-draft-headers'." (nnoo-parent-function 'nndraft 'nnmh-request-replace-article (list article group buffer)))) -(deffoo nndraft-request-create-group (group &optional server args) +(deffoo nndraft-request-create-group (group &optional _server _args) (nndraft-possibly-change-group group) (if (file-exists-p nndraft-current-directory) (if (file-directory-p nndraft-current-directory) @@ -316,27 +316,25 @@ are generated if and only if they are also in `message-draft-headers'." (nnheader-concat nndraft-directory group)))) (defun nndraft-article-filename (article &rest args) - (apply 'concat + (apply #'concat (file-name-as-directory nndraft-current-directory) (int-to-string article) args)) (defun nndraft-auto-save-file-name (file) - (save-excursion + (with-current-buffer (gnus-get-buffer-create " *draft tmp*") + (setq buffer-file-name file) (prog1 - (progn - (set-buffer (gnus-get-buffer-create " *draft tmp*")) - (setq buffer-file-name file) - (make-auto-save-file-name)) + (make-auto-save-file-name) (kill-buffer (current-buffer))))) (defun nndraft-articles () "Return the list of messages in the group." (gnus-make-directory nndraft-current-directory) (sort - (mapcar 'string-to-number + (mapcar #'string-to-number (directory-files nndraft-current-directory nil "\\`[0-9]+\\'" t)) - '<)) + #'<)) (nnoo-import nndraft (nnmh |