emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r115698: eww: jump to next select field easier and b


From: Teodor Zlatanov
Subject: [Emacs-diffs] trunk r115698: eww: jump to next select field easier and better ftp error
Date: Sun, 22 Dec 2013 22:39:26 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115698
revision-id: address@hidden
parent: address@hidden
author: Kenjiro NAKAYAMA <address@hidden>
committer: Ted Zlatanov <address@hidden>
branch nick: quickfixes
timestamp: Sun 2013-12-22 17:40:35 -0500
message:
  eww: jump to next select field easier and better ftp error
  
  * net/eww.el (eww-tag-select): Add text-property to jump to next
  select field.
  (eww) : Add non-supported ftp error.
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-22 20:38:26 +0000
+++ b/lisp/ChangeLog    2013-12-22 22:40:35 +0000
@@ -1,3 +1,9 @@
+2013-12-22  Kenjiro NAKAYAMA <address@hidden>
+
+       * net/eww.el (eww-tag-select): Add text-property to jump to next
+       select field.
+        (eww) : Add non-supported ftp error.
+
 2013-12-22  Dmitry Gutov  <address@hidden>
 
        * progmodes/ruby-mode.el (ruby--electric-indent-p): Improve the

=== modified file 'lisp/net/eww.el'
--- a/lisp/net/eww.el   2013-12-21 20:50:02 +0000
+++ b/lisp/net/eww.el   2013-12-22 22:40:35 +0000
@@ -144,19 +144,21 @@
 If the input doesn't look like an URL or a domain name, the
 word(s) will be searched for via `eww-search-prefix'."
   (interactive "sEnter URL or keywords: ")
-  (cond ((string-match-p "\\`file:" url))
-       (t
-        (if (and (= (length (split-string url)) 1)
-                 (or (> (length (split-string url "\\.")) 1)
-                     (string-match eww-local-regex url)))
-            (progn
-              (unless (string-match-p "\\`[a-zA-Z][-a-zA-Z0-9+.]*://" url)
-                (setq url (concat "http://"; url)))
-              ;; some site don't redirect final /
-              (when (string= (url-filename (url-generic-parse-url url)) "")
-                (setq url (concat url "/"))))
-          (setq url (concat eww-search-prefix
-                            (replace-regexp-in-string " " "+" url))))))
+  (cond ((string-match-p "\\`file://" url))
+        ((string-match-p "\\`ftp://"; url)
+         (user-error "FTP is not supported."))
+        (t
+         (if (and (= (length (split-string url)) 1)
+                  (or (> (length (split-string url "\\.")) 1)
+                      (string-match eww-local-regex url)))
+             (progn
+               (unless (string-match-p "\\`[a-zA-Z][-a-zA-Z0-9+.]*://" url)
+                 (setq url (concat "http://"; url)))
+               ;; some site don't redirect final /
+               (when (string= (url-filename (url-generic-parse-url url)) "")
+                 (setq url (concat url "/"))))
+           (setq url (concat eww-search-prefix
+                             (replace-regexp-in-string " " "+" url))))))
   (url-retrieve url 'eww-render (list url)))
 
 ;;;###autoload (defalias 'browse-web 'eww)
@@ -847,6 +849,8 @@
       (put-text-property start (point) 'eww-form menu)
       (add-face-text-property start (point) 'eww-form-select)
       (put-text-property start (point) 'keymap eww-select-map)
+      (unless (= start (point))
+       (put-text-property start (1+ start) 'help-echo "select field"))
       (shr-ensure-paragraph))))
 
 (defun eww-select-display (select)


reply via email to

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