Commit 04b14f2b authored by Chong Yidong's avatar Chong Yidong
Browse files

Improve completion behavior of info-display-manual.

* lisp/info.el (info-display-manual): Add existing Info buffers, whose
files may not be in Info-directory-list, to the completion.
(info--manual-names): New helper function.
parent 066f0e09
2012-12-05 Chong Yidong <cyd@gnu.org>
* info.el (info-display-manual): Add existing Info buffers, whose
files may not be in Info-directory-list, to the completion.
(info--manual-names): New helper function.
2012-12-05 Glenn Morris <rgm@gnu.org>
 
* vc/vc-hg.el (vc-hg-resolve-when-done, vc-hg-find-file-hook):
......
......@@ -5105,9 +5105,7 @@ Otherwise, visit the manual in a new Info buffer."
(progn
(info-initialize)
(completing-read "Manual name: "
(apply-partially 'Info-read-node-name-2
Info-directory-list
(mapcar 'car Info-suffix-list))
(info--manual-names)
nil t))))
(let ((blist (buffer-list))
(manual-re (concat "\\(/\\|\\`\\)" manual "\\(\\.\\|\\'\\)"))
......@@ -5126,6 +5124,20 @@ Otherwise, visit the manual in a new Info buffer."
(info (Info-find-file manual)
(generate-new-buffer-name "*info*")))))
(defun info--manual-names ()
(let (names)
(dolist (buffer (buffer-list))
(with-current-buffer buffer
(and (eq major-mode 'Info-mode)
(stringp Info-current-file)
(push (file-name-sans-extension
(file-name-nondirectory Info-current-file))
names))))
(delete-dups (append (nreverse names)
(apply-partially 'Info-read-node-name-2
Info-directory-list
(mapcar 'car Info-suffix-list))))))
(provide 'info)
;;; info.el ends here
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment