|
| 1 | +;; -*- coding: utf-8; lexical-binding: t; -*- |
| 2 | + |
| 3 | +(setq w3m-coding-system 'utf-8 |
| 4 | + w3m-file-coding-system 'utf-8 |
| 5 | + w3m-file-name-coding-system 'utf-8 |
| 6 | + w3m-input-coding-system 'utf-8 |
| 7 | + w3m-output-coding-system 'utf-8 |
| 8 | + ;; emacs-w3m will test the ImageMagick support for png32 |
| 9 | + ;; and create files named "png32:-" everywhere |
| 10 | + w3m-imagick-convert-program nil |
| 11 | + w3m-terminal-coding-system 'utf-8 |
| 12 | + w3m-use-cookies t |
| 13 | + w3m-cookie-accept-bad-cookies t |
| 14 | + w3m-home-page "https://www.duckduckgo.com" |
| 15 | + w3m-command-arguments '("-F" "-cookie") |
| 16 | + w3m-mailto-url-function 'compose-mail |
| 17 | + browse-url-browser-function 'w3m |
| 18 | + ;; use shr to view html mail which is dependent on libxml |
| 19 | + ;; I prefer w3m. That's emacs 24.3+ default setup. |
| 20 | + ;; If you prefer colored mail body and other advanced features, |
| 21 | + ;; you can either comment out below line and let Emacs decide the |
| 22 | + ;; best html mail rendering engine, or "(setq mm-text-html-renderer 'shr)" |
| 23 | + ;; in "~/.gnus.el" |
| 24 | + ;; mm-text-html-renderer 'w3m ; I prefer w3m |
| 25 | + w3m-use-toolbar t |
| 26 | + ;; show images in the browser |
| 27 | + ;; setq w3m-default-display-inline-images t |
| 28 | + ;; w3m-use-tab nil |
| 29 | + w3m-confirm-leaving-secure-page nil |
| 30 | + w3m-search-default-engine "g" |
| 31 | + w3m-key-binding 'info) |
| 32 | + |
| 33 | +(defun my-w3m-mode-hook-setup () |
| 34 | + "Set up w3m." |
| 35 | + (w3m-lnum-mode 1) |
| 36 | + (local-set-key (kbd "w") #'mybigword-big-words-in-current-window) |
| 37 | + (local-set-key (kbd ";") #'w3m-lnum-follow)) |
| 38 | +(add-hook 'w3m-mode-hook 'my-w3m-mode-hook-setup) |
| 39 | + |
| 40 | +(provide 'init-emacs-w3m) |
| 41 | +;;; init-emacs-w3m.el ends here |
0 commit comments