emacs elisp buffer not running font lock mode until opened by user

Posted by jacob on Stack Overflow See other posts from Stack Overflow or by jacob
Published on 2010-03-23T23:37:53Z Indexed on 2010/03/23 23:43 UTC
Read the original article Hit count: 528

Filed under:
|

My problem is I am opening a buffer using (set-buffer (find-tag-noselect (current-word)))

and then I try to copy some text out of that buffer. The text that I get back has only the properties (fontified nil). find-tag-noselect automatically opens the buffer found in the TAGS file but it seems it does not run the font lock mode over it. When I manually switch to this buffer after it has been opened and then run the function again when it copies the text it has all the correct text properties attached. So what do I need to do to have this buffer completely initialized so that the correct syntax highlighting will be copied in?

© Stack Overflow or respective owner

Related posts about emacs

Related posts about elisp