help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

function evaluated, but cannot execute


From: ken
Subject: function evaluated, but cannot execute
Date: Tue, 26 Apr 2011 17:25:47 -0400
User-agent: Thunderbird 2.0.0.24 (X11/20101213)

Testing little function to learn from...

(defun my-prepend-to-file ()
  "Prepend some hard-coded text to specified file."
  (let ((oldbuf (current-buffer)))
    (save-current-buffer
      (set-buffer (get-buffer-create "/home/zl/tmp/test.html"))
      (insert "\n\nText inserted by my-prepend-to-file.\n\n"))))

I evaluate this function.  No problem.

I do "C-h f my-prepend-to-file RET", emacs displays in the other window:

my-prepend-to-file is a Lisp function.

(my-prepend-to-file)

Prepend some hard-coded text to specified file.

[back]

But when I do "M-x my-prepend-to-file RET", emacs responds "[No match]".
 So what's wrong?


tia,
ken


-- 
Anything is easy if you know how to do it.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]