Thu Dec 02, 2021 7:44 am
Login Register Lost Password? Contact Us

ECL mode for emacs

Topics specific to the use of the ECL IDE

Tue Jul 24, 2012 6:18 pm Change Time Zone

Hi, just feeling a command line alternative of the IDE might be useful when the need arises to edit the ecl source in the terminal. So I configured this ecl mode for emacs. I am neither an expert in emacs nor ecl, just followed the on-line tutorials and the ECL documentation, so there are likely to problems. Please feel free to report bugs, make improvement, and share with others.

To enable syntax highlighting, please untar the attached file
(10 KiB) Downloaded 680 times
and put it in your emacs load path, and add the following statement in your .emacs file.
Code: Select all
(require 'ecl-mode)

You can also configure syntax checking with flymake and the eclcc program. To do that, please make sure the program eclcc (available once you’ve installed HPCC) is on your system path and flymake is present (shipped with recent versions of emacs), and then add the following lines in you .emacs file.

Code: Select all
(require 'flymake)
(add-hook 'find-file-hook 'flymake-find-file-hook)

(defun flymake-ecl-init ()
  (let* ((temp-file (flymake-init-create-temp-buffer-copy
      (local-file (file-relative-name
                  (file-name-directory buffer-file-name))))
    (list "eclcc" (list "-syntax" "-I.." local-file))))

(setq flymake-allowed-file-name-masks
      (cons '(".+\\.ecl$"

(setq flymake-err-line-patterns
      (cons '("\\(.*\\)(\\([0-9]+\\),[0-9]+):.*:\\(.*$\\)"
            1 2 nil 3)

Hope it helps. Thanks.
Last edited by yil43 on Sat Sep 15, 2012 6:14 pm, edited 2 times in total.
Posts: 4
Joined: Thu Jul 19, 2012 5:38 pm

Wed Jul 25, 2012 2:24 pm Change Time Zone

Thank you for sharing this! We will certainly check it out.
Site Admin
Site Admin
Posts: 208
Joined: Thu Jan 27, 2011 10:58 am

Sat Sep 15, 2012 6:12 pm Change Time Zone

Just updated the attachment file to make the syntax highlighting case insensitive. Also you can add the -I option to invoke eclcc, e.g.,
(list "eclcc" (list "-syntax" "-I.." local-file))
so that your import won't appear as errors in the syntax checking.
Posts: 4
Joined: Thu Jul 19, 2012 5:38 pm

Return to ECL IDE

Who is online

Users browsing this forum: No registered users and 1 guest