[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r111103: Improve completion behavior
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r111103: Improve completion behavior of info-display-manual. |
Date: |
Wed, 05 Dec 2012 14:14:11 +0800 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 111103
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Wed 2012-12-05 14:14:11 +0800
message:
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.
modified:
lisp/ChangeLog
lisp/info.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-12-05 01:49:31 +0000
+++ b/lisp/ChangeLog 2012-12-05 06:14:11 +0000
@@ -1,3 +1,9 @@
+2012-12-05 Chong Yidong <address@hidden>
+
+ * 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 <address@hidden>
* vc/vc-hg.el (vc-hg-resolve-when-done, vc-hg-find-file-hook):
=== modified file 'lisp/info.el'
--- a/lisp/info.el 2012-12-02 06:41:22 +0000
+++ b/lisp/info.el 2012-12-05 06:14:11 +0000
@@ -5105,9 +5105,7 @@
(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 @@
(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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r111103: Improve completion behavior of info-display-manual.,
Chong Yidong <=