diff options
| author | Lars Magne Ingebrigtsen | 2014-11-16 23:39:53 +0100 |
|---|---|---|
| committer | Lars Magne Ingebrigtsen | 2014-11-16 23:41:55 +0100 |
| commit | 058f56d24f776bdc25bcac86fe1f8969a78374e9 (patch) | |
| tree | f7bf11c4acffac02c2756c6fbbb44fe685b1b0c2 /lisp | |
| parent | d1b04a9e7ada7070dbd84bb450411c1f169b3739 (diff) | |
| download | emacs-058f56d24f776bdc25bcac86fe1f8969a78374e9.tar.gz emacs-058f56d24f776bdc25bcac86fe1f8969a78374e9.zip | |
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).
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/net/eww.el | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0a73c570e61..7659d3c2235 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2014-11-16 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * net/eww.el (eww-mode): Make the buffer read-only. | ||
| 4 | (eww-form-text): Inhibit read-only-ness in text input fields | ||
| 5 | (bug#16476). | ||
| 6 | |||
| 1 | 2014-11-16 Stefan Monnier <monnier@iro.umontreal.ca> | 7 | 2014-11-16 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 8 | ||
| 3 | * simple.el (execute-extended-command--shorter): Cut search here. | 9 | * simple.el (execute-extended-command--shorter): Cut search here. |
diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 3373aac49e9..fbac428b76f 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el | |||
| @@ -584,8 +584,7 @@ the like." | |||
| 584 | (when (boundp 'tool-bar-map) | 584 | (when (boundp 'tool-bar-map) |
| 585 | (setq-local tool-bar-map eww-tool-bar-map)) | 585 | (setq-local tool-bar-map eww-tool-bar-map)) |
| 586 | (buffer-disable-undo) | 586 | (buffer-disable-undo) |
| 587 | ;;(setq buffer-read-only t) | 587 | (setq buffer-read-only t)) |
| 588 | ) | ||
| 589 | 588 | ||
| 590 | ;;;###autoload | 589 | ;;;###autoload |
| 591 | (defun eww-browse-url (url &optional _new-window) | 590 | (defun eww-browse-url (url &optional _new-window) |
| @@ -837,6 +836,7 @@ appears in a <link> or <a> tag." | |||
| 837 | (when (< (length value) width) | 836 | (when (< (length value) width) |
| 838 | (insert (make-string (- width (length value)) ? ))) | 837 | (insert (make-string (- width (length value)) ? ))) |
| 839 | (put-text-property start (point) 'face 'eww-form-text) | 838 | (put-text-property start (point) 'face 'eww-form-text) |
| 839 | (put-text-property start (point) 'inhibit-read-only t) | ||
| 840 | (put-text-property start (point) 'local-map eww-text-map) | 840 | (put-text-property start (point) 'local-map eww-text-map) |
| 841 | (put-text-property start (point) readonly-property t) | 841 | (put-text-property start (point) readonly-property t) |
| 842 | (put-text-property start (point) 'eww-form | 842 | (put-text-property start (point) 'eww-form |
| @@ -920,6 +920,7 @@ See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.") | |||
| 920 | (insert (make-string pad ? )))) | 920 | (insert (make-string pad ? )))) |
| 921 | (add-face-text-property (line-beginning-position) | 921 | (add-face-text-property (line-beginning-position) |
| 922 | (point) 'eww-form-textarea) | 922 | (point) 'eww-form-textarea) |
| 923 | (put-text-property (line-beginning-position) (point) 'inhibit-read-only t) | ||
| 923 | (put-text-property (line-beginning-position) (point) | 924 | (put-text-property (line-beginning-position) (point) |
| 924 | 'local-map eww-textarea-map) | 925 | 'local-map eww-textarea-map) |
| 925 | (forward-line 1)) | 926 | (forward-line 1)) |