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

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

Re: How send answer to question a function asks automatically?


From: Kevin Rodgers
Subject: Re: How send answer to question a function asks automatically?
Date: Fri, 19 Sep 2003 09:58:56 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2

Christian Seberino wrote:

I want to create a function that calls (server-edit) for me and avoids asking
me if I want to save the file because it defaults to YES!

   (defun cs-server-edit() (interactive)
      (server-edit "y"))
I've seen this work on other functions but you can't seem to be able to
add the string next to the function call with server-edit.

You have to read the source, to understand what arguments the function accepts.

Try this:

(defun cs-server-edit()
  (interactive)
  (let ((unread-command-events (cons ?y unread-command-events)))
    (server-edit)))

--
Kevin Rodgers



reply via email to

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