diff options
| author | Richard M. Stallman | 1998-07-15 00:07:49 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-07-15 00:07:49 +0000 |
| commit | ddf89211584d7443fbde2be4b74bfe28477b84fb (patch) | |
| tree | 17e68b07cfadfa0ed17475925ac605c7678dfdb6 | |
| parent | 86f281250c79bd9bb9fb8e89a273969a767e2292 (diff) | |
| download | emacs-ddf89211584d7443fbde2be4b74bfe28477b84fb.tar.gz emacs-ddf89211584d7443fbde2be4b74bfe28477b84fb.zip | |
(Info-read-node-name-1, Info-read-node-name):
Rename completion-table to Info-read-node-completion-table.
(Info-read-node-completion-table): Add defvar.
| -rw-r--r-- | lisp/info.el | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/info.el b/lisp/info.el index ff0aa9d73d0..dc5aadbfe14 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -773,27 +773,29 @@ In standalone mode, \\<Info-mode-map>\\[Info-exit] exits Emacs itself." | |||
| 773 | (Info-find-node (if (equal filename "") nil filename) | 773 | (Info-find-node (if (equal filename "") nil filename) |
| 774 | (if (equal nodename "") "Top" nodename)))) | 774 | (if (equal nodename "") "Top" nodename)))) |
| 775 | 775 | ||
| 776 | (defvar Info-read-node-completion-table) | ||
| 777 | |||
| 776 | ;; This function is used as the "completion table" while reading a node name. | 778 | ;; This function is used as the "completion table" while reading a node name. |
| 777 | ;; It does completion using the alist in completion-table | 779 | ;; It does completion using the alist in Info-read-node-completion-table |
| 778 | ;; unless STRING starts with an open-paren. | 780 | ;; unless STRING starts with an open-paren. |
| 779 | (defun Info-read-node-name-1 (string predicate code) | 781 | (defun Info-read-node-name-1 (string predicate code) |
| 780 | (let ((no-completion (and (> (length string) 0) (eq (aref string 0) ?\()))) | 782 | (let ((no-completion (and (> (length string) 0) (eq (aref string 0) ?\()))) |
| 781 | (cond ((eq code nil) | 783 | (cond ((eq code nil) |
| 782 | (if no-completion | 784 | (if no-completion |
| 783 | string | 785 | string |
| 784 | (try-completion string completion-table predicate))) | 786 | (try-completion string Info-read-node-completion-table predicate))) |
| 785 | ((eq code t) | 787 | ((eq code t) |
| 786 | (if no-completion | 788 | (if no-completion |
| 787 | nil | 789 | nil |
| 788 | (all-completions string completion-table predicate))) | 790 | (all-completions string Info-read-node-completion-table predicate))) |
| 789 | ((eq code 'lambda) | 791 | ((eq code 'lambda) |
| 790 | (if no-completion | 792 | (if no-completion |
| 791 | t | 793 | t |
| 792 | (assoc string completion-table)))))) | 794 | (assoc string Info-read-node-completion-table)))))) |
| 793 | 795 | ||
| 794 | (defun Info-read-node-name (prompt &optional default) | 796 | (defun Info-read-node-name (prompt &optional default) |
| 795 | (let* ((completion-ignore-case t) | 797 | (let* ((completion-ignore-case t) |
| 796 | (completion-table (Info-build-node-completions)) | 798 | (Info-read-node-completion-table (Info-build-node-completions)) |
| 797 | (nodename (completing-read prompt 'Info-read-node-name-1 nil t))) | 799 | (nodename (completing-read prompt 'Info-read-node-name-1 nil t))) |
| 798 | (if (equal nodename "") | 800 | (if (equal nodename "") |
| 799 | (or default | 801 | (or default |