Commit 058f56d2 authored by Lars Magne Ingebrigtsen's avatar Lars Magne Ingebrigtsen
Browse files

Make the eww buffers read-only

Fixes: debbugs:16476

* net/eww.el (eww-mode): Make the buffer read-only.
(eww-form-text): Inhibit read-only-ness in text input fields
(bug#16476).
parent d1b04a9e
2014-11-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
* net/eww.el (eww-mode): Make the buffer read-only.
(eww-form-text): Inhibit read-only-ness in text input fields
(bug#16476).
2014-11-16 Stefan Monnier <monnier@iro.umontreal.ca>
* simple.el (execute-extended-command--shorter): Cut search here.
......
......@@ -584,8 +584,7 @@ the like."
(when (boundp 'tool-bar-map)
(setq-local tool-bar-map eww-tool-bar-map))
(buffer-disable-undo)
;;(setq buffer-read-only t)
)
(setq buffer-read-only t))
;;;###autoload
(defun eww-browse-url (url &optional _new-window)
......@@ -837,6 +836,7 @@ appears in a <link> or <a> tag."
(when (< (length value) width)
(insert (make-string (- width (length value)) ? )))
(put-text-property start (point) 'face 'eww-form-text)
(put-text-property start (point) 'inhibit-read-only t)
(put-text-property start (point) 'local-map eww-text-map)
(put-text-property start (point) readonly-property t)
(put-text-property start (point) 'eww-form
......@@ -920,6 +920,7 @@ See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.")
(insert (make-string pad ? ))))
(add-face-text-property (line-beginning-position)
(point) 'eww-form-textarea)
(put-text-property (line-beginning-position) (point) 'inhibit-read-only t)
(put-text-property (line-beginning-position) (point)
'local-map eww-textarea-map)
(forward-line 1))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment