Created
September 4, 2017 16:50
-
-
Save aarvid/46644bf304f01f130c990b035c8b513a to your computer and use it in GitHub Desktop.
hyperspec other window, q to close.
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
(defadvice common-lisp-hyperspec | |
(around hyperspec-lookup-w3m () activate) | |
(let* ((window-configuration (current-window-configuration)) | |
(browse-url-browser-function | |
`(lambda (url new-window) | |
(w3m-browse-url url nil) | |
(let ((hs-map (copy-keymap w3m-mode-map))) | |
(define-key hs-map (kbd "q") | |
(lambda () | |
(interactive) | |
(kill-buffer nil) | |
(set-window-configuration ,window-configuration))) | |
(use-local-map hs-map))))) | |
(when (one-window-p) ; <== Inserted code here | |
(split-window)) ; <== | |
(other-window 1) ; <== | |
ad-do-it)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment