Gentoo Archives: gentoo-commits

From: "Ulrich Mueller (ulm)" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] emacs r1150 - emacs-daemon
Date: Tue, 04 Nov 2008 15:42:05
Message-Id: E1KxO2b-0003Hf-Uj@stork.gentoo.org
1 Author: ulm
2 Date: 2008-11-04 15:42:01 +0000 (Tue, 04 Nov 2008)
3 New Revision: 1150
4
5 Modified:
6 emacs-daemon/10emacs-daemon-gentoo.el
7 emacs-daemon/ChangeLog
8 emacs-daemon/emacs.rc
9 Log:
10 Restart the server on reception of SIGUSR1.
11
12 Modified: emacs-daemon/10emacs-daemon-gentoo.el
13 ===================================================================
14 --- emacs-daemon/10emacs-daemon-gentoo.el 2008-11-03 14:19:23 UTC (rev 1149)
15 +++ emacs-daemon/10emacs-daemon-gentoo.el 2008-11-04 15:42:01 UTC (rev 1150)
16 @@ -25,4 +25,6 @@
17 (insert (number-to-string (emacs-pid)) "\n"))
18 ;; Remove file on exit
19 (add-hook 'kill-emacs-hook
20 - `(lambda () (delete-file ,file))))))
21 + `(lambda () (delete-file ,file))))
22 + ;; Restart the server if signal SIGUSR1 is received.
23 + (define-key special-event-map [sigusr1] 'server-start)))
24
25 Modified: emacs-daemon/ChangeLog
26 ===================================================================
27 --- emacs-daemon/ChangeLog 2008-11-03 14:19:23 UTC (rev 1149)
28 +++ emacs-daemon/ChangeLog 2008-11-04 15:42:01 UTC (rev 1150)
29 @@ -1,3 +1,10 @@
30 +2008-11-04 Ulrich Mueller <ulm@g.o>
31 +
32 + * emacs.rc (description): Add description.
33 +
34 + * 10emacs-daemon-gentoo.el (special-event-map): Restart the server
35 + on reception of SIGUSR1.
36 +
37 2008-11-03 Ulrich Mueller <ulm@g.o>
38
39 * 10emacs-daemon-gentoo.el: Check if a daemon is already running.
40
41 Modified: emacs-daemon/emacs.rc
42 ===================================================================
43 --- emacs-daemon/emacs.rc 2008-11-03 14:19:23 UTC (rev 1149)
44 +++ emacs-daemon/emacs.rc 2008-11-04 15:42:01 UTC (rev 1150)
45 @@ -8,6 +8,8 @@
46 PIDFILE_DIR="/var/run/emacs/${USER}"
47 PIDFILE="${PIDFILE_DIR}/emacs.pid"
48
49 +description="Start an Emacs server running in the background"
50 +
51 checkconfig() {
52 if [ "${USER}" = "${RC_SVCNAME}" ]; then
53 eerror "You have to create an init script for each user:"