         (let ((smart-win (smartwin-get-smart-win)))
           (with-selected-window smart-win
             ad-do-it)
-          (select-window smart-win)
-          )
+          (select-window smart-win))
       ad-do-it)))
 
 (defadvice display-buffer-pop-up-window

(defun smartwin-enlarge-window (window)
  "Try to enlarge smart WINDOW, but not too large."
  (let ((height-before (window-height window)))
    (fit-window-to-buffer window
                          smartwin-max-window-height
                          smartwin-min-window-height)
    ;; set smart window start
    (set-window-start window
                      (save-excursion
                        (goto-char (window-start))
                        (forward-line (- height-before (window-height window))))
                      t)))

(defun smartwin-show ()
  "Show smart window."

            (smartwin-show))
        ad-do-it)
    (message "Attempt to move smart window")))

(defadvice delete-other-windows (around smartwin-delete-other-windows)
  "If in smart window, just enlarge it instead of `delete-other-windows'."
