mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-29 07:58:28 +00:00
Allow inhibiting the instructions on how to close emacsclient frames
* doc/emacs/misc.texi (Invoking emacsclient): Document it. * lisp/server.el (server-client-instructions): New variable. (server-execute): Use it.
This commit is contained in:
parent
78017a6e59
commit
ff5a3c74fc
@ -1893,6 +1893,12 @@ with @kbd{C-x #}. But @kbd{C-x #} is the way to tell
|
||||
window or a frame, @kbd{C-x #} always displays the next server buffer
|
||||
in that window or in that frame.
|
||||
|
||||
@vindex server-client-instructions
|
||||
When @command{emacsclient} connects, the server will normally output
|
||||
a message that says how to exit the client frame. If
|
||||
@code{server-client-instructions} is set to @code{nil}, this message
|
||||
is inhibited.
|
||||
|
||||
@node emacsclient Options
|
||||
@subsection @code{emacsclient} Options
|
||||
@cindex @code{emacsclient} options
|
||||
|
8
etc/NEWS
8
etc/NEWS
@ -287,6 +287,14 @@ the buffer cycles the whole buffer between "only top-level headings",
|
||||
|
||||
* Changes in Specialized Modes and Packages in Emacs 28.1
|
||||
|
||||
** Emacs Server
|
||||
|
||||
+++
|
||||
*** New user option 'server-client-instructions'.
|
||||
When emacsclient connects, Emacs will (by default) output a message
|
||||
about how to exit the client frame. If 'server-client-instructions'
|
||||
is set to nil, this message is inhibited.
|
||||
|
||||
** Python mode
|
||||
|
||||
*** 'C-c C-r' can now be used on arbitrary regions.
|
||||
|
@ -268,6 +268,12 @@ the \"-f\" switch otherwise."
|
||||
:type 'string
|
||||
:version "23.1")
|
||||
|
||||
(defcustom server-client-instructions t
|
||||
"If non-nil, output instructions on how to exit the client on connection.
|
||||
If non, no messaging is done."
|
||||
:version "28.1"
|
||||
:type 'boolean)
|
||||
|
||||
;; We do not use `temporary-file-directory' here, because emacsclient
|
||||
;; does not read the init file.
|
||||
(defvar server-socket-dir
|
||||
@ -1360,8 +1366,10 @@ The following commands are accepted by the client:
|
||||
nil)
|
||||
((and frame (null buffers))
|
||||
(run-hooks 'server-after-make-frame-hook)
|
||||
(message "%s" (substitute-command-keys
|
||||
"When done with this frame, type \\[delete-frame]")))
|
||||
(when server-client-instructions
|
||||
(message "%s"
|
||||
(substitute-command-keys
|
||||
"When done with this frame, type \\[delete-frame]"))))
|
||||
((not (null buffers))
|
||||
(run-hooks 'server-after-make-frame-hook)
|
||||
(server-switch-buffer
|
||||
@ -1372,9 +1380,11 @@ The following commands are accepted by the client:
|
||||
;; where it may be displayed.
|
||||
(plist-get (process-plist proc) 'frame))
|
||||
(run-hooks 'server-switch-hook)
|
||||
(unless nowait
|
||||
(message "%s" (substitute-command-keys
|
||||
"When done with a buffer, type \\[server-edit]")))))
|
||||
(when (and (not nowait)
|
||||
server-client-instructions)
|
||||
(message "%s"
|
||||
(substitute-command-keys
|
||||
"When done with a buffer, type \\[server-edit]")))))
|
||||
(when (and frame (null tty-name))
|
||||
(server-unselect-display frame)))
|
||||
((quit error)
|
||||
|
Loading…
Reference in New Issue
Block a user