]> git.eshelyaron.com Git - emacs.git/commitdiff
; Fix documentation of last change
authorEli Zaretskii <eliz@gnu.org>
Sun, 20 Aug 2023 08:48:03 +0000 (11:48 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sun, 20 Aug 2023 08:48:03 +0000 (11:48 +0300)
* lisp/net/eww.el (eww--open-url-in-new-buffer)
(eww-open-in-new-buffer):
* etc/NEWS:
* doc/misc/eww.texi (Basics): Improve the documentation of this
new feature.  (Bug#65346)

doc/misc/eww.texi
etc/NEWS
lisp/net/eww.el

index 2181355a57e49f3de1b06c9e1f14edafd87ea36c..abd498824c53ae1e1686eff8d7081398c8188c11 100644 (file)
@@ -132,13 +132,13 @@ visible in its rendered content.
 
 @findex eww-open-in-new-buffer
 @kindex M-RET
-  The @kbd{M-@key{RET}} command (@code{eww-open-in-new-buffer}) opens the
-URL at point in a new EWW buffer, akin to opening a link in a new
-``tab'' in other browsers.  When @code{global-tab-line-mode} is
-enabled, this buffer is displayed in the tab on the window tab line.
-When @code{tab-bar-mode} is enabled, a new tab is created on the frame
-tab bar.  If the prefix key @kbd{C-u} is avaliable, it will stay on
-current buffer.
+  The @kbd{M-@key{RET}} command (@code{eww-open-in-new-buffer}) opens
+the URL at point in a new EWW buffer, akin to opening a link in a new
+``tab'' in other browsers.  If invoked with prefix argument, the
+command will not make the new buffer the current one.  When
+@code{global-tab-line-mode} is enabled, this buffer is displayed in
+the tab on the window tab line.  When @code{tab-bar-mode} is enabled,
+a new tab is created on the frame tab bar.
 
 @findex eww-readable
 @kindex R
index b859140f174bb1373cd2253e15c4ac0b4f555796..c97df11042d2709a1c93a017de156169ebc9855d 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -461,9 +461,11 @@ use for linking to their alternative representations, such as
 translated versions or associated RSS feeds.
 
 +++
-*** 'eww-open-in-new-buffer' support prefix key "C-u" to stay current buffer.
-The command accept the prefix key "C-u" to open the url in a new
-buffer but stay in current buffer, won't jump to the new buffer.
+*** 'eww-open-in-new-buffer' supports the prefix argument.
+When invoked with the prefix argument ('C-u'),
+'eww-open-in-new-buffer' will not make the new buffer the current one.
+This is useful for continuing reading the URL in the current buffer
+when the new URL is fetched.
 
 ** go-ts-mode
 
index f2ed60f1724209e6fe31066edadbfed75b4bcc73..3cdbe9dd471ffdc93c9c87a4d84cbbb4831128cb 100644 (file)
@@ -544,8 +544,8 @@ for the search engine used."
 
 (defun eww--open-url-in-new-buffer (url)
   "Open the URL in a new EWW buffer."
-  ;; clone useful to keep history, but
-  ;; should not clone from non-eww buffer
+  ;; Clone is useful to keep history, but we
+  ;; should not clone from a non-eww buffer.
   (with-current-buffer
       (if (eq major-mode 'eww-mode) (clone-buffer)
         (generate-new-buffer "*eww*"))
@@ -554,11 +554,9 @@ for the search engine used."
       (eww (if (consp url) (car url) url)))))
 
 (defun eww-open-in-new-buffer (&optional no-select url)
-  "Fetch URL in a new EWW buffer.
+  "Fetch URL (interactively, the link at point) into a new EWW buffer.
 
-If the NO-SELECT is not `nil', the forcus will stay on current buffer.
-
-If the URL is `nil', it will try `eww-suggested-uris' under current cursor."
+NO-SELECT non-nil means do not make the new buffer the current buffer."
   (interactive "P")
   (if-let ((url (or url (eww-suggested-uris))))
       (if (or (eq eww-browse-url-new-window-is-tab t)