emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r115669: eww: support disabled and readonly text


From: Teodor Zlatanov
Subject: [Emacs-diffs] trunk r115669: eww: support disabled and readonly text
Date: Sat, 21 Dec 2013 20:41:10 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115669
revision-id: address@hidden
parent: address@hidden
author: Kenjiro NAKAYAMA <address@hidden>
committer: Ted Zlatanov <address@hidden>
branch nick: quickfixes
timestamp: Sat 2013-12-21 15:42:23 -0500
message:
  eww: support disabled and readonly text
  
  * net/eww.el (eww-form-text): Support text form with disabled and readonly 
attributes.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/net/eww.el                eww.el-20130610114603-80ap3gwnw4x4m5ix-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-12-21 20:33:44 +0000
+++ b/lisp/ChangeLog    2013-12-21 20:42:23 +0000
@@ -4,6 +4,8 @@
        (eww-history-browse, eww-history-quit, eww-history-kill)
        (eww-history-mode-map, eww-history-mode): New command and
        functions to list browser histories.
+        (eww-form-text): Support text form with disabled
+        and readonly attributes.
 
 2013-12-21  RĂ¼diger Sonderfeld  <address@hidden>
 

=== modified file 'lisp/net/eww.el'
--- a/lisp/net/eww.el   2013-12-21 20:33:44 +0000
+++ b/lisp/net/eww.el   2013-12-21 20:42:23 +0000
@@ -680,18 +680,22 @@
        (value (or (cdr (assq :value cont)) ""))
        (width (string-to-number
                (or (cdr (assq :size cont))
-                   "40"))))
+                   "40")))
+        (readonly-property (if (or (cdr (assq :disabled cont))
+                                   (cdr (assq :readonly cont)))
+                               'read-only
+                             'inhibit-read-only)))
     (insert value)
     (when (< (length value) width)
       (insert (make-string (- width (length value)) ? )))
     (put-text-property start (point) 'face 'eww-form-text)
     (put-text-property start (point) 'local-map eww-text-map)
-    (put-text-property start (point) 'inhibit-read-only t)
+    (put-text-property start (point) readonly-property t)
     (put-text-property start (point) 'eww-form
-                      (list :eww-form eww-form
-                            :value value
-                            :type type
-                            :name (cdr (assq :name cont))))
+                       (list :eww-form eww-form
+                             :value value
+                             :type type
+                             :name (cdr (assq :name cont))))
     (insert " ")))
 
 (defconst eww-text-input-types '("text" "password" "textarea"


reply via email to

[Prev in Thread] Current Thread [Next in Thread]