1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-30 08:09:04 +00:00

Make `info' treat "\n" in node names as "\s"

* lisp/info.el (info): Treat "\n" in node name as "\s".  (Bug#57936)
This commit is contained in:
Stefan Kangas 2022-10-13 15:46:56 +02:00
parent e6c701c8c3
commit 6efc643952

View File

@ -763,6 +763,11 @@ See a list of available Info commands in `Info-mode'."
(read-file-name "Info file name: " nil nil t)) (read-file-name "Info file name: " nil nil t))
(if (numberp current-prefix-arg) (if (numberp current-prefix-arg)
(format "*info*<%s>" current-prefix-arg)))) (format "*info*<%s>" current-prefix-arg))))
(when file-or-node
;; Info node names don't contain newlines, so allow for easier use
;; of names that might have been wrapped (in emails, etc.).
(setq file-or-node
(string-replace "\n" " " file-or-node)))
(info-setup file-or-node (info-setup file-or-node
(pop-to-buffer-same-window (or buffer "*info*")))) (pop-to-buffer-same-window (or buffer "*info*"))))