Variable: eww-mode-hook

eww-mode-hook is a variable defined in eww.el.gz.

Value

(org-eww-extend-eww-keymap)

Documentation

Hook run after entering eww-mode.

No problems result if this variable is not bound. add-hook automatically binds it. (This is true for all hook variables.)

Source Code

;; Defined in /usr/src/emacs/lisp/net/eww.el.gz
;; Autoload cookie needed by desktop.el.
;;;###autoload
(define-derived-mode eww-mode special-mode "eww"
  "Mode for browsing the web.

\\{eww-mode-map}"
  :interactive nil
  (setq-local eww-data (list :title ""))
  (setq-local browse-url-browser-function #'eww-browse-url)
  (add-hook 'after-change-functions #'eww-process-text-input nil t)
  (add-hook 'context-menu-functions 'eww-context-menu 5 t)
  (setq-local eww-history nil)
  (setq-local eww-history-position 0)
  (when (boundp 'tool-bar-map)
    (setq-local tool-bar-map eww-tool-bar-map))
  ;; desktop support
  (setq-local desktop-save-buffer #'eww-desktop-misc-data)
  (setq truncate-lines t)
  ;; thingatpt support
  (setq-local thing-at-point-provider-alist
              (cons '(url . eww--url-at-point)
                    thing-at-point-provider-alist))
  (setq-local forward-thing-provider-alist
              (cons '(url . eww--forward-url)
                    forward-thing-provider-alist))
  (setq-local bounds-of-thing-at-point-provider-alist
              (cons '(url . eww--bounds-of-url-at-point)
                    bounds-of-thing-at-point-provider-alist))
  (setq-local bookmark-make-record-function #'eww-bookmark-make-record)
  (buffer-disable-undo)
  (setq-local shr-url-transformer #'eww--transform-url)
  ;; Also rescale images when rescaling the text.
  (add-hook 'text-scale-mode-hook #'eww--rescale-images nil t)
  (setq-local outline-search-function 'shr-outline-search
              outline-level 'shr-outline-level)
  (add-hook 'post-command-hook #'eww-check-text-conversion nil t)
  (setq buffer-read-only t)
  ;; Insertion at the first character of a field should inherit the
  ;; field's face, form and field, not the previous character's.
  (setq text-property-default-nonsticky '((face . t) (eww-form . t)
                                          (field . t))))