Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

help with emacs lisp basics

Name: Anonymous 2010-08-28 18:23

I have a function in a file that's loaded in .emacs, but when I try to call it, Emacs returns a no match. What gives?

Name: Anonymous 2010-08-28 18:28

What gives?
No match.

Name: Anonymous 2010-08-28 18:35

are you sure the function is (interactive) or are you just calling it within other functions?

Name: Anonymous 2010-08-28 18:38

(interactive).

Name: Anonymous 2010-08-28 18:41

This is the code.

(defun compile-c ()
  (apply 'make-comint
     "cc" "/usr/bin/gcc" nil
     (list (buffer-file-name) "-Wall")))


(add-hook 'c-mode-hook
      (lambda ()
      (define-key c-mode-map (kbd "C-c C-l") 'compile-c)))

Name: Anonymous 2010-08-28 18:49

Try Textmate. You can customize it with Applescripts. Watch the screencasts.

Name: Anonymous 2010-08-28 18:55


(defun compile-c ()
  (interactive)
  (apply 'make-comint
     "cc" "/usr/bin/gcc" nil
     (list (buffer-file-name) "-Wall")))


commandp still complains.

Name: Anonymous 2010-08-28 18:56

You know, there is already M-x compile you can use

Name: Anonymous 2010-08-28 18:59

>>7
yes, (interactive) wasn't the problem as you weren't doing M-x compile-c. commandp is complaining because the program argument to make-comint isn't a command, I believe that the command argument may have to be an emacs function

Name: Anonymous 2010-08-28 19:13

>>9
erm, disregard that, I seem to have read the wrong documentation

Name: Anonymous 2010-11-26 19:11


Don't change these.
Name: Email:
Entire Thread Thread List