summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2005-09-06 18:19:54 +0000
committerJean Delvare <khali@linux-fr.org>2005-09-06 18:19:54 +0000
commitda86d5c093a721f6670083ae6829438e18b00b98 (patch)
tree0836374a3799c9972f028aaade6128f22a5f8b5f
parentf8f2ca26c47c32e8de3a12ff77f12e91365a5e91 (diff)
downloadquilt-da86d5c093a721f6670083ae6829438e18b00b98.tar.gz
- It is now possible to set EDITOR in ~/.quiltrc in order to use a
different editor for quilt and for the other tasks.
-rw-r--r--doc/quilt.1.in5
-rw-r--r--quilt.changes6
-rw-r--r--quilt.quiltrc4
-rw-r--r--quilt/edit.in11
4 files changed, 26 insertions, 0 deletions
diff --git a/doc/quilt.1.in b/doc/quilt.1.in
index ca6863a..582485c 100644
--- a/doc/quilt.1.in
+++ b/doc/quilt.1.in
@@ -148,6 +148,11 @@ diff style.
The location of patch files, defaulting to "patches".
+.IP EDITOR 4
+
+The program to run to edit files. If it isn't redefined in the
+configuration file, $EDITOR as defined in the environment will be used.
+
.SH AUTHORS
Quilt started as a series of scripts written by Andrew Morton
diff --git a/quilt.changes b/quilt.changes
index 15bb232..5fcb8bd 100644
--- a/quilt.changes
+++ b/quilt.changes
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Tue Sep 6 20:15:54 CEST 2005 - khali@linux-fr.org
+
+- It is now possible to set EDITOR in ~/.quiltrc in order to use
+ a different editor for quilt and for the other tasks.
+
+-------------------------------------------------------------------
Tue Sep 6 19:57:38 CEST 2005 - khali@linux-fr.org
- doc/README needs the same $EDITOR filtering quirk we just added
diff --git a/quilt.quiltrc b/quilt.quiltrc
index 6992134..19682b0 100644
--- a/quilt.quiltrc
+++ b/quilt.quiltrc
@@ -16,6 +16,10 @@ QUILT_REFRESH_ARGS="--no-timestamps --backup"
# Prefix all patch names with the relative path to the patch?
QUILT_PATCHES_PREFIX=yes
+# Use a specific editor for quilt (defaults to the value of $EDITOR before
+# sourcing this configuration file, or vi if $EDITOR wasn't set).
+#EDITOR=nedit
+
# The following ``mail'' command filter recognizes the format we use for
# kernel patches inside SUSE. The format is as follows (slightly
# simplified; Signed-off-by and Acked-by lines optional):
diff --git a/quilt/edit.in b/quilt/edit.in
index 0b3a169..eadf821 100644
--- a/quilt/edit.in
+++ b/quilt/edit.in
@@ -8,6 +8,17 @@
: ${EDITOR:=vi}
+# Read in library functions
+if [ "$(type -t patch_file_name)" != function ]
+then
+ if ! [ -r @SCRIPTS@/patchfns ]
+ then
+ echo "Cannot read library @SCRIPTS@/patchfns" >&2
+ exit 1
+ fi
+ . @SCRIPTS@/patchfns
+fi
+
usage()
{
printf $"Usage: quilt edit file ...\n"