* files.el (basic-save-buffer): save unmodified buffers when
the file pointed by buffer-file-name doesn't exist.
+2011-02-11 Bastien Guerry <bzg@altern.org>
+
+ * files.el (basic-save-buffer): save unmodified buffers when
+ the file pointed by buffer-file-name doesn't exist.
+
2011-02-11 Deniz Dogan <deniz.a.m.dogan@gmail.com>
* net/rcirc.el (defun-rcirc-join): Accept multiple channels.
;; In an indirect buffer, save its base buffer instead.
(if (buffer-base-buffer)
(set-buffer (buffer-base-buffer)))
- (if (buffer-modified-p)
+ (if (or (buffer-modified-p)
+ ;; handle the case when no modification has been made but
+ ;; the file disappeared since visited
+ (and buffer-file-name
+ (not (file-exists-p buffer-file-name))))
(let ((recent-save (recent-auto-save-p))
setmodes)
;; If buffer has no file name, ask user for one.