Debian Emacs Devel Commit: rev 45 - in emacs21/pkg/trunk/debian: . patches
Jerome Marant
jerome@quantz.debian.org
Sun, 25 Jan 2004 22:06:52 +0100
Author: jerome
Date: 2004-01-25 22:06:51 +0100 (Sun, 25 Jan 2004)
New Revision: 45
Added:
emacs21/pkg/trunk/debian/patches/emacsclient-alternate-editor.dpatch
Modified:
emacs21/pkg/trunk/debian/changelog
emacs21/pkg/trunk/debian/patches/00list
Log:
Fix for #219658: emacsclient handling ALTERNATE_EDITOR properly when this is no command line parameter.
Modified: emacs21/pkg/trunk/debian/changelog
===================================================================
--- emacs21/pkg/trunk/debian/changelog 2004-01-22 23:03:19 UTC (rev 44)
+++ emacs21/pkg/trunk/debian/changelog 2004-01-25 21:06:51 UTC (rev 45)
@@ -1,5 +1,9 @@
emacs21 (21.3+1-5) unstable; urgency=low
+ * debian/patches/emacsclient-alternate-editor.dpatch: new patch
+ allowing emacsclient to handle ALTERNATE_EDITOR properly when the
+ command is run without any parameter. Closes: Bug#219658.
+ [Jérôme Marant]
* debian/control.in: emacs and emacs-nox now provide the `editor'
virtual package. (closes: #66243, #90154) [Jérôme Marant]
* debian/control: synchronized with debian/control.in.
Modified: emacs21/pkg/trunk/debian/patches/00list
===================================================================
--- emacs21/pkg/trunk/debian/patches/00list 2004-01-22 23:03:19 UTC (rev 44)
+++ emacs21/pkg/trunk/debian/patches/00list 2004-01-25 21:06:51 UTC (rev 45)
@@ -11,4 +11,5 @@
battery-acpi-support
scroll-margin
save-buffer
+emacsclient-alternate-editor
fix-x-vs-no-x-diffs
Added: emacs21/pkg/trunk/debian/patches/emacsclient-alternate-editor.dpatch
===================================================================
--- emacs21/pkg/trunk/debian/patches/emacsclient-alternate-editor.dpatch 2004-01-22 23:03:19 UTC (rev 44)
+++ emacs21/pkg/trunk/debian/patches/emacsclient-alternate-editor.dpatch 2004-01-25 21:06:51 UTC (rev 45)
@@ -0,0 +1,49 @@
+#!/bin/sh -e
+## emacsclient-alternate-editor.dpatch by Jerome Marant <jerome@debian.org>
+##
+## DP: ** This patch allows emacsclient to take the ALTERNATE_EDITOR
+## DP: environment variable properly into account when the command
+## DP: is run without any parameter.
+## DP: Status: has been sent upstream
+## DP: Date: Sun, 25 Jan 2004 21:00:29 +0100
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+ -patch) patch $patch_opts -p1 < $0;;
+ -unpatch) patch $patch_opts -p1 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/jerome/pkg/emacs21/svn/emacs21/lib-src/emacsclient.c emacs21/lib-src/emacsclient.c
+--- /home/jerome/pkg/emacs21/svn/emacs21/lib-src/emacsclient.c 2004-01-25 19:45:54.000000000 +0100
++++ emacs21/lib-src/emacsclient.c 2004-01-25 19:46:31.000000000 +0100
+@@ -75,6 +75,8 @@
+ int argc;
+ char **argv;
+ {
++ alternate_editor = getenv ("ALTERNATE_EDITOR");
++
+ while (1)
+ {
+ int opt = getopt_long (argc, argv,
+@@ -82,8 +84,6 @@
+
+ if (opt == EOF)
+ break;
+-
+- alternate_editor = getenv ("ALTERNATE_EDITOR");
+
+ switch (opt)
+ {