[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#19443: 25.0.50; `info-display-manual' could limit the choice to curr
From: |
Filipp Gunbin |
Subject: |
bug#19443: 25.0.50; `info-display-manual' could limit the choice to currently visited manuals if given a prefix arg for convenience |
Date: |
Sat, 27 Dec 2014 03:08:57 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (darwin) |
On 26/12/2014 23:55 +0200, Eli Zaretskii wrote:
>> From: Filipp Gunbin <fgunbin@fastmail.fm>
>> Date: Fri, 26 Dec 2014 20:06:45 +0300
>>
>> Here's the patch on the subject. I'll apply it if no one objects.
>
> Fine with me, thanks.
>
> One minor comment about the doc string: you are talking about "the
> choice", but no choice was mentioned before in the doc string. This
> might confuse the user. I think you should mention completion in
> order to make this clear.
Ok, changed to "completion alternatives". Thanks.
diff --git a/etc/NEWS b/etc/NEWS
index 14933aa..315332f 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -338,6 +338,11 @@ The remainder were:
---
** `Info-fontify-maximum-menu-size' can be t for no limit.
++++
+** `info-display-manual' can now be given a prefix argument which (any
+non-nil value) directs the command to limit the completion
+alternatives to currently visited manuals.
+
---
** ntlm.el has support for NTLM2.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a2bee14..d3d587d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-26 Filipp Gunbin <fgunbin@fastmail.fm>
+
+ * info.el (info-display-manual): Limit the completion alternatives
+ to currently visited manuals if prefix argument is non-nil.
+
2014-12-25 Helmut Eller <eller.helmut@gmail.com>
Dmitry Gutov <dgutov@yandex.ru>
diff --git a/lisp/info.el b/lisp/info.el
index 7c4d7f3..33e982d 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -5277,13 +5277,15 @@ type returned by `Info-bookmark-make-record', which
see."
(defun info-display-manual (manual)
"Display an Info buffer displaying MANUAL.
If there is an existing Info buffer for MANUAL, display it.
-Otherwise, visit the manual in a new Info buffer."
+Otherwise, visit the manual in a new Info buffer. In interactive
+use, a prefix argument directs this command to limit the
+completion alternatives to currently visited manuals."
(interactive
(list
(progn
(info-initialize)
(completing-read "Manual name: "
- (info--manual-names)
+ (info--manual-names current-prefix-arg)
nil t))))
(let ((blist (buffer-list))
(manual-re (concat "\\(/\\|\\`\\)" manual "\\(\\.\\|\\'\\)"))
@@ -5302,7 +5304,7 @@ Otherwise, visit the manual in a new Info buffer."
(info (Info-find-file manual)
(generate-new-buffer-name "*info*")))))
-(defun info--manual-names ()
+(defun info--manual-names (visited-only)
(let (names)
(dolist (buffer (buffer-list))
(with-current-buffer buffer
@@ -5313,11 +5315,12 @@ Otherwise, visit the manual in a new Info buffer."
(file-name-nondirectory Info-current-file))
names))))
(delete-dups (append (nreverse names)
- (all-completions
- ""
- (apply-partially 'Info-read-node-name-2
- Info-directory-list
- (mapcar 'car Info-suffix-list)))))))
+ (when (not visited-only)
+ (all-completions
+ ""
+ (apply-partially 'Info-read-node-name-2
+ Info-directory-list
+ (mapcar 'car
Info-suffix-list))))))))
(provide 'info)
- bug#19443: 25.0.50; `info-display-manual' could limit the choice to currently visited manuals if given a prefix arg for convenience, (continued)
- bug#19443: 25.0.50; `info-display-manual' could limit the choice to currently visited manuals if given a prefix arg for convenience, Glenn Morris, 2014/12/26
- bug#19443: 25.0.50; `info-display-manual' could limit the choice to currently visited manuals if given a prefix arg for convenience, Stefan Monnier, 2014/12/27
- bug#19443: 25.0.50; `info-display-manual' could limit the choice to currently visited manuals if given a prefix arg for convenience, Filipp Gunbin, 2014/12/30
- bug#19443: 25.0.50; `info-display-manual' could limit the choice to currently visited manuals if given a prefix arg for convenience, Eli Zaretskii, 2014/12/30
- bug#19443: 25.0.50; `info-display-manual' could limit the choice to currently visited manuals if given a prefix arg for convenience, Filipp Gunbin, 2014/12/31
bug#19443: 25.0.50; `info-display-manual' could limit the choice to currently visited manuals if given a prefix arg for convenience, Eli Zaretskii, 2014/12/26
- bug#19443: 25.0.50; `info-display-manual' could limit the choice to currently visited manuals if given a prefix arg for convenience,
Filipp Gunbin <=