all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How send answer to question a function asks automatically?
@ 2003-09-18 22:12 Christian Seberino
  2003-09-19 15:58 ` Kevin Rodgers
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Seberino @ 2003-09-18 22:12 UTC (permalink / raw)


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.

Any help would be greatly appreciated.

Sincerely,

Chris

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

* Re: How send answer to question a function asks automatically?
  2003-09-18 22:12 How send answer to question a function asks automatically? Christian Seberino
@ 2003-09-19 15:58 ` Kevin Rodgers
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Rodgers @ 2003-09-19 15:58 UTC (permalink / raw)


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

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

end of thread, other threads:[~2003-09-19 15:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-18 22:12 How send answer to question a function asks automatically? Christian Seberino
2003-09-19 15:58 ` Kevin Rodgers

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.