From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: respect active region in browse-url.el Date: Sun, 23 May 2004 14:28:32 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <87isep9cj3.wl%yoichi@geiin.org> Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1085338728 20695 80.91.224.253 (23 May 2004 18:58:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 23 May 2004 18:58:48 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sun May 23 20:58:43 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BRyBH-000426-00 for ; Sun, 23 May 2004 20:58:43 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BRyBG-0007l9-00 for ; Sun, 23 May 2004 20:58:43 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BRy40-0007BG-I7 for emacs-devel@quimby.gnus.org; Sun, 23 May 2004 14:51:12 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BRy1U-0006fo-Ow for emacs-devel@gnu.org; Sun, 23 May 2004 14:48:36 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BRy0b-0006VY-Mm for emacs-devel@gnu.org; Sun, 23 May 2004 14:48:12 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BRxi5-0002bB-UE for emacs-devel@gnu.org; Sun, 23 May 2004 14:28:34 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1BRxi4-0004Qn-Pe; Sun, 23 May 2004 14:28:32 -0400 Original-To: Yoichi NAKAYAMA In-reply-to: <87isep9cj3.wl%yoichi@geiin.org> (message from Yoichi NAKAYAMA on Sat, 22 May 2004 15:55:12 +0900) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:23858 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23858 Your change looks good. Would someone please install it? Index: browse-url.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/net/browse-url.el,v retrieving revision 1.36 diff -u -r1.36 browse-url.el --- browse-url.el 27 Apr 2004 14:03:10 -0000 1.36 +++ browse-url.el 22 May 2004 06:33:58 -0000 @@ -583,7 +583,13 @@ negation if a prefix argument was given." (let ((event (elt (this-command-keys) 0))) (and (listp event) (mouse-set-point event))) - (list (read-string prompt (browse-url-url-at-point)) + (list (read-string prompt (or (and transient-mark-mode mark-active + ;; rfc2396 Appendix E. + (replace-regexp-in-string + "[\t\r\f\n ]+" "" + (buffer-substring-no-properties + (region-beginning) (region-end)))) + (browse-url-url-at-point))) (not (eq (null browse-url-new-window-flag) (null current-prefix-arg)))))