[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r112965: lisp/gnus/shr.el (shr-expand-url): Expansio
From: |
Katsumi Yamaoka |
Subject: |
[Emacs-diffs] trunk r112965: lisp/gnus/shr.el (shr-expand-url): Expansion should chop off the bits after the last slash |
Date: |
Thu, 13 Jun 2013 14:32:03 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 112965
revision-id: address@hidden
parent: address@hidden
author: Lars Magne Ingebrigtsen <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Thu 2013-06-13 14:31:52 +0000
message:
lisp/gnus/shr.el (shr-expand-url): Expansion should chop off the bits after
the last slash
lisp/gnus/eww.el (eww-tag-select): Use the first value as the default value
modified:
lisp/gnus/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1433
lisp/gnus/eww.el eww.el-20130610114603-80ap3gwnw4x4m5ix-1
lisp/gnus/shr.el shr.el-20101002102929-yfzewk55rsg0mn93-1
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog 2013-06-13 06:07:43 +0000
+++ b/lisp/gnus/ChangeLog 2013-06-13 14:31:52 +0000
@@ -1,3 +1,10 @@
+2013-06-13 Lars Magne Ingebrigtsen <address@hidden>
+
+ * shr.el (shr-expand-url): Expansion should chop off the bits after the
+ last slash.
+
+ * eww.el (eww-tag-select): Use the first value as the default value.
+
2013-06-13 RĂ¼diger Sonderfeld <address@hidden>
* eww.el (eww): Prepend urls with http:// if scheme is missing.
=== modified file 'lisp/gnus/eww.el'
--- a/lisp/gnus/eww.el 2013-06-13 06:07:43 +0000
+++ b/lisp/gnus/eww.el 2013-06-13 14:31:52 +0000
@@ -154,9 +154,12 @@
(set (make-local-variable 'browse-url-browser-function) 'eww-browse-url))
(defun eww-browse-url (url &optional new-window)
- (push (list eww-current-url (point))
- eww-history)
- (eww url))
+ (let ((url-request-extra-headers
+ (append '(("User-Agent" . "eww/1.0"))
+ url-request-extra-headers)))
+ (push (list eww-current-url (point))
+ eww-history)
+ (eww url)))
(defun eww-quit ()
"Exit the Emacs Web Wowser."
@@ -254,6 +257,9 @@
:value (cdr (assq :value (cdr elem)))
:tag (cdr (assq 'text (cdr elem))))
options)))
+ ;; If we have no selected values, default to the first value.
+ (unless (plist-get (cdr menu) :value)
+ (nconc menu (list :value (nth 2 (car options)))))
(nconc menu options)
(apply 'widget-create menu)
(put-text-property start (point) 'eww-widget menu)
=== modified file 'lisp/gnus/shr.el'
--- a/lisp/gnus/shr.el 2013-06-12 22:32:33 +0000
+++ b/lisp/gnus/shr.el 2013-06-13 14:31:52 +0000
@@ -492,7 +492,10 @@
url
(let ((base shr-base))
;; Chop off query string.
- (when (string-match "^\\([^?]+\\)[?]" base)
+ (when (string-match "\\`\\([^?]+\\)[?]" base)
+ (setq base (match-string 1 base)))
+ ;; Chop off the bit after the last slash.
+ (when (string-match "\\`\\(.*\\)[/][^/]+" base)
(setq base (match-string 1 base)))
(cond
((and (string-match "\\`//" url)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r112965: lisp/gnus/shr.el (shr-expand-url): Expansion should chop off the bits after the last slash,
Katsumi Yamaoka <=