/[emacs]/emacs/lisp/help-fns.el
ViewVC logotype

Diff of /emacs/lisp/help-fns.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.23 by monnier, Mon Aug 19 21:23:08 2002 UTC revision 1.24 by rms, Thu Sep 5 02:38:41 2002 UTC
# Line 45  If there's no tutorial in that language, Line 45  If there's no tutorial in that language,
45  With arg, you are asked to choose which language."  With arg, you are asked to choose which language."
46    (interactive "P")    (interactive "P")
47    (let ((lang (if arg    (let ((lang (if arg
48                    (progn                    (let (completion-buffer)
49                      ;; Display a completion list right away                      ;; Display a completion list right away
50                      ;; to guide the user.                      ;; to guide the user.
51                      (with-output-to-temp-buffer "*Completions*"                      (with-output-to-temp-buffer "*Completions*"
52                        (display-completion-list                        (display-completion-list
53                         (all-completions "" language-info-alist                         (all-completions "" language-info-alist
54                                          (lambda (elm)                                          (lambda (elm)
55                                            (and (listp elm) (assq 'tutorial elm))))))                                            (and (listp elm) (assq 'tutorial elm)))))
56                      (read-language-name 'tutorial "Language: " "English"))                        (setq completion-buffer standard-output))
57                        ;; Arrange to set completion-reference-buffer
58                        ;; in *Completions* to point to the minibuffer,
59                        ;; after entering the minibuffer.
60                        (let ((minibuffer-setup-hook minibuffer-setup-hook))
61                          (add-hook 'minibuffer-setup-hook
62                                    (lambda ()
63                                      (let ((mini (current-buffer)))
64                                        (with-current-buffer completion-buffer
65                                          (make-local-variable 'completion-reference-buffer)
66                                          (setq completion-reference-buffer
67                                                mini)))))
68                          (read-language-name 'tutorial "Language: " "English")))
69                  (if (get-language-info current-language-environment 'tutorial)                  (if (get-language-info current-language-environment 'tutorial)
70                      current-language-environment                      current-language-environment
71                    "English")))                    "English")))

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26