emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r111704: * dired-x.el (dired-do-run-m


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111704: * dired-x.el (dired-do-run-mail): Prompt for confirmation.
Date: Sat, 09 Feb 2013 13:09:02 +0800
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111704
fixes bug: http://debbugs.gnu.org/13561
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sat 2013-02-09 13:09:02 +0800
message:
  * dired-x.el (dired-do-run-mail): Prompt for confirmation.
modified:
  lisp/ChangeLog
  lisp/dired-x.el
  lisp/dired.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-02-08 16:17:18 +0000
+++ b/lisp/ChangeLog    2013-02-09 05:09:02 +0000
@@ -1,3 +1,8 @@
+2013-02-09  Chong Yidong  <address@hidden>
+
+       * dired-x.el (dired-do-run-mail): Prompt for confirmation
+       (Bug#13561).
+
 2013-02-08  Stefan Monnier  <address@hidden>
 
        * emacs-lisp/byte-run.el (eval-when-compile, eval-and-compile):

=== modified file 'lisp/dired-x.el'
--- a/lisp/dired-x.el   2013-01-02 16:13:04 +0000
+++ b/lisp/dired-x.el   2013-02-09 05:09:02 +0000
@@ -1344,13 +1344,20 @@
   (rmail (dired-get-filename)))
 
 (defun dired-do-run-mail ()
-  "If `dired-bind-vm' is non-nil, call `dired-vm', else call `dired-rmail'."
+  "Visit the current file as a mailbox, using VM or RMAIL.
+Prompt for confirmation first; if the user says yes, call
+`dired-vm' if `dired-bind-vm' is non-nil, `dired-rmail'
+otherwise."
   (interactive)
-  (if dired-bind-vm
-      ;; Read mail folder using vm.
-      (dired-vm)
-    ;; Read mail folder using rmail.
-    (dired-rmail)))
+  (let ((file (dired-get-filename t)))
+    (if dired-bind-vm
+       (if (y-or-n-p (concat "Visit `" file
+                             "' as a mail folder with VM?"))
+           (dired-vm))
+      ;; Read mail folder using rmail.
+      (if (y-or-n-p (concat "Visit `" file
+                           "' as a mailbox with RMAIL?"))
+         (dired-rmail)))))
 
 
 ;;; MISCELLANEOUS INTERNAL FUNCTIONS.

=== modified file 'lisp/dired.el'
--- a/lisp/dired.el     2013-01-19 20:38:13 +0000
+++ b/lisp/dired.el     2013-02-09 05:09:02 +0000
@@ -4297,7 +4297,7 @@
 ;;;***
 
 ;;;### (autoloads (dired-do-relsymlink dired-jump-other-window dired-jump)
-;;;;;;  "dired-x" "dired-x.el" "cdaacce7c861256289ba48493dd6d0ec")
+;;;;;;  "dired-x" "dired-x.el" "90ba5245f6f5df3bdbda6303c725ef45")
 ;;; Generated autoloads from dired-x.el
 
 (autoload 'dired-jump "dired-x" "\


reply via email to

[Prev in Thread] Current Thread [Next in Thread]