d95-bli@nada.kth.se (Björn Lindberg) writes:
I would much prefer if the behaviour was closer to the one for C-c C-d C-d, where the description pops up in another window, and an effort is made upon exit to restore the windows to what they were before.
I've had the following fragment in my ~/.emacs for a while with no obvious side-effects or respiratory trouble:
(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))))) ad-do-it))
Of course, your mileage may vary :o)
Cheers,
Mark