Author Topic: How to get the document mode of the current buffer?  (Read 319 times)

Bamsen

  • Community Member
  • Posts: 41
  • Hero Points: 1
How to get the document mode of the current buffer?
« on: May 08, 2017, 10:59:28 am »
Hi,

I want to use new_file("<mode>") to create a new buffer of the same type as my current buffer. (XML, Plain Text ....)
How can I get the document mode of my current buffer to feed in to new_file?

---
Morten A. Steien

jporkkahtc

  • Senior Community Member
  • Posts: 1249
  • Hero Points: 91
  • Text
Re: How to get the document mode of the current buffer?
« Reply #1 on: May 08, 2017, 05:48:01 pm »
      _str modeName = _LangGetModeName(p_LangId);


Bamsen

  • Community Member
  • Posts: 41
  • Hero Points: 1
Re: How to get the document mode of the current buffer?
« Reply #2 on: May 09, 2017, 05:58:10 am »
Perfect!
Thank you for your help.  :)