* Stefan Monnier <monnier@iro.umontreal.ca> [2021-10-22 14:59]:
I guess it would make sense to try and distinguish the two cases:
- Eager: `emacs --daemon` is run (typically from something like a login
script or systemd) before any emacsclient is involved.
- Lazy: `emacs --daemon` is started on-demand by the `-a` option
of `emacsclient` (or via ALTERNATE_EDITOR).
In the lazy case, we could kill the daemon when the last client exits.
Can the variable `server-clients' help to detect how many clients are there?
Then if so, one can make Emacs Lisp function and put in
configuration file, then such user can have the Emacs Daemon
killed if last client is closed.