all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* function evaluated, but cannot execute
@ 2011-04-26 21:25 ken
  2011-04-26 21:35 ` Drew Adams
  2011-04-26 21:48 ` PJ Weisberg
  0 siblings, 2 replies; 4+ messages in thread
From: ken @ 2011-04-26 21:25 UTC (permalink / raw)
  To: GNU Emacs List

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.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-04-26 22:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-26 21:25 function evaluated, but cannot execute ken
2011-04-26 21:35 ` Drew Adams
2011-04-26 21:48 ` PJ Weisberg
2011-04-26 22:17   ` ken

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.