aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2012-11-10 01:07:13 +0100
committerRickard Green <[email protected]>2012-12-07 00:24:28 +0100
commit3f85767e086e08b70baee34d719df9a8bc8814f4 (patch)
tree024583fe46dc02625a78033f1365d6f0ee58f5c7
parent5b2e52b93cbc35b8e2fc2e573a16bc8097d7b14b (diff)
downloadotp-3f85767e086e08b70baee34d719df9a8bc8814f4.tar.gz
otp-3f85767e086e08b70baee34d719df9a8bc8814f4.tar.bz2
otp-3f85767e086e08b70baee34d719df9a8bc8814f4.zip
Change annotate level for emacs-22 in cerl
-rw-r--r--erts/etc/unix/cerl.src15
1 files changed, 11 insertions, 4 deletions
diff --git a/erts/etc/unix/cerl.src b/erts/etc/unix/cerl.src
index 0b2d6512ea..724ec84c2f 100644
--- a/erts/etc/unix/cerl.src
+++ b/erts/etc/unix/cerl.src
@@ -299,10 +299,17 @@ else
;;
esac
- # Set annotation level for gdb in emacs 22 and higher.
- emacs_major=`$EMACS --version | head -1 | sed 's,^[^0-9]*\([0-9]*\).*,\1,g'`
- if [ '!' -z "$emacs_major" -a $emacs_major -gt 21 ]; then
- GDBARGS="--annotate=3 "
+ if [ "$EMACS_ANNOTATE_LEVEL" != "" ]; then
+ GDBARGS="--annotate=$EMACS_ANNOTATE_LEVEL"
+ else
+ # Set annotation level for gdb in emacs 22 and higher. Seems to
+ # be working with level 1 for emacs 22 and level 3 for emacs 23...
+ emacs_major=`$EMACS --version | head -1 | sed 's,^[^0-9]*\([0-9]*\).*,\1,g'`
+ if [ '!' -z "$emacs_major" -a $emacs_major -gt 22 ]; then
+ GDBARGS="--annotate=3 "
+ elif [ '!' -z "$emacs_major" -a $emacs_major -gt 21 ]; then
+ GDBARGS="--annotate=1 "
+ fi
fi
gdbcmd="$gdbcmd $GDBBP \
(insert-string \"source $ROOTDIR/erts/etc/unix/etp-commands\") \