aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/menu-bar.el17
1 files changed, 15 insertions, 2 deletions
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 389234e9751..19122125c53 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -1761,15 +1761,28 @@ key, a click, or a menu-item"))
1761 (interactive) 1761 (interactive)
1762 (info "(emacs)Glossary")) 1762 (info "(emacs)Glossary"))
1763 1763
1764(defun emacs-index--prompt ()
1765 (let* ((default (thing-at-point 'sexp))
1766 (topic
1767 (read-from-minibuffer
1768 (format "Subject to look up%s: "
1769 (if default
1770 (format " (default \"%s\")" default)
1771 ""))
1772 nil nil nil nil default)))
1773 (list (if (zerop (length topic))
1774 default
1775 topic))))
1776
1764(defun emacs-index-search (topic) 1777(defun emacs-index-search (topic)
1765 "Look up TOPIC in the indices of the Emacs User Manual." 1778 "Look up TOPIC in the indices of the Emacs User Manual."
1766 (interactive "sSubject to look up: ") 1779 (interactive (emacs-index--prompt))
1767 (info "emacs") 1780 (info "emacs")
1768 (Info-index topic)) 1781 (Info-index topic))
1769 1782
1770(defun elisp-index-search (topic) 1783(defun elisp-index-search (topic)
1771 "Look up TOPIC in the indices of the Emacs Lisp Reference Manual." 1784 "Look up TOPIC in the indices of the Emacs Lisp Reference Manual."
1772 (interactive "sSubject to look up: ") 1785 (interactive (emacs-index--prompt))
1773 (info "elisp") 1786 (info "elisp")
1774 (Info-index topic)) 1787 (Info-index topic))
1775 1788