Skip to content

Instantly share code, notes, and snippets.

@myuhe
Created March 20, 2013 08:03
Show Gist options
  • Save myuhe/5203057 to your computer and use it in GitHub Desktop.
Save myuhe/5203057 to your computer and use it in GitHub Desktop.
diff -r 3b663537cb3a .emacs.d/vendor/hiwin.el
--- a/.emacs.d/vendor/hiwin.el 水 3月 20 16:27:33 2013 +0900
+++ b/.emacs.d/vendor/hiwin.el 水 3月 20 16:54:02 2013 +0900
@@ -82,6 +82,8 @@
(make-face 'hiwin-face)
(set-face-attribute 'hiwin-face nil :background "gray25")
+(defvar hiwin-server-flag nil)
+
(define-minor-mode hiwin-mode
"Visible active window."
:global t
@@ -177,7 +179,9 @@
)
))
;; 元のアクティブウィンドウを選択
- (select-window hiwin-active-window)
+ (if hiwin-server-flag
+ (setq hiwin-server-flag 'nil)
+ (select-window hiwin-active-window))
))
(defun hiwin-activate ()
@@ -209,5 +213,9 @@
)
)
)
+
+(add-hook 'server-visit-hook (lambda ()
+ (setq hiwin-server-flag t)))
+
(provide 'hiwin)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment