C: Lazy-load gtk-look and w3m

master
Pierre Neidhardt 2018-12-02 12:33:17 +01:00
parent 28996e7a5f
commit dd24fdba8b
2 changed files with 10 additions and 8 deletions

View File

@ -14,6 +14,13 @@
(define-key map (kbd "C-c d") 'gtk-lookup-symbol)))
;; (define-key map (kbd "C-c o") 'ff-find-other-file)
(when (and (require 'gtk-look nil 'noerror)
(require 'w3m nil 'noerror))
;; Browse GTK documentation within Emacs.
;; TODO: Use eww instead of w3m. For some reason it hangs for almost a minute
;; with eww.
(add-to-list 'browse-url-browser-function '("file:///.*/gtk-doc/html/.*" . w3m-browse-url)))
(defvaralias 'c-basic-offset 'tab-width)
;;; C additional faces.

View File

@ -163,14 +163,9 @@
(executable-find browse-url-conkeror-program)
(executable-find browse-url-chrome-program)))
(setq shr-external-browser browse-url-browser-function)
(when (require 'w3m nil 'noerror)
;; Browse GTK documentation within Emacs.
;; TODO: Use eww instead of w3m. For some reason it hangs for almost a minute
;; with eww.
(setq browse-url-browser-function '(("file:///.*/gtk-doc/html/.*" . w3m-browse-url)
;; TODO: Display hyperspec in other window.
("http://www.lispworks.com/reference/HyperSpec/.*" . eww-browse-url)
("." . browse-url-default-browser))))
(setq browse-url-browser-function '(;; TODO: Display hyperspec in other window.
("http://www.lispworks.com/reference/HyperSpec/.*" . eww-browse-url)
("." . browse-url-default-browser)))
;; shr
(setq shr-width (string-to-number (or (getenv "MANWIDTH") "80")))