From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.help Subject: Re: Querying available mode hooks in a given mode Date: Mon, 14 Apr 2014 16:44:50 +0800 Message-ID: <87mwfocnb1.fsf@ericabrahamsen.net> References: <87ha5xg77a.fsf@ericabrahamsen.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1397464951 5067 80.91.229.3 (14 Apr 2014 08:42:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Apr 2014 08:42:31 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Apr 14 10:42:23 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WZcT9-0005uC-Ei for geh-help-gnu-emacs@m.gmane.org; Mon, 14 Apr 2014 10:42:23 +0200 Original-Received: from localhost ([::1]:41756 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZcT8-0002CQ-RT for geh-help-gnu-emacs@m.gmane.org; Mon, 14 Apr 2014 04:42:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34456) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZcSs-00024u-PW for help-gnu-emacs@gnu.org; Mon, 14 Apr 2014 04:42:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WZcSm-00082e-TH for help-gnu-emacs@gnu.org; Mon, 14 Apr 2014 04:42:06 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:40769) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZcSm-00082V-JT for help-gnu-emacs@gnu.org; Mon, 14 Apr 2014 04:42:00 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WZcSl-0005NI-Bx for help-gnu-emacs@gnu.org; Mon, 14 Apr 2014 10:41:59 +0200 Original-Received: from 111.197.156.55 ([111.197.156.55]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 14 Apr 2014 10:41:59 +0200 Original-Received: from eric by 111.197.156.55 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 14 Apr 2014 10:41:59 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 17 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 111.197.156.55 User-Agent: Gnus/5.13001 (Ma Gnus v0.10) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:MYHWh9SdUcrZWNkQQ8fPLqJh+Kc= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:97126 Archived-At: Stefan Monnier writes: >>> My goal is to, after a mode has been entered, to check whether >>> a particular hook exists. If it does or does not exist, then I will >>> run some handler code. > > Can you give a concrete example? > >> Unless the mode author is straying pretty far from accepted practice, >> you can usually see all the hooks by doing C-h v, then typing >> modeprefix--hook, and hitting TAB. That should give you a *Completion* >> buffer with all the matching variables. > > Actually, some hooks may exist without appearing there. Hey, there were a lot of weasel words in my answer! It was definitely meant as a "reasonable place to start".