Created
June 3, 2010 15:19
-
-
Save kiwanami/424000 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; for widen-window.el | |
(defun ewm:fix-widen-window-pre-start () | |
;; widen-window でエラーを起きないようする | |
(defadvice wlf:layout-internal (around disable-ww-mode activate) | |
(ad-deactivate-regexp "widen-window") | |
(unwind-protect | |
ad-do-it | |
(ad-activate-regexp "widen-window"))) | |
;; widen-window を ewm では全く使わない場合 | |
(defadvice widen-current-window (around ewm:disable-ww-mode activate) | |
(unless (ewm:managed-p) | |
ad-do-it | |
))) | |
(defun ewm:fix-widen-window-post-stop () | |
;; ewm が終わったら widen-window を戻す | |
(ad-deactivate-regexp "ewm:disable-ww-mode")) | |
(defun ewm:fix-widen-window () | |
(interactive) | |
(when (featurep 'widen-window) | |
(add-hook 'ewm:pre-start-hook 'ewm:fix-widen-window-pre-start) | |
(add-hook 'ewm:post-stop-hook 'ewm:fix-widen-window-post-stop)) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment