4

I am using Emacs with SML mode. Sometimes I need to clean the SML buffer. How can I do that.

cgon
  • 1,955
  • 2
  • 23
  • 37
rookie
  • 7,723
  • 15
  • 49
  • 59
  • 3
    I wish I knew what this meant. – johnny Nov 19 '10 at 19:02
  • 2
    @johnny: I had to Google it. Looks like SML/NJ is some kind of compiler and programming environment for SML (which I've also never heard of). Given that, the question seems a bit more straightforward, if still light on the details. – David Nov 19 '10 at 19:04

2 Answers2

4

Standard ML of New Jersey is a functional programming language that is a variant of ML. Usually it's used in EMACS with a plugin. Since I usually just kill the buffer and start a new one there wasn't the need for a clearscreen. However this might be useful: http://www.standardml.org/Basis/manpages.html.

  • thanks a lot for the answer, how can I kill the buffer, without exiting, and how can I exit actually, my ctrl+D doesn't work, every time I need to prompt System... – rookie Nov 19 '10 at 19:46
  • 2
    In Emacs? I believe it's Ctrl+x+k. –  Nov 20 '10 at 17:13
0
 (let ((sml-process (get-process "sml")))
    (when sml-process
      (quit-process sml-process)))
  (sleep-for 0.25)
  (let ((sml-buffer (get-buffer "*sml*")))
    (when sml-buffer
      (kill-buffer sml-buffer)))
grettke
  • 1,407
  • 7
  • 10