From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Stewart Newsgroups: gmane.emacs.help Subject: Re: elisp-index-search on current word Date: Wed, 08 Oct 2008 22:21:26 +0800 Organization: Bentium Ltd. (CN99) Message-ID: <87prmbdv6h.fsf@manatee.domain> References: <36eff0bb-4e77-474a-97f2-820fdc077900@t18g2000prt.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1223481145 22719 80.91.229.12 (8 Oct 2008 15:52:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Oct 2008 15:52:25 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 08 17:53:21 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KnbAX-0004Xe-Ko for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Oct 2008 17:41:45 +0200 Original-Received: from localhost ([127.0.0.1]:35102 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Knb9T-0007fb-9Q for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Oct 2008 11:40:39 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!news.cn99.com!manatee.domain!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 21 Original-NNTP-Posting-Host: 222.212.128.13 Original-X-Trace: news.cn99.com 1223478512 19990 222.212.128.13 (8 Oct 2008 15:08:32 GMT) Original-X-Complaints-To: usenet@news.cn99.com Original-NNTP-Posting-Date: Wed, 8 Oct 2008 15:08:32 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:ZakArkhlKWnTzQSzwx1jfj2YzoQ= Original-Xref: news.stanford.edu gnu.emacs.help:163201 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:58546 Archived-At: Kevin Rodgers writes: > Xah wrote: >> when i do elisp-index-search, is there a way to make the default >> choice the symbol the cursor is on? > > (defadvice elisp-index-search (before interactive-default activate) > "Provide the symbol at point as the default when reading TOPIC interactively." > (interactive (list (read-string "Topic: " nil nil (thing-at-point 'symbol))))) (defun elisp-index-search+ () "Look up TOPIC in the indices of the Emacs Lisp Reference Manual." (interactive) (let (topic) (setq topic (read-string (concat "Subject to look up: ") nil nil (symbol-name (symbol-at-point)))) (funcall 'switch-to-buffer-other-window nil) (info "elisp") (Info-index topic))) Regards. -- Andy.