[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: backup dired marks
From: |
Juanma Barranquero |
Subject: |
Re: backup dired marks |
Date: |
Thu, 21 Feb 2002 18:49:49 +0100 |
> In the effort to protect the user from losing any of his work, some
> optional warning upon quitting emacs, or even keeping a #backup# might
> be offered, for someone who has made a lot of intricate marks in a
> dired buffer.
Other than having in your .emacs something like that?
(defun protect-dired-buffer ()
"Ask before exiting Emacs to protect dired buffers."
(interactive)
(prog1
(or (not (buffer-modified-p))
(y-or-n-p (format "Dired buffer %s modified, do you want to exit "
(buffer-name))))
(message nil)))
(add-hook 'dired-mode-hook
#'(lambda ()
(add-hook 'kill-emacs-query-functions
'protect-dired-buffer
nil
t)))
/L/e/k/t/u
- backup dired marks, Dan Jacobson, 2002/02/21
- Re: backup dired marks,
Juanma Barranquero <=