(wid-edit): Fix compilation.
[gnus] / lisp / nntp.el
index 31b1e3d..b25f5f5 100644 (file)
@@ -1025,8 +1025,8 @@ command whose response triggered the error."
   t)
 
 (deffoo nntp-request-set-mark (group actions &optional server)
-  (nntp-possibly-change-group group server)
   (unless nntp-marks-is-evil
+    (nntp-possibly-create-directory group server)
     (nntp-open-marks group server)
     (dolist (action actions)
       (let ((range (nth 0 action))
@@ -1045,8 +1045,9 @@ command whose response triggered the error."
   nil)
 
 (deffoo nntp-request-update-info (group info &optional server)
-  (nntp-possibly-change-group group server)
-  (when (and (not nntp-marks-is-evil) (nntp-marks-changed-p group))
+  (unless nntp-marks-is-evil
+    (nntp-possibly-create-directory group server))
+  (when (and (not nntp-marks-is-evil) (nntp-marks-changed-p group server))
     (nnheader-message 8 "Updating marks for %s..." group)
     (nntp-open-marks group server)
     ;; Update info using `nntp-marks'.
@@ -1970,16 +1971,21 @@ Please refer to the following variables to customize the connection:
 
 ;; Marks handling
 
-(defun nntp-possibly-create-directory (group)
-  (let ((dir (nnmail-group-pathname group nntp-marks-directory)))
+(defun nntp-marks-directory (server)
+  (expand-file-name server nntp-marks-directory))
+
+(defun nntp-possibly-create-directory (group server)
+  (let ((dir (nnmail-group-pathname
+             group (nntp-marks-directory server))))
     (unless (file-exists-p dir)
       (make-directory (directory-file-name dir) t)
       (nnheader-message 5 "Creating nntp marks directory %s" dir))))
 
-(defun nntp-marks-changed-p (group)
+(defun nntp-marks-changed-p (group server)
   (let ((file (expand-file-name
               nntp-marks-file-name 
-              (nnmail-group-pathname group nntp-marks-directory))))
+              (nnmail-group-pathname
+               group (nntp-marks-directory server)))))
     (if (null (gnus-gethash file nntp-marks-modtime))
        t ;; never looked at marks file, assume it has changed
       (not (equal (gnus-gethash file nntp-marks-modtime)
@@ -1989,10 +1995,11 @@ Please refer to the following variables to customize the connection:
   (let ((file-name-coding-system nnmail-pathname-coding-system)
        (file (expand-file-name
               nntp-marks-file-name 
-              (nnmail-group-pathname group nntp-marks-directory))))
+              (nnmail-group-pathname
+               group (nntp-marks-directory server)))))
     (condition-case err
        (progn
-         (nntp-possibly-create-directory group)
+         (nntp-possibly-create-directory group server)
          (with-temp-file file
            (erase-buffer)
            (gnus-prin1 nntp-marks)
@@ -2007,7 +2014,8 @@ Please refer to the following variables to customize the connection:
 (defun nntp-open-marks (group server)
   (let ((file (expand-file-name
               nntp-marks-file-name
-              (nnmail-group-pathname group nntp-marks-directory))))
+              (nnmail-group-pathname
+               group (nntp-marks-directory server)))))
     (if (file-exists-p file)
        (condition-case err
            (with-temp-buffer
@@ -2036,4 +2044,5 @@ Please refer to the following variables to customize the connection:
 
 (provide 'nntp)
 
+;;; arch-tag: 8655466a-b1b5-4929-9c45-7b1b2e767271
 ;;; nntp.el ends here