help with emacs lisp basics
1
Name:
Anonymous
2010-08-28 18:23
I have a function in a file that's load ed in .emacs , but when I try to call it, Emacs returns a no match. What gives?
2
Name:
Anonymous
2010-08-28 18:28
What gives?
No match.
3
Name:
Anonymous
2010-08-28 18:35
are you sure the function is (interactive) or are you just calling it within other functions?
4
Name:
Anonymous
2010-08-28 18:38
(interactive).
5
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)))
6
Name:
Anonymous
2010-08-28 18:49
Try Textmate. You can customize it with Applescripts. Watch the screencasts.
7
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.
8
Name:
Anonymous
2010-08-28 18:56
You know, there is already M-x compile you can use
9
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
10
Name:
Anonymous
2010-08-28 19:13
>>9
erm, disregard that, I seem to have read the wrong documentation
11
Name:
Anonymous
2010-11-26 19:11