bongo-patches
[Top][All Lists]
Advanced

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

[bongo-patches] Make the user confirm switching from a non-Bongo, non-fu


From: Daniel Brockman
Subject: [bongo-patches] Make the user confirm switching from a non-Bongo, non-fundamental mode to a Bongo mode
Date: Thu, 24 May 2007 13:27:35 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux)

Make the user confirm switching from a non-Bongo,
non-fundamental mode to a Bongo mode.

diff -rN -u old-bongo/bongo.el new-bongo/bongo.el
--- old-bongo/bongo.el  2007-05-24 13:27:31.000000000 +0200
+++ new-bongo/bongo.el  2007-05-24 13:27:31.000000000 +0200
@@ -9994,6 +9994,13 @@
 `bongo-playlist-mode') or Bongo Library mode (see `bongo-library-mode').
 
 \\{bongo-mode-map}"
+  (or (memq major-mode (list 'fundamental-mode
+                             'bongo-mode
+                             'bongo-playlist-mode
+                             'bongo-library-mode))
+      (yes-or-no-p (format "Really switch from %s mode to Bongo mode? "
+                           mode-name))
+      (keyboard-quit))
   (kill-all-local-variables)
   (set (make-local-variable 'forward-sexp-function)
        'bongo-forward-section)
-- 
Daniel Brockman <address@hidden>

reply via email to

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