emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master d69e1d7: Rename the new `browse-url-external-browse


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master d69e1d7: Rename the new `browse-url-external-browser' variable
Date: Sun, 28 Jul 2019 18:07:44 -0400 (EDT)

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

    Rename the new `browse-url-external-browser' variable
    
    * lisp/net/shr.el (shr-external-browser, shr-browse-url):
    * lisp/net/eww.el (eww-browse-with-external-browser)
    (eww-follow-link):
    * lisp/net/browse-url.el
    (browse-url-secondary-browser-function)
    (browse-url-button-open):
    * lisp/gnus/gnus-sum.el (gnus-summary-browse-url): Rename from
    `browse-url-external-browser' to
    `browse-url-secondary-browser-function'.
---
 doc/misc/eww.texi      | 10 +++++-----
 doc/misc/gnus.texi     |  2 +-
 etc/NEWS               |  4 ++--
 lisp/gnus/gnus-sum.el  |  4 ++--
 lisp/net/browse-url.el | 14 +++++++-------
 lisp/net/eww.el        | 10 ++++++----
 lisp/net/shr.el        |  6 +++---
 7 files changed, 26 insertions(+), 24 deletions(-)

diff --git a/doc/misc/eww.texi b/doc/misc/eww.texi
index cd74aa3..63f676e 100644
--- a/doc/misc/eww.texi
+++ b/doc/misc/eww.texi
@@ -187,7 +187,7 @@ switch EWW buffers through a minibuffer prompt, press 
@kbd{s}
 (@code{eww-switch-to-buffer}).
 
 @findex eww-browse-with-external-browser
-@vindex browse-url-external-browser
+@vindex browse-url-secondary-browser-function
 @vindex eww-use-external-browser-for-content-type
 @kindex &
 @cindex External Browser
@@ -197,10 +197,10 @@ or are not implemented (E.g., JavaScript).  If you have 
trouble
 viewing a website with EWW then hit @kbd{&}
 (@code{eww-browse-with-external-browser}) inside the EWW buffer to
 open the website in the external browser specified by
-@code{browse-url-external-browser}.  Some content types, such as video or
-audio content, do not make sense to display in GNU Emacs at all.  You
-can tell EWW to open specific content automatically in an external
-browser by customizing
+@code{browse-url-secondary-browser-function}.  Some content types,
+such as video or audio content, do not make sense to display in GNU
+Emacs at all.  You can tell EWW to open specific content automatically
+in an external browser by customizing
 @code{eww-use-external-browser-for-content-type}.
 
 @node Advanced
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index 7a3322d..8f0023c 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -10164,7 +10164,7 @@ do so.
 @findex gnus-summary-browse-url
 Scan the article buffer for links, and offer them to the user for
 browsing with @code{browse-url}.  With a prefix argument, browse with
-@code{browse-url-external-browser} instead.
+@code{browse-url-secondary-browser-function} instead.
 
 @end table
 
diff --git a/etc/NEWS b/etc/NEWS
index 6517f19..c654b9b 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -770,7 +770,7 @@ links to most ordinary special-mode buffers that display 
text that
 have URLs embedded.  'browse-url-button-regexp' controls what's
 considered a button.
 
-*** A new variable, 'browse-url-external-browser', has been added.
+*** A new variable, 'browse-url-secondary-browser-function', has been added.
 ** Comint
 
 +++
@@ -1045,7 +1045,7 @@ This attribute is meant to tell screen readers to ignore 
a tag.
 
 +++
 *** 'shr-external-browser' has been made into an obsolete alias
-of 'browse-url-external-browser'.
+of 'browse-url-secondary-browser-function'.
 
 ---
 *** 'shr-tag-ol' now respects the ordered list 'start' attribute.
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index d3103bd..320130f 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -9478,7 +9478,7 @@ The 1st element is the widget named by 
`gnus-collect-urls-primary-text'."
   "Scan the current article body for links, and offer to browse them.
 
 Links are opened using `browse-url' unless a prefix argument is
-given: Then `browse-url-external-browser' is used instead.
+given: Then `browse-url-secondary-browser-function' is used instead.
 
 If only one link is found, browse that directly, otherwise use
 completion to select a link.  The first link marked in the
@@ -9502,7 +9502,7 @@ default."
                                    (car urls)))))
       (if target
          (if external
-             (funcall browse-url-external-browser target)
+             (funcall browse-url-secondary-browser-function target)
            (browse-url target))
        (message "No URLs found.")))))
 
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 17b6d36..37995a4 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -173,12 +173,12 @@ regexp should probably be \".\" to specify a default 
browser."
   :type browse-url--browser-defcustom-type
   :version "24.1")
 
-(defcustom browse-url-external-browser 'browse-url-default-browser
-  "Function used to launch an external browser.
-This can actually be any browser, internal or external, used as
-the secondary browser choice, and is typically used when giving a
-prefix argument to the URL-opening command (in those modes that
-support this (for instance, eww/shr)."
+(defcustom browse-url-secondary-browser-function 'browse-url-default-browser
+  "Function used to launch an alternative browser.
+This should usually be an external browser (that is, not eww or
+w3m), used as the secondary browser choice, and is typically used
+when giving a prefix argument to the URL-opening command (in
+those modes that support this (for instance, eww/shr)."
   :version "27.1"
   :type browse-url--browser-defcustom-type)
 
@@ -1687,7 +1687,7 @@ external browser instead of the default one."
     (unless url
       (error "No URL under point"))
     (if external
-        (funcall browse-url-external-browser url)
+        (funcall browse-url-secondary-browser-function url)
       (browse-url url))))
 
 (defun browse-url-button-copy ()
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index d839cc2..77e6cec 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -1501,14 +1501,16 @@ See URL 
`https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.")
 
 (defun eww-browse-with-external-browser (&optional url)
   "Browse the current URL with an external browser.
-The browser to used is specified by the `browse-url-external-browser' 
variable."
+The browser to used is specified by the
+`browse-url-secondary-browser-function' variable."
   (interactive)
-  (funcall browse-url-external-browser (or url (plist-get eww-data :url))))
+  (funcall browse-url-secondary-browser-function
+           (or url (plist-get eww-data :url))))
 
 (defun eww-follow-link (&optional external mouse-event)
   "Browse the URL under point.
 If EXTERNAL is single prefix, browse the URL using
-`browse-url-external-browser'.
+`browse-url-secondary-browser-function'.
 
 If EXTERNAL is double prefix, browse in new buffer."
   (interactive (list current-prefix-arg last-nonmenu-event))
@@ -1520,7 +1522,7 @@ If EXTERNAL is double prefix, browse in new buffer."
      ((string-match "^mailto:"; url)
       (browse-url-mail url))
      ((and (consp external) (<= (car external) 4))
-      (funcall browse-url-external-browser url)
+      (funcall browse-url-secondary-browser-function url)
       (shr--blink-link))
      ;; This is a #target url in the same page as the current one.
      ((and (url-target (url-generic-parse-url url))
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 2bc2593..7555d6c 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -112,7 +112,7 @@ Alternative suggestions are:
   :type 'string)
 
 (define-obsolete-variable-alias 'shr-external-browser
-  'browse-url-external-browser "27.1")
+  'browse-url-secondary-browser-function "27.1")
 
 (defcustom shr-image-animate t
   "Non nil means that images that can be animated will be."
@@ -954,7 +954,7 @@ size, and full-buffer size."
 (defun shr-browse-url (&optional external mouse-event)
   "Browse the URL at point using `browse-url'.
 If EXTERNAL is non-nil (interactively, the prefix argument), browse
-the URL using `browse-url-external-browser'.
+the URL using `browse-url-secondary-browser-function'.
 If this function is invoked by a mouse click, it will browse the URL
 at the position of the click.  Optional argument MOUSE-EVENT describes
 the mouse click event."
@@ -969,7 +969,7 @@ the mouse click event."
      (t
       (if external
           (progn
-           (funcall browse-url-external-browser url)
+           (funcall browse-url-secondary-browser-function url)
             (shr--blink-link))
        (browse-url url))))))
 



reply via email to

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