Skip to content

Commit

Permalink
Fixed live-mp-new-basic-save-buffer.
Browse files Browse the repository at this point in the history
Applied fix suggested in overtone#201.
  • Loading branch information
rothmichaels committed Jul 7, 2015
1 parent b0b340d commit f933407
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packs/dev/foundation-pack/config/monkey-patch.el
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ Before and after saving the buffer, this function runs
(let ((recent-save (recent-auto-save-p))
setmodes)
;; If buffer has no file name, ask user for one.
(set-window-buffer (frame-selected-window) (current-buffer))
(let ((the-window (frame-selected-window))
(if (window-dedicated-p the-window)
(switch-to-buffer (current-window))
(set-window-buffer the-window)))
(when (or buffer-file-name
(y-or-n-p "Buffer has no associated file and not saved. Save it? "))

Expand Down

0 comments on commit f933407

Please sign in to comment.