# PceEmacs says predicate is unreferenced

**URL:** https://swi-prolog.discourse.group/t/pceemacs-says-predicate-is-unreferenced/6722
**Category:** PlDoc
**Tags:** how-to, emacs
**Created:** [July 20, 2023, 2:39pm UTC](https://swi-prolog.discourse.group/t/pceemacs-says-predicate-is-unreferenced/6722 "2023-07-20T14:39:16Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![z5h](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/z5h/32/5445_2.png) [@z5h](https://swi-prolog.discourse.group/u/z5h)
#### Post date: [July 20, 2023, 2:39pm UTC](https://swi-prolog.discourse.group/t/pceemacs-says-predicate-is-unreferenced/6722/1 "2023-07-20T14:39:16Z")

</div>

**In short:**  
Is there a way of convincing PceEmacs that a predicate is used, when PceEmacs has decided otherwise?

**More detail:**  
PceEmacs flags unused predicates, and is pretty good at detecting partial application of predicates and flagging accordingly.  
Of course this system isn’t perfect.  
We might have smoething like:

```prolog
is_thing(thing).

test(L) :- 
    atom_concat(is_, thing, F),
    maplist(F, L).

```

In this case `is_thing` is flagged as unreferenced, although it is referenced dynamically.  
I tried to satisfy the error checking with a little hack along the lines of:

```prolog
reference(_).

:- reference(is_thing).
is_thing(thing).

```

But that doesn’t seem to work.

---

<div class="post-metadata">

### Author: ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)
#### Post date: [July 20, 2023, 3:43pm UTC](https://swi-prolog.discourse.group/t/pceemacs-says-predicate-is-unreferenced/6722/2 "2023-07-20T15:43:09Z")

</div>

You can use this to tell the cross referencer something will be calling this.

```
:- public is_thing/1.

```
