[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Querying available mode hooks in a given mode
From: |
Eric Abrahamsen |
Subject: |
Re: Querying available mode hooks in a given mode |
Date: |
Mon, 14 Apr 2014 16:44:50 +0800 |
User-agent: |
Gnus/5.13001 (Ma Gnus v0.10) Emacs/24.3 (gnu/linux) |
Stefan Monnier <monnier@iro.umontreal.ca> 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".