* doc/emacs/misc.texi (Invoking emacsclient): Document it (bug#11358).
* lisp/server.el (server-edit): Mention it in the doc string.
(server-edit-abort): New command.
Copyright-paperwork-exempt: yes
editor---in this case @command{emacsclient}---to exit before doing
something else.
+@findex server-edit-abort
+ If you want to abandon the edit instead, use the @kbd{M-x
+server-edit-abort} command. This sends a message back to the
+@command{emacsclient} program, telling it to exit, but doesn't save
+any files.
+
You can also call @command{emacsclient} with multiple file name
arguments: @samp{emacsclient @var{file1} @var{file2} ...} tells the
Emacs server to visit @var{file1}, @var{file2}, and so forth. Emacs
about how to exit the client frame. If 'server-client-instructions'
is set to nil, this message is inhibited.
++++
+*** New command 'server-edit-abort'.
+This command (not bound to any key by default) can be used to abort
+an edit instead of marking it as "Done" (which the 'C-x #' command
+does).
+
** Perl mode
---
which filenames are considered temporary.
If invoked with a prefix argument, or if there is no server process running,
-starts server process and that is all. Invoked by \\[server-edit]."
+starts server process and that is all. Invoked by \\[server-edit].
+
+To abort an edit instead of saying \"Done\", use \\[server-edit-abort]."
(interactive "P")
(cond
((or arg
(server-clients (apply #'server-switch-buffer (server-done)))
(t (message "No server editing buffers exist"))))
+(defun server-edit-abort ()
+ "Abort editing the current client buffer."
+ (interactive)
+ (if server-clients
+ (mapc (lambda (proc)
+ (server-send-string
+ proc (concat "-error "
+ (server-quote-arg "Aborted by the user"))))
+ server-clients)
+ (message "This buffer has no clients")))
+
(defun server-switch-buffer (&optional next-buffer killed-one filepos
this-frame-only)
"Switch to another buffer, preferably one that has a client.