emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 8fe7351: Make eww understand #fragment URLs at poin


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 8fe7351: Make eww understand #fragment URLs at point interactively
Date: Mon, 13 May 2019 15:45:54 -0400 (EDT)

branch: master
commit 8fe73515ad08402d16de44b32dc93b98069e0498
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Make eww understand #fragment URLs at point interactively
    
    * lisp/net/eww.el (eww-suggest-uris): Use
    thing-at-point-url-at-point instead of url-get-url-at-point
    (bug#31927) because it's much better at guessing what the URL
    actually is (especially with #fragments).
---
 lisp/net/eww.el      | 8 ++++----
 lisp/url/url-util.el | 1 +
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 63afe11..206f9cf 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -29,7 +29,7 @@
 (require 'shr)
 (require 'url)
 (require 'url-queue)
-(require 'url-util)                    ; for url-get-url-at-point
+(require 'thingatpt)
 (require 'mm-url)
 (require 'puny)
 (eval-when-compile (require 'subr-x)) ;; for string-trim
@@ -64,17 +64,17 @@
 ;;;###autoload
 (defcustom eww-suggest-uris
   '(eww-links-at-point
-    url-get-url-at-point
+    thing-at-point-url-at-point
     eww-current-url)
   "List of functions called to form the list of default URIs for `eww'.
 Each of the elements is a function returning either a string or a list
 of strings.  The results will be joined into a single list with
 duplicate entries (if any) removed."
-  :version "25.1"
+  :version "27.1"
   :group 'eww
   :type 'hook
   :options '(eww-links-at-point
-             url-get-url-at-point
+             thing-at-point-url-at-point
              eww-current-url))
 
 (defcustom eww-bookmarks-directory user-emacs-directory
diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el
index 5b83506..a46e7bb 100644
--- a/lisp/url/url-util.el
+++ b/lisp/url/url-util.el
@@ -543,6 +543,7 @@ This uses `url-current-object', set locally to the buffer."
 (defun url-get-url-at-point (&optional pt)
   "Get the URL closest to point, but don't change position.
 Has a preference for looking backward when not directly on a symbol."
+  (declare (obsolete thing-at-point-url-at-point "27.1"))
   ;; Not at all perfect - point must be right in the name.
   (save-excursion
     (if pt (goto-char pt))



reply via email to

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