[gnus git] branch master updated: m0-7-110-gfdad453 =1= Make it possible to TAB to the form elements again
Lars Magne Ingebrigtsen <[email protected]>
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via fdad453a347206c51b7fcef198e96712d3b269ed (commit)
from a8c62470aeeb495e6ad16e5e5e7319b17611fc1c (commit)
- Log -----------------------------------------------------------------
commit fdad453a347206c51b7fcef198e96712d3b269ed
Author: Lars Magne Ingebrigtsen <[email protected]>
Date: Mon Jun 17 21:59:50 2013 +0200
Make it possible to TAB to the form elements again
* eww.el (eww-convert-widgets): Put `help-echo' on input fields so that
we can navigate to them.
(shr-tag-span): Don't respect the <title>, because that overwrites the
help-echo from links inside the spans.
(shr-next-link): Use `help-echo' for navigation, so that we can
navigate to form elements, too.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index bf68393..f3ebfe9 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,10 +1,17 @@
2013-06-17 Lars Magne Ingebrigtsen <[email protected]>
+ * eww.el (eww-convert-widgets): Put `help-echo' on input fields so that
+ we can navigate to them.
+
* shr.el (shr-colorize-region): Put the colours over the entire region.
(shr-inhibit-decoration): New variable.
(shr-add-font): Use it to inhibit text property decorations while doing
preliminary table renderings. This speeds up typical Wikipedia page
renderings by 15%.
+ (shr-tag-span): Don't respect the <title>, because that overwrites the
+ help-echo from links inside the spans.
+ (shr-next-link): Use `help-echo' for navigation, so that we can
+ navigate to form elements, too.
* eww.el (eww-button): New face.
(eww-convert-widgets): Use it to make submit buttons more button-like.
diff --git a/lisp/eww.el b/lisp/eww.el
index 3383b5f..eedbde1 100644
--- a/lisp/eww.el
+++ b/lisp/eww.el
@@ -455,6 +455,10 @@
(when (and widget
(not (eq (car widget) 'hidden)))
(apply 'widget-create widget)
+ (put-text-property start (point) 'help-echo
+ (if (memq (car widget) '(text editable-field))
+ "Input field"
+ "Button"))
(when (eq (car widget) 'push-button)
(add-face-text-property start (point) 'eww-button t))))
(widget-setup)
diff --git a/lisp/shr.el b/lisp/shr.el
index f639f47..b5dddae 100644
--- a/lisp/shr.el
+++ b/lisp/shr.el
@@ -223,9 +223,9 @@ redirects somewhere else."
(defun shr-next-link ()
"Skip to the next link."
(interactive)
- (let ((skip (text-property-any (point) (point-max) 'shr-url nil)))
+ (let ((skip (text-property-any (point) (point-max) 'help-echo nil)))
(if (not (setq skip (text-property-not-all skip (point-max)
- 'shr-url nil)))
+ 'help-echo nil)))
(message "No next link")
(goto-char skip)
(message "%s" (get-text-property (point) 'help-echo)))))
@@ -237,11 +237,11 @@ redirects somewhere else."
(found nil))
;; Skip past the current link.
(while (and (not (bobp))
- (get-text-property (point) 'shr-url))
+ (get-text-property (point) 'help-echo))
(forward-char -1))
;; Find the previous link.
(while (and (not (bobp))
- (not (setq found (get-text-property (point) 'shr-url))))
+ (not (setq found (get-text-property (point) 'help-echo))))
(forward-char -1))
(if (not found)
(progn
@@ -249,7 +249,7 @@ redirects somewhere else."
(goto-char start))
;; Put point at the start of the link.
(while (and (not (bobp))
- (get-text-property (point) 'shr-url))
+ (get-text-property (point) 'help-echo))
(forward-char -1))
(forward-char 1)
(message "%s" (get-text-property (point) 'help-echo)))))
@@ -799,12 +799,13 @@ START, and END. Note that START and END should be markers."
(shr-ensure-paragraph))
(defun shr-urlify (start url &optional title)
+ (when (and title (string-match "ctx" title)) (debug))
(shr-add-font start (point) 'shr-link)
(add-text-properties
start (point)
(list 'shr-url url
- 'local-map shr-map
- 'help-echo (if title (format "%s (%s)" url title) url))))
+ 'help-echo (if title (format "%s (%s)" url title) url)
+ 'local-map shr-map)))
(defun shr-encode-url (url)
"Encode URL."
@@ -1162,11 +1163,7 @@ ones, in case fg and bg are nil."
(shr-generic cont))
(defun shr-tag-span (cont)
- (let ((title (cdr (assq :title cont))))
- (shr-generic cont)
- (when (and title
- shr-start)
- (put-text-property shr-start (point) 'help-echo title))))
+ (shr-generic cont)))
(defun shr-tag-h1 (cont)
(shr-heading cont 'bold 'underline))
-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.
Summary of changes:
lisp/ChangeLog | 7 +++++++
lisp/eww.el | 4 ++++
lisp/shr.el | 21 +++++++++------------
3 files changed, 20 insertions(+), 12 deletions(-)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".
The branch, master has been updated
hooks/post-receive
--
Gnus Project