From 36cd5c10a2bb53a0300eb9f1deae427e71f63f0c Mon Sep 17 00:00:00 2001 Message-Id: <36cd5c10a2bb53a0300eb9f1deae427e71f63f0c.1747429280.git.mdw@distorted.org.uk> From: Mark Wooding Date: Sat, 3 Aug 2019 03:05:54 +0100 Subject: [PATCH] el/dot-emacs.el: Force Hyperspec lookups to use w3m, if available. Organization: Straylight/Edgeware From: Mark Wooding It's much more convenient to have the documentation in Emacs. --- el/dot-emacs.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/el/dot-emacs.el b/el/dot-emacs.el index c0d2fe2..f1b75a7 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -3905,6 +3905,16 @@ (setq lisp-simple-loop-indentation 2 lisp-loop-keyword-indentation 6 lisp-loop-forms-indentation 6) +(defmacro mdw-advise-hyperspec-lookup (func args) + `(defadvice ,func (around mdw-browse-w3m ,args activate compile) + (if (fboundp 'w3m) + (let ((browse-url-browser-function #'mdw-w3m-browse-url)) + ad-do-it) + ad-do-it))) +(mdw-advise-hyperspec-lookup hyperspec-lookup (symbol)) +(mdw-advise-hyperspec-lookup hyperspec-lookup-format (char)) +(mdw-advise-hyperspec-lookup hyperspec-lookup-reader-macro (char)) + (defun mdw-fontify-lispy () ;; Set fill prefix. -- [mdw]