+(defun gnus-draft-check-draft-articles (articles)
+ "Check whether the draft articles ARTICLES are under edit."
+ (when (equal gnus-newsgroup-name "nndraft:drafts")
+ (let ((buffers (buffer-list))
+ file buffs buff)
+ (save-current-buffer
+ (while (and articles
+ (not buff))
+ (setq file (nndraft-article-filename (pop articles))
+ buffs buffers)
+ (while buffs
+ (set-buffer (setq buff (pop buffs)))
+ (if (and buffer-file-name
+ (equal (file-remote-p file)
+ (file-remote-p buffer-file-name))
+ (string-equal (file-truename buffer-file-name)
+ (file-truename file))
+ (buffer-modified-p))
+ (setq buffs nil)
+ (setq buff nil)))))
+ (when buff
+ (let* ((window (get-buffer-window buff t))
+ (frame (and window (window-frame window))))
+ (if frame
+ (gnus-select-frame-set-input-focus frame)
+ (pop-to-buffer buff t)))
+ (error "The draft %s is under edit" file)))))
+