emacselisphighlightminibuffer

Highlighted text in Emacs minibuffer


I'm trying to display some highlighted text in the Emacs minibuffer. I know it's possible because SLIME does it when displaying argument hints. However, I can't see how it's being accomplished by looking at slime.el. Based on what I'm reading there, the displayed text shouldn't be highlighted (relevant section starts at line 3615).

I've tried

That last one seems closest to what I want, but the displayed text appears and disappears sporadically as I move point, and it has to be manually removed later. I've also tested the solution given here, and it doesn't seem to work for me either. The non-working solutions all do the same thing; display the text

  #("test" 0 4 (face highlight))

in the minibuffer.

In case it matters, I'm running Emacs 23.4.1 on Debian Wheezy.


Solution

  • You're victim of testing with M-: which additionally to running the code, displays the returned value in the minibuffer, thus immediately overwriting whatever your code has done.