Function: info-lookup-change-mode

info-lookup-change-mode is a byte-compiled function defined in info-look.el.gz.

Signature

(info-lookup-change-mode TOPIC)

Source Code

;; Defined in /usr/src/emacs/lisp/info-look.el.gz
(defun info-lookup-change-mode (topic)
  (let* ((completions (mapcar (lambda (arg)
                                (let ((mode-spec (car arg)))
                                  (and (consp mode-spec)
                                       (setq mode-spec (car mode-spec)))
				  (cons (symbol-name mode-spec) mode-spec)))
			      (info-lookup->topic-value topic)))
	 (mode (completing-read
		(format "Major mode whose manuals to search for this %s: "
                        topic)
		completions nil t nil 'info-lookup-history)))
    (or (setq mode (cdr (assoc mode completions)))
	(error "No manuals available for %s" topic))
    (or (info-lookup->mode-value topic mode)
	(error "The manuals of `%s' have no %s help" mode topic))
    (setq info-lookup-mode mode)))