This file is indexed.

/usr/lib/swi-prolog/doc/Manual/hooks.html is in swi-prolog-nox 5.10.4-3ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<HTML>
<HEAD>
<TITLE>SWI-Prolog 5.11.18 Reference Manual: Section 2.12</TITLE><LINK REL=home HREF="index.html">
<LINK REL=contents HREF="Contents.html">
<LINK REL=index HREF="DocIndex.html">
<LINK REL=summary HREF="summary.html">
<LINK REL=previous HREF="flags.html">
<LINK REL=next HREF="autoload.html">
<STYLE type="text/css">
/* Style sheet for SWI-Prolog latex2html
*/

dd.defbody
{ margin-bottom: 1em;
}

dt.pubdef
{ background-color: #c5e1ff;
}

dt.multidef
{ background-color: #c8ffc7;
}

.bib dd
{ margin-bottom: 1em;
}

.bib dt
{ float: left;
margin-right: 1.3ex;
}

pre.code
{ margin-left: 1.5em;
margin-right: 1.5em;
border: 1px dotted;
padding-top: 5px;
padding-left: 5px;
padding-bottom: 5px;
background-color: #f8f8f8;
}

div.navigate
{ text-align: center;
background-color: #f0f0f0;
border: 1px dotted;
padding: 5px;
}

div.title
{ text-align: center;
padding-bottom: 1em;
font-size: 200%;
font-weight: bold;
}

div.author
{ text-align: center;
font-style: italic;
}

div.abstract
{ margin-top: 2em;
background-color: #f0f0f0;
border: 1px dotted;
padding: 5px;
margin-left: 10%; margin-right:10%;
}

div.abstract-title
{ text-align: center;
padding: 5px;
font-size: 120%;
font-weight: bold;
}

div.toc-h1
{ font-size: 200%;
font-weight: bold;
}

div.toc-h2
{ font-size: 120%;
font-weight: bold;
margin-left: 2em;
}

div.toc-h3
{ font-size: 100%;
font-weight: bold;
margin-left: 4em;
}

div.toc-h4
{ font-size: 100%;
margin-left: 6em;
}

span.sec-nr
{
}

span.sec-title
{
}

span.pred-ext
{ font-weight: bold;
}

span.pred-tag
{ float: right;
padding-top: 0.2em;
font-size: 80%;
font-style: italic;
color: #202020;
}

/* Footnotes */

sup.fn { color: blue; text-decoration: underline; }
span.fn-text { display: none; }
sup.fn span {display: none;}
sup:hover span
{ display: block !important;
position: absolute; top: auto; left: auto; width: 80%;
color: #000; background: white;
border: 2px solid;
padding: 5px; margin: 10px; z-index: 100;
font-size: smaller;
}
</STYLE>
</HEAD>
<BODY BGCOLOR="white">
<DIV class="navigate"><A class="nav" href="index.html"><IMG SRC="home.gif" BORDER=0 ALT="Home"></A>
<A class="nav" href="Contents.html"><IMG SRC="index.gif" BORDER=0 ALT="Contents"></A>
<A class="nav" href="DocIndex.html"><IMG SRC="yellow_pages.gif" BORDER=0 ALT="Index"></A>
<A class="nav" href="summary.html"><IMG SRC="info.gif" BORDER=0 ALT="Summary"></A>
<A class="nav" href="flags.html"><IMG SRC="prev.gif" BORDER=0 ALT="Previous"></A>
<A class="nav" href="autoload.html"><IMG SRC="next.gif" BORDER=0 ALT="Next"></A>
</DIV>

<H2><A NAME="sec:2.12"><SPAN class="sec-nr">2.12</SPAN> <SPAN class="sec-title">An 
overview of hook predicates</SPAN></A></H2>

<A NAME="sec:hooks"></A>

<P><A NAME="idx:hooks:170"></A>SWI-Prolog provides a large number of 
hooks, mainly to control handling messages, debugging, startup, 
shut-down, macro-expansion, etc. Below is a summary of all defined hooks 
with an indication of their portability.

<P>
<UL class="latex">
<LI><I>portray/1</I><BR>
Hook into <A NAME="idx:writeterm3:171"></A><A class="pred" href="termrw.html#write_term/3">write_term/3</A> 
to alter the way terms are printed (ISO).
<LI><I>message_hook/3</I><BR>
Hook into <A NAME="idx:printmessage2:172"></A><A class="pred" href="exception.html#print_message/2">print_message/2</A> 
to alter the way system messages are printed (Quintus/SICStus).
<LI><I>library_directory/1</I><BR>
Hook into <A NAME="idx:absolutefilename3:173"></A><A class="pred" href="files.html#absolute_file_name/3">absolute_file_name/3</A> 
to define new library directories. (most Prolog system).
<LI><I>file_search_path/2</I><BR>
Hook into <A NAME="idx:absolutefilename3:174"></A><A class="pred" href="files.html#absolute_file_name/3">absolute_file_name/3</A> 
to define new search-paths (Quintus/SICStus).
<LI><I>term_expansion/2</I><BR>
Hook into <A NAME="idx:loadfiles2:175"></A><A class="pred" href="consulting.html#load_files/2">load_files/2</A> 
to modify read terms before they are compiled (macro-processing) (most 
Prolog system).
<LI><I>goal_expansion/2</I><BR>
Same as <A NAME="idx:termexpansion2:176"></A><A class="pred" href="consulting.html#term_expansion/2">term_expansion/2</A> 
for individual goals (SICStus).
<LI><I>prolog_load_file/2</I><BR>
Hook into <A NAME="idx:loadfiles2:177"></A><A class="pred" href="consulting.html#load_files/2">load_files/2</A> 
to load other data-formats for Prolog sources from `non-file' resources. 
The <A NAME="idx:loadfiles2:178"></A><A class="pred" href="consulting.html#load_files/2">load_files/2</A> 
predicate is the ancestor of <A NAME="idx:consult1:179"></A><A class="pred" href="consulting.html#consult/1">consult/1</A>, <A NAME="idx:usemodule1:180"></A><A class="pred" href="import.html#use_module/1">use_module/1</A>, 
etc.
<LI><I>prolog_edit:locate/3</I><BR>
Hook into <A NAME="idx:edit1:181"></A><A class="pred" href="listing.html#edit/1">edit/1</A> 
to locate objects (SWI).
<LI><I>prolog_edit:edit_source/1</I><BR>
Hook into <A NAME="idx:edit1:182"></A><A class="pred" href="listing.html#edit/1">edit/1</A> 
to call some internal editor (SWI).
<LI><I>prolog_edit:edit_command/2</I><BR>
Hook into <A NAME="idx:edit1:183"></A><A class="pred" href="listing.html#edit/1">edit/1</A> 
to define the external editor to use (SWI).
<LI><I>prolog_list_goal/1</I><BR>
Hook into the tracer to list the code associated to a particular goal 
(SWI).
<LI><I>prolog_trace_interception/4</I><BR>
Hook into the tracer to handle trace-events (SWI).
<LI><I>prolog:debug_control_hook/1</I><BR>
Hook in <A NAME="idx:spy1:184"></A><A class="pred" href="debugger.html#spy/1">spy/1</A>, <A NAME="idx:nospy1:185"></A><A class="pred" href="debugger.html#nospy/1">nospy/1</A>, <A NAME="idx:nospyall0:186"></A><A class="pred" href="debugger.html#nospyall/0">nospyall/0</A> 
and <A NAME="idx:debugging0:187"></A><A class="pred" href="debugger.html#debugging/0">debugging/0</A> 
to extend these control-predicates to higher-level libraries.
<LI><I>prolog:help_hook/1</I><BR>
Hook in <A NAME="idx:help0:188"></A><A class="pred" href="help.html#help/0">help/0</A>, <A NAME="idx:help1:189"></A><A class="pred" href="help.html#help/1">help/1</A> 
and <A NAME="idx:apropos1:190"></A><A class="pred" href="help.html#apropos/1">apropos/1</A> 
to extend the help-system.
<LI><I>resource/3</I><BR>
Defines a new resource (not really a hook, but similar) (SWI).
<LI><I>exception/3</I><BR>
Old attempt to a generic hook mechanism. Handles undefined predicates 
(SWI).
<LI><I>attr_unify_hook/2</I><BR>
Unification hook for attributed variables. Can be defined in any module. 
See <A class="sec" href="attvar.html">section 6.1</A> for details.
</UL>

<P></BODY></HTML>