[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 321f6bd5722 2/2: ; Fix documentation of last change
From: |
Eli Zaretskii |
Subject: |
master 321f6bd5722 2/2: ; Fix documentation of last change |
Date: |
Sun, 20 Aug 2023 04:48:22 -0400 (EDT) |
branch: master
commit 321f6bd5722921175ac3dc8859daca74dbe3de6a
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
; Fix documentation of last change
* 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 | 14 +++++++-------
etc/NEWS | 8 +++++---
lisp/net/eww.el | 10 ++++------
3 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/doc/misc/eww.texi b/doc/misc/eww.texi
index 2181355a57e..abd498824c5 100644
--- a/doc/misc/eww.texi
+++ b/doc/misc/eww.texi
@@ -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
diff --git a/etc/NEWS b/etc/NEWS
index b859140f174..c97df11042d 100644
--- 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
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index f2ed60f1724..3cdbe9dd471 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -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)