Don't unnecessarily run file-truename on remote files when checking drafts.
authorAndreas Seltenreich <andreas+git@gate450.dyndns.org>
Wed, 20 Oct 2010 08:34:13 +0000 (10:34 +0200)
committerAndreas Seltenreich <andreas+git@gate450.dyndns.org>
Wed, 20 Oct 2010 08:56:50 +0000 (10:56 +0200)
* gnus-draft.el (gnus-draft-check-draft-articles): Don't unnecessarily
run file-truename on remote files.  This can be expensive and even
prevent one from editing drafts if some unrelated buffer has a stale
connection.

lisp/ChangeLog
lisp/gnus-draft.el

index 5a798ce..e9096cf 100644 (file)
@@ -1,3 +1,10 @@
+2010-10-20  Andreas Seltenreich  <seltenreich@gmx.de>
+
+       * gnus-draft.el (gnus-draft-check-draft-articles): Don't unnecessarily
+       run file-truename on remote files.  This can be expensive and even
+       prevent one from editing drafts if some unrelated buffer has a stale
+       connection.
+
 2010-10-20  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * shr.el (shr-find-fill-point): Shorten line if the preceding char is
index d538730..e397a70 100644 (file)
@@ -310,6 +310,8 @@ Obeys the standard process/prefix convention."
          (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))