[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r111438: * lisp/info.el (Info-read-no
From: |
Juri Linkov |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r111438: * lisp/info.el (Info-read-node-name-1): Allow empty node name in (FILENAME) |
Date: |
Tue, 08 Jan 2013 02:11:51 +0200 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 111438
fixes bug: http://debbugs.gnu.org/13365
committer: Juri Linkov <address@hidden>
branch nick: trunk
timestamp: Tue 2013-01-08 02:11:51 +0200
message:
* lisp/info.el (Info-read-node-name-1): Allow empty node name in (FILENAME)
that defaults to the Top node.
(Info-goto-node, Info-read-node-name): Doc fix to mention that
the short format (FILENAME) goes to the Top node.
(Info-build-node-completions): Rename arg `file' to `filename'.
* doc/misc/info.texi (Go to node): Mention the abbreviated format
`(FILENAME)' equal to `(FILENAME)Top'.
modified:
doc/misc/ChangeLog
doc/misc/info.texi
lisp/ChangeLog
lisp/info.el
=== modified file 'doc/misc/ChangeLog'
--- a/doc/misc/ChangeLog 2013-01-06 20:34:54 +0000
+++ b/doc/misc/ChangeLog 2013-01-08 00:11:51 +0000
@@ -1,3 +1,8 @@
+2013-01-08 Juri Linkov <address@hidden>
+
+ * info.texi (Go to node): Mention the abbreviated format
+ `(FILENAME)' equal to `(FILENAME)Top'. (Bug#13365)
+
2013-01-06 Andreas Schwab <address@hidden>
* autotype.texi: Remove undefined command @subtitlefont.
=== modified file 'doc/misc/info.texi'
--- a/doc/misc/info.texi 2013-01-01 09:11:05 +0000
+++ b/doc/misc/info.texi 2013-01-08 00:11:51 +0000
@@ -1079,7 +1079,8 @@
node name by putting it at the front, in parentheses. Thus,
@kbd{g(dir)address@hidden would go to the Info Directory node, which is
the node @samp{Top} in the Info file @file{dir}. Likewise,
address@hidden(emacs)address@hidden goes to the top node of the Emacs manual.
address@hidden(emacs)address@hidden (or just @kbd{g(emacs)@key{RET}}) goes to
the
+top node of the Emacs manual.
The node name @samp{*} specifies the whole file. So you can look at
all of the current file by typing @address@hidden or all of any
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-01-07 22:00:55 +0000
+++ b/lisp/ChangeLog 2013-01-08 00:11:51 +0000
@@ -1,3 +1,12 @@
+2013-01-08 Juri Linkov <address@hidden>
+
+ * info.el (Info-read-node-name-1): Allow empty node name in (FILENAME)
+ that defaults to the Top node.
+ (Info-goto-node, Info-read-node-name): Doc fix to mention that
+ the short format (FILENAME) goes to the Top node.
+ (Info-build-node-completions): Rename arg `file' to `filename'.
+ (Bug#13365)
+
2013-01-07 Bastien Guerry <address@hidden>
* menu-bar.el (menu-bar-search-documentation-menu): Use
=== modified file 'lisp/info.el'
--- a/lisp/info.el 2013-01-02 16:13:04 +0000
+++ b/lisp/info.el 2013-01-08 00:11:51 +0000
@@ -1703,7 +1703,9 @@
If NODENAME is of the form (FILENAME)NODENAME, the node is in the Info file
FILENAME; otherwise, NODENAME should be in the current Info file (or one of
its sub-files).
-Completion is available, but only for node names in the current Info file.
+Completion is available for node names in the current Info file as well as
+in the Info file FILENAME after the closing parenthesis in (FILENAME).
+Empty NODENAME in (FILENAME) defaults to the Top node.
If FORK is non-nil (interactively with a prefix arg), show the node in
a new Info buffer.
If FORK is a string, it is the name to use for the new buffer."
@@ -1784,16 +1786,19 @@
((string-match "\\`(\\([^)]+\\))" string)
(let ((file0 (match-string 0 string))
(file1 (match-string 1 string))
- (node (substring string (match-end 0))))
- (completion-table-with-context
- file0
- (apply-partially
- (lambda (string pred action)
- (complete-with-action
- action
- (Info-build-node-completions (Info-find-file file1))
- string pred)))
- node predicate code)))
+ (nodename (substring string (match-end 0))))
+ (if (and (equal nodename "") (eq code 'lambda))
+ ;; Empty node name is permitted that means "Top".
+ t
+ (completion-table-with-context
+ file0
+ (apply-partially
+ (lambda (string pred action)
+ (complete-with-action
+ action
+ (Info-build-node-completions (Info-find-file file1))
+ string pred)))
+ nodename predicate code))))
;; Otherwise use Info-read-node-completion-table.
(t (complete-with-action
code Info-read-node-completion-table string predicate))))
@@ -1802,7 +1807,9 @@
(defun Info-read-node-name (prompt)
"Read an Info node name with completion, prompting with PROMPT.
A node name can have the form \"NODENAME\", referring to a node
-in the current Info file, or \"(FILENAME)NODENAME\"."
+in the current Info file, or \"(FILENAME)NODENAME\", referring to
+a node in FILENAME. \"(FILENAME)\" is a short format to go to
+the Top node in FILENAME."
(let* ((completion-ignore-case t)
(Info-read-node-completion-table (Info-build-node-completions))
(nodename (completing-read prompt 'Info-read-node-name-1 nil t)))
@@ -1810,14 +1817,14 @@
(Info-read-node-name prompt)
nodename)))
-(defun Info-build-node-completions (&optional file)
- (if file
- (or (cdr (assoc file Info-file-completions))
+(defun Info-build-node-completions (&optional filename)
+ (if filename
+ (or (cdr (assoc filename Info-file-completions))
(with-temp-buffer
(Info-mode)
- (Info-goto-node (format "(%s)Top" file))
+ (Info-goto-node (format "(%s)Top" filename))
(Info-build-node-completions-1)
- (push (cons file Info-current-file-completions)
Info-file-completions)
+ (push (cons filename Info-current-file-completions)
Info-file-completions)
Info-current-file-completions))
(or Info-current-file-completions
(Info-build-node-completions-1))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r111438: * lisp/info.el (Info-read-node-name-1): Allow empty node name in (FILENAME),
Juri Linkov <=