Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

+Added custom variable sr-confirm-kill-viewer.

  • Loading branch information...
commit f2a6e9078e0d14c9a0d50756fd5d4d3a3d4660df 1 parent 4601ce9
@escherdragon escherdragon authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 sunrise-commander.el
View
9 sunrise-commander.el
@@ -310,6 +310,12 @@ May be `horizontal', `vertical' or `top'."
:group 'sunrise
:type 'integer)
+(defcustom sr-confirm-kill-viewer t
+ "Whether to ask for confirmation before killing a buffer opened in quick-view
+mode."
+ :group 'sunrise
+ :type 'boolean)
+
(defcustom sr-fuzzy-negation-character ?!
"Character to use for negating patterns when fuzzy-narrowing a pane."
:group 'sunrise
@@ -2015,7 +2021,8 @@ buffer."
"Kill the last buffer opened using quick view (if any)."
(let ((buf other-window-scroll-buffer))
(when (and (buffer-live-p buf)
- (y-or-n-p (format "Kill buffer %s? " (buffer-name buf))))
+ (or (not sr-confirm-kill-viewer)
+ (y-or-n-p (format "Kill buffer %s? " (buffer-name buf)))))
(setq other-window-scroll-buffer nil)
(save-window-excursion (kill-buffer buf)))))
Please sign in to comment.
Something went wrong with that request. Please try again.