all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Info index completion in Emacs 21
@ 2006-11-24  8:49 spamfilteraccount
  2006-11-24 18:06 ` Drew Adams
       [not found] ` <mailman.1064.1164424546.2155.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: spamfilteraccount @ 2006-11-24  8:49 UTC (permalink / raw)


This bothered me for a long a time, so I came up with a quick solution.
Naturally, I only checked afterwards if someone posted a solution for
this already. Sigh.

Anyway, here it is if anyone's interested. I tested it with Elisp info
and it seemed to work correctly:



(add-hook 'Info-mode-hook (lambda ()
                            (define-key Info-mode-map "i"
'my-info-index)))


(defun my-info-index ()
  "Go to an index item in info with completion."
  (interactive)
  (Info-index "")
  (let ((pattern "\\* +\\([^:]*\\):.")
        completions)
    (goto-char (point-min))
    (while (re-search-forward pattern nil t)
      (push (list (match-string 1)) completions))
    (Info-index (completing-read "Index topic: " completions nil t))))

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-11-26 18:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-24  8:49 Info index completion in Emacs 21 spamfilteraccount
2006-11-24 18:06 ` Drew Adams
     [not found] ` <mailman.1064.1164424546.2155.help-gnu-emacs@gnu.org>
2006-11-26 10:51   ` spamfilteraccount
2006-11-26 16:47     ` Drew Adams
2006-11-26 18:47       ` Drew Adams

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.