diff options
author | Stefan Kangas <stefankangas@gmail.com> | 2022-10-13 15:46:56 +0200 |
---|---|---|
committer | Stefan Kangas <stefankangas@gmail.com> | 2022-10-13 15:51:58 +0200 |
commit | 6efc64395282a960000d6fd9ac2e33ab7c764478 (patch) | |
tree | e6fc32a4454b7cd44cddd7cb45d4d0b061808eb0 /lisp/info.el | |
parent | e6c701c8c332e8564ffbb8cd9398c341377323ee (diff) | |
download | emacs-6efc64395282a960000d6fd9ac2e33ab7c764478.tar.gz emacs-6efc64395282a960000d6fd9ac2e33ab7c764478.tar.bz2 emacs-6efc64395282a960000d6fd9ac2e33ab7c764478.zip |
Make `info' treat "\n" in node names as "\s"
* lisp/info.el (info): Treat "\n" in node name as "\s". (Bug#57936)
Diffstat (limited to 'lisp/info.el')
-rw-r--r-- | lisp/info.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/info.el b/lisp/info.el index 292bf93a6f4..fabba2734a3 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -763,6 +763,11 @@ See a list of available Info commands in `Info-mode'." (read-file-name "Info file name: " nil nil t)) (if (numberp 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 (pop-to-buffer-same-window (or buffer "*info*")))) |