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: Sun, 13 Apr 2014 12:54:33 +0800 Message-ID: <87ha5xg77a.fsf@ericabrahamsen.net> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1397364731 29726 80.91.229.3 (13 Apr 2014 04:52:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Apr 2014 04:52:11 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Apr 13 06:52:05 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 1WZCOi-0004Ru-LG for geh-help-gnu-emacs@m.gmane.org; Sun, 13 Apr 2014 06:52:04 +0200 Original-Received: from localhost ([::1]:36479 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZCOi-0006LI-Bi for geh-help-gnu-emacs@m.gmane.org; Sun, 13 Apr 2014 00:52:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51523) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZCOU-0006LD-6O for help-gnu-emacs@gnu.org; Sun, 13 Apr 2014 00:51:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WZCOO-0007cx-U7 for help-gnu-emacs@gnu.org; Sun, 13 Apr 2014 00:51:50 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:36895) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZCOO-0007ct-Nx for help-gnu-emacs@gnu.org; Sun, 13 Apr 2014 00:51:44 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WZCOM-00041c-6i for help-gnu-emacs@gnu.org; Sun, 13 Apr 2014 06:51:42 +0200 Original-Received: from 50.56.99.223 ([50.56.99.223]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 13 Apr 2014 06:51:42 +0200 Original-Received: from eric by 50.56.99.223 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 13 Apr 2014 06:51:42 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 29 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 50.56.99.223 User-Agent: Gnus/5.13001 (Ma Gnus v0.10) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:ijTBNJ9WtVs8UVO9OeCYPhXqZEQ= 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:97113 Archived-At: Grant Rettke writes: > Hi, > > 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. > > In an attempt to find a may to check for what hooks exist, I read the > manual, specifically the hooks > section, and didn't see what are obvious places to look. > > Any idea where I should start? > > Regards, > > Grant Rettke | AAAS, ACM, AMA, COG, FSF, IEEE, Sigma Xi > grettke@acm.org | http://www.wisdomandwonder.com/ > “Wisdom begins in wonder.” --Socrates > ((λ (x) (x x)) (λ (x) (x x))) > “Life has become immeasurably better since I have been forced to stop > taking it seriously.” --Thompson 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. Eric