.emacs.d/elisp/init-eww.el
2020-01-13 15:14:54 +01:00

59 lines
1.9 KiB
EmacsLisp

;;; init-eww.el --- -*- lexical-binding: t -*-
;;
;; Filename: init-eww.el
;; Description: Configure Eww
;; Author: Mingde (Matthew) Zeng
;; Copyright (C) 2019 Mingde (Matthew) Zeng
;; Created: Fri Mar 15 11:13:42 2019 (-0400)
;; Version: 2.0.0
;; Last-Updated: Tue Dec 24 12:18:07 2019 (-0500)
;; By: Mingde (Matthew) Zeng
;; URL: https://github.com/MatthewZMD/.emacs.d
;; Keywords: M-EMACS .emacs.d eww
;; Compatibility: emacs-version >= 26.1
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; Commentary:
;;
;; This initializes eww
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or (at
;; your option) any later version.
;;
;; This program is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; Code:
(eval-when-compile
(require 'init-const))
;; EWWPac
(use-package eww
:ensure nil
:commands (eww)
:hook (eww-mode . (lambda ()
"Rename EWW's buffer so sites open in new page."
(rename-buffer "eww" t)))
:config
;; I am using EAF-Browser instead of EWW
(unless *eaf-env*
(setq browse-url-browser-function 'eww-browse-url))) ; Hit & to browse url with system browser
;; -EWWPac
(provide 'init-eww)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; init-eww.el ends here