commit: 1d61333bbe3952cf324b75b44888542401e36851
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 5 12:54:31 2025 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Wed Mar 5 12:54:31 2025 +0000
URL: https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?id=1d61333b
Remove obsolete code
* emacs.rc (checkconfig): Remove obsolete test for baselayout-1.
* emacs-stop.sh: Remove example script.
* 10emacs-daemon-gentoo.el: Sharp-quote function name.
Remove redundant check for daemonp being bound.
* Makefile (DISTFILES): Drop emacs-stop.sh.
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
10emacs-daemon-gentoo.el | 5 ++---
ChangeLog | 8 ++++++++
Makefile | 4 ++--
README | 5 -----
emacs-stop.sh | 25 -------------------------
emacs.conf | 2 +-
emacs.rc | 7 +------
7 files changed, 14 insertions(+), 42 deletions(-)
diff --git a/10emacs-daemon-gentoo.el b/10emacs-daemon-gentoo.el
index 9ea5ba0..840166d 100644
--- a/10emacs-daemon-gentoo.el
+++ b/10emacs-daemon-gentoo.el
@@ -1,10 +1,9 @@
;;; emacs-daemon site-lisp configuration
-;; Copyright 2008-2016 Gentoo Authors
+;; Copyright 2008-2025 Gentoo Authors
;; Distributed under the terms of the GNU General Public License v2 or later
(and
- (fboundp 'daemonp)
(daemonp)
(null after-init-time)
(let* ((file (concat "/var/run/emacs/" (user-login-name) "/emacs.pid"))
@@ -32,4 +31,4 @@
(add-hook 'kill-emacs-hook
`(lambda () (ignore-errors (delete-file ,file))))))
;; Restart the server if signal SIGUSR1 is received.
- (define-key special-event-map [sigusr1] 'server-start)))
+ (define-key special-event-map [sigusr1] #'server-start)))
diff --git a/ChangeLog b/ChangeLog
index f16cbd9..4b18d6f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2025-03-05 Ulrich Müller <[email protected]>
+
+ * emacs.rc (checkconfig): Remove obsolete test for baselayout-1.
+ * emacs-stop.sh: Remove example script.
+ * 10emacs-daemon-gentoo.el: Sharp-quote function name.
+ Remove redundant check for daemonp being bound.
+ * Makefile (DISTFILES): Drop emacs-stop.sh.
+
2016-06-08 Ulrich Müller <[email protected]>
* README: Update URL and e-mail address of project.
diff --git a/Makefile b/Makefile
index beec1ee..f180383 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# Copyright 2008-2016 Gentoo Authors
+# Copyright 2008-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 or later
PN = emacs-daemon
@@ -7,7 +7,7 @@ PV = $(shell sed '/^[ \t]*\*
.*[Vv]ersion/!d;s/[^0-9.]*\([0-9.]*\).*/\1/;q' \
P = $(PN)-$(PV)
DISTFILES = README ChangeLog emacs.rc emacs.conf emacs-wrapper.sh \
- emacs-stop.sh 10emacs-daemon-gentoo.el
+ 10emacs-daemon-gentoo.el
.PHONY: all dist clean
diff --git a/README b/README
index a111878..4891b0c 100644
--- a/README
+++ b/README
@@ -42,8 +42,3 @@ Authors
Ulrich Müller <[email protected]>
Christian Faulhammer <[email protected]> (documentation)
-
-
-Local Variables:
-coding: utf-8
-End:
diff --git a/emacs-stop.sh b/emacs-stop.sh
deleted file mode 100644
index a9ee9bb..0000000
--- a/emacs-stop.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-# Copyright 2008-2016 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2 or later
-
-# Lisp expression to be evaluated when stopping Emacs.
-# Any additional commands should preferably be added to kill-emacs-hook.
-EMACS_LISP_EXPR="(kill-emacs)"
-
-su "${USER}" \
- -c "${EMACSCLIENT} ${EMACSCLIENT_OPTS} --eval \"${EMACS_LISP_EXPR}\"" \
- </dev/null &>/dev/null &
-pid=$!
-
-# Wait for emacsclient
-for (( t=${EMACS_TIMEOUT:-30}; t > 0; t-- )); do
- sleep 1
- kill -0 ${pid} 2>/dev/null || exit 0
-done
-
-echo "${0##*/}: timeout waiting for emacsclient" >&2
-kill ${pid} 2>/dev/null
-
-# exit 0: openrc-run shall continue and (forcibly) kill the emacs process
-# exit 1: openrc-run shall exit with an error
-exit 0
diff --git a/emacs.conf b/emacs.conf
index b6303d8..0733e20 100644
--- a/emacs.conf
+++ b/emacs.conf
@@ -13,7 +13,7 @@
#EMACS_START="/usr/libexec/emacs/emacs-wrapper.sh"
# Optionally, you may execute a custom script before stopping the
-# daemon. See /usr/libexec/emacs/emacs-stop.sh for an example. #246462
+# daemon. #246462
#EMACS_STOP=""
# Timeout (in seconds) to wait for the daemon to detach
diff --git a/emacs.rc b/emacs.rc
index e70d20b..cedf3c4 100644
--- a/emacs.rc
+++ b/emacs.rc
@@ -1,5 +1,5 @@
#!/sbin/openrc-run
-# Copyright 2008-2016 Gentoo Authors
+# Copyright 2008-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 or later
: ${EMACS:=/usr/bin/emacs}
@@ -20,11 +20,6 @@ depend() {
}
checkconfig() {
- if [ "${RC_VERSION:-0}" = "0" ]; then
- eerror "This script cannot be used for baselayout-1."
- return 1
- fi
-
if [ "${USER}" = "${RC_SVCNAME}" ]; then
eerror "You have to create an init script for each user:"
eerror "ln -s emacs /etc/init.d/emacs.<user>"