[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] 20090414.02.tpd.patch (src/scripts/SPADEDIT fix 7192)
From: |
daly |
Subject: |
[Axiom-developer] 20090414.02.tpd.patch (src/scripts/SPADEDIT fix 7192) |
Date: |
Mon, 13 Apr 2009 23:14:07 -0500 |
It helps to actually ADD the file that fixes the failure
which I forgot to include in the last posted patch.
======================================================================
diff --git a/changelog b/changelog
index 865a39d..4613afe 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,5 @@
+20090414 tpd src/axiom-website/patches.html 20090414.02.tpd.patch
+20090414 tpd src/scripts/SPADEDIT fix 7192, add SPADEDIT for )edit
20090414 tpd src/axiom-website/patches.html 20090414.01.tpd.patch
20090414 tpd src/scripts/Makefile fix 7192, add SPADEDIT for )edit
20090413 tpd src/axiom-website/patches.html 20090413.04.tpd.patch
diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html
index 232874d..eab02e1 100644
--- a/src/axiom-website/patches.html
+++ b/src/axiom-website/patches.html
@@ -1076,5 +1076,7 @@ bookvol5 fix 7191, set *system-directory* dynamically<br/>
download.html add slackware to downloads<br/>
<a href="patches/20090414.01.tpd.patch">20090414.01.tpd.patch</a>
src/scripts/Makefile fix 7192, add SPADEDIT for )edit<br/>
+<a href="patches/20090414.02.tpd.patch">20090414.02.tpd.patch</a>
+src/scripts/SPADEDIT fix 7192, add SPADEDIT for )edit<br/>
</body>
</html>
diff --git a/src/scripts/SPADEDIT b/src/scripts/SPADEDIT
new file mode 100755
index 0000000..8b3b4b1
--- /dev/null
+++ b/src/scripts/SPADEDIT
@@ -0,0 +1,34 @@
+#!/bin/sh
+# this script is invoked by the spad )edit command
+# can be replaced by users favorite editor
+# optional second argument should be character offset in file
+
+thefile=$1
+if [ ! -f $1 ] ; then
+ thefile=$AXIOM/../../src/algebra/$1
+else
+ thefile=$1
+fi
+
+
+if [ $# = 2 ] ; then
+ START=`grep -n \^$2\( $thefile | awk -F: '{print $1}'`
+else
+ START=1
+fi
+
+if [ ! "$EDITOR" ] ; then
+ EDITOR=vi
+fi
+
+if [ "$DISPLAY" ] ; then
+ if [ "$EDITOR" = "emacs" ] ; then
+ emacs +$START $thefile &
+ elif [ "$EDITOR" = "vi" ] ; then
+ xterm -e vi +$START $thefile &
+ else
+ xterm -e $EDITOR $thefile &
+ fi
+else
+ $EDITOR $thefile
+fi
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Axiom-developer] 20090414.02.tpd.patch (src/scripts/SPADEDIT fix 7192),
daly <=