diff options
| author | Glenn Morris <rgm@gnu.org> | 2021-01-27 07:55:11 -0800 |
|---|---|---|
| committer | Glenn Morris <rgm@gnu.org> | 2021-01-27 07:55:11 -0800 |
| commit | 0ca75f19561f7c1100ec97e5af019977443a575b (patch) | |
| tree | 6255d714809b1e3d53e6ded4092722bc1ec49efe | |
| parent | 55973984629cc08a3dbf9c7c4367851b712be21b (diff) | |
| parent | 3f610177adb844248fe37f52eb713d462e833a62 (diff) | |
| download | emacs-0ca75f19561f7c1100ec97e5af019977443a575b.tar.gz | |
Merge from origin/emacs-27
3f610177ad Avoid sending systemd shutdown notifications if non-daemon
009df5cb3c * src/cmds.c (Fforward_line): Doc fix. (Bug#46027)
ee1c54ebc0 Improve documentation of sendmail.el defcustom's
| -rw-r--r-- | lisp/mail/sendmail.el | 16 | ||||
| -rw-r--r-- | src/cmds.c | 1 | ||||
| -rw-r--r-- | src/emacs.c | 10 |
3 files changed, 20 insertions, 7 deletions
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 9f6fd6de224..d2601c35e8d 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -104,7 +104,9 @@ being sent is used), or nil (in which case the value of (defcustom mail-self-blind nil "Non-nil means insert Bcc to self in messages to be sent. This is done when the message is initialized, -so you can remove or alter the Bcc field to override the default." +so you can remove or alter the Bcc field to override the default. +If you are using `message-mode' to compose messages, customize the +variable `message-default-mail-headers' instead." :type 'boolean) ;;;###autoload @@ -172,14 +174,18 @@ This is used by the default mail-sending commands. See also (defcustom mail-archive-file-name nil "Name of file to write all outgoing messages in, or nil for none. This is normally an mbox file, but for backwards compatibility may also -be a Babyl file." +be a Babyl file. +If you are using `message-mode' to compose messages, customize the +variable `message-default-mail-headers' instead." :type '(choice file (const nil))) ;;;###autoload (defcustom mail-default-reply-to nil "Address to insert as default Reply-To field of outgoing messages. If nil, it will be initialized from the REPLYTO environment variable -when you first send mail." +when you first send mail. +If you are using `message-mode' to compose messages, customize the +variable `message-default-mail-headers' instead." :type '(choice (const nil) string)) (defcustom mail-alias-file nil @@ -388,7 +394,9 @@ in `message-auto-save-directory'." (defcustom mail-default-headers nil "A string containing header lines, to be inserted in outgoing messages. It can contain newlines, and should end in one. It is inserted -before you edit the message, so you can edit or delete the lines." +before you edit the message, so you can edit or delete the lines. +If you are using `message-mode' to compose messages, customize the +variable `message-default-mail-headers' instead." :type '(choice (const nil) string)) (defcustom mail-bury-selects-summary t diff --git a/src/cmds.c b/src/cmds.c index 1547db80e88..c8a96d918cd 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -99,6 +99,7 @@ DEFUN ("forward-line", Fforward_line, Sforward_line, 0, 1, "^p", Precisely, if point is on line I, move to the start of line I + N \("start of line" in the logical order). If there isn't room, go as far as possible (no error). +Interactively, N is the numeric prefix argument and defaults to 1. Returns the count of lines left to move. If moving forward, that is N minus number of lines moved; if backward, N plus number diff --git a/src/emacs.c b/src/emacs.c index 77114271b27..fd08667f3fd 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -186,7 +186,8 @@ bool build_details; /* Name for the server started by the daemon.*/ static char *daemon_name; -/* 0 not a daemon, 1 new-style (foreground), 2 old-style (background). */ +/* 0 not a daemon, 1 new-style (foreground), 2 old-style (background). + A negative value means the daemon initialization was already done. */ int daemon_type; #ifndef WINDOWSNT @@ -2354,7 +2355,10 @@ all of which are called before Emacs is actually killed. */ int exit_code; #ifdef HAVE_LIBSYSTEMD - sd_notify(0, "STOPPING=1"); + /* Notify systemd we are shutting down, but only if we have notified + it about startup. */ + if (daemon_type == -1) + sd_notify(0, "STOPPING=1"); #endif /* HAVE_LIBSYSTEMD */ /* Fsignal calls emacs_abort () if it sees that waiting_for_input is @@ -2866,7 +2870,7 @@ from the parent process and its tty file descriptors. */) } /* Set it to an invalid value so we know we've already run this function. */ - daemon_type = -1; + daemon_type = -daemon_type; #else /* WINDOWSNT */ /* Signal the waiting emacsclient process. */ |
