--- joe-3.7.orig/main.c
+++ joe-3.7/main.c
@@ -431,7 +431,7 @@
 				b->orphan = 1;
 				b->oldcur = pdup(b->bof, USTR "main");
 				pline(b->oldcur, get_file_pos(b->name));
-				p_goto_bol(bw->cursor);
+				p_goto_bol(b->oldcur);
 				line = b->oldcur->line - (maint->h - 1) / 2;
 				if (line < 0)
 					line = 0;
--- joe-3.7.orig/utf8.c
+++ joe-3.7/utf8.c
@@ -19,16 +19,16 @@
 #undef HAVE_SETLOCALE
 #endif
 
-/* If it looks old, forget it */
-#ifndef CODESET
-#undef HAVE_SETLOCALE
-#endif
-
 #if defined(HAVE_LOCALE_H) && defined(HAVE_SETLOCALE)
 #	include <locale.h>
 #       include <langinfo.h>
 #endif
 
+/* If we didn't find a CODESET in locale.h/langinfo.h, forget about setlocale */
+#ifndef CODESET
+#undef HAVE_SETLOCALE
+#endif
+
 /* nl_langinfo(CODESET) is broken on many systems.  If HAVE_SETLOCALE is undefined,
    JOE uses a limited internal version instead */
 
--- joe-3.7.orig/uformat.c
+++ joe-3.7/uformat.c
@@ -361,9 +361,10 @@
 			if (!bw->o.autoindent) {
 				/* Don't indent second line of single-line paragraphs if autoindent is off */
 				int x = zlen(indents);
+				int orgx = x;
 				while (x && (indents[x - 1] == ' ' || indents[x - 1] == '\t'))
 					indents[--x] = 0;
-				if (x) {
+				if (x && x != orgx) {
 					indents[x++] = ' ';
 					indents[x] = 0;
 				}
--- joe-3.7.orig/rc/ftyperc
+++ joe-3.7/rc/ftyperc
@@ -482,7 +482,7 @@
 
  Python
 *
-+#!\+\[ 	]\+\[a-z/]\+\[ 	]python\>
++#!\+\[ 	]\+\[a-z/]\+\[ 	]python\+\[0-9]\>
 -autoindent
 -syntax python
 -smarthome
--- joe-3.7.orig/rc/jstarrc.in
+++ joe-3.7/rc/jstarrc.in
@@ -879,8 +879,8 @@
 insf		^K r
 macros		^[ d		Dump macros
 macros		^[ ^D
-mode,"overtype",rtn	^V		Insert/Overtype
-mode,"overtype",rtn	.kI
+mode,"overwrite",rtn	^V		Insert/Overtype
+mode,"overwrite",rtn	.kI
 lindent		^K ,		Indent to left
 line		^Q I		Goto line no.
 line		^Q ^I
--- joe-3.7.orig/debian/menu
+++ joe-3.7/debian/menu
@@ -0,0 +1,5 @@
+?package(joe):\
+ needs="text"\
+ section="Applications/Editors"\
+ title="Joe"\
+ command="/usr/bin/joe"
--- joe-3.7.orig/debian/rules
+++ joe-3.7/debian/rules
@@ -0,0 +1,63 @@
+#!/usr/bin/make -f
+
+tmp := $(CURDIR)/debian/joe
+docdir := $(tmp)/usr/share/doc/joe
+
+CFLAGS := -g
+ifeq "$(findstring noopt,$(DEB_BUILD_OPTIONS))" ""
+CFLAGS += -O2
+endif
+
+build: config.status joe
+
+config.status: configure
+	CFLAGS="$(CFLAGS)" ./configure --sysconfdir=/etc --prefix=/usr \
+          --mandir='$${datadir}/man'
+
+joe: main.c
+	$(MAKE)
+
+clean: checkroot
+	[ ! -f Makefile ] || $(MAKE) distclean
+	rm -rf $(tmp) debian/*~ debian/substvars* debian/files*
+
+install: build checkroot
+	rm -rf $(tmp)
+	$(MAKE) DESTDIR=$(tmp) install
+ifeq "$(findstring nostrip,$(DEB_BUILD_OPTIONS))" ""
+	strip --remove-section=.comment --remove-section=.note $(tmp)/usr/bin/joe
+endif
+	rm -f $(tmp)/usr/bin/termidx
+	gzip -9 $(tmp)/usr/share/man/man1/joe.1
+	gzip -9 $(tmp)/usr/share/man/ru/man1/joe.1
+	for i in jmacs jstar rjoe jpico; do \
+          ln -s joe.1.gz $(tmp)/usr/share/man/man1/$$i.1.gz; \
+        done
+
+binary: binary-indep binary-arch
+
+binary-indep:
+
+binary-arch: install
+	install -m 755 -d $(tmp)/usr/share/doc/joe
+	for doc in README LIST TODO NEWS; do \
+          gzip -9c $$doc >$(tmp)/usr/share/doc/joe/$$doc.gz; \
+        done
+	rm -rf $(tmp)/etc/joe/doc
+	gzip -9c debian/changelog > $(tmp)/usr/share/doc/joe/changelog.Debian.gz
+	gzip -9c ChangeLog > $(tmp)/usr/share/doc/joe/changelog.gz
+	install -m 644 debian/help.pl.txt $(tmp)/usr/share/doc/joe/
+	install -m 644 debian/copyright debian/README.Debian $(tmp)/usr/share/doc/joe
+	install -m 755 -d $(tmp)/DEBIAN
+	install -m 644 debian/conffiles $(tmp)/DEBIAN
+	install -m 755 debian/preinst debian/postinst debian/prerm debian/postrm $(tmp)/DEBIAN
+	install -m 755 -d $(tmp)/usr/share/menu
+	install -m 644 debian/menu $(tmp)/usr/share/menu/joe
+	dpkg-shlibdeps $(tmp)/usr/bin/joe
+	dpkg-gencontrol -P$(tmp) -isp
+	chown -R root.root $(tmp)
+	chmod -R go=rX,u+rw,a-s $(tmp)
+	dpkg-deb --build $(tmp) ..
+
+checkroot: debian/rules
+	test "`id -u`" -eq "0"
--- joe-3.7.orig/debian/help.pl.txt
+++ joe-3.7/debian/help.pl.txt
@@ -0,0 +1,164 @@
+KURSOR
+^B      lewo
+^F      prawo
+^P      góra
+^N      dół
+^Z      poprzednie słowo
+^X      następne słowo
+
+SZUKAJ
+^KF     znajdź tekst
+^L      powtórz szukanie
+
+Przejdź do:
+^U      poprzedniego ekranu
+^V      następnego ekranu
+^A      początku linii
+^E      końca linii
+^KU     początku pliku
+^KV     końca pliku
+^KL     do linii o numerze ...
+
+BLOK
+^KB     zaznacz początek bloku
+^KK     zaznacz koniec bloku
+^KM     przenieś
+^KC     kopiuj
+^KW     zapisz do pliku
+^KY     skasuj
+^K/     przefilruj (przez program)
+
+SKASUJ
+^D      znak
+^Y      linię
+^W      następne słowo
+^O      poprzednie słowo
+^J      następną linię
+^_      cofnij
+^^      powtórz
+
+Różne
+^KJ     sformatuj tekst
+^T      opcje
+^R      odśwież
+^@      wstaw
+
+
+Sprawdź pisownię
+^[N     słowa
+^[L     pliku
+
+Zakończ
+^KX     zapisz
+^C      przerwij
+^KZ     powłoka
+
+PLIK
+^KE     edytuj
+^KR     wstaw
+^KD     zapisz
+
+
+^KO     podziel okno na 2 części
+^KG     powiększ bieżące okno
+^KN     przejdź do okna poniżej
+^C      zamknij bieżące okno
+
+^KE     załaduj plik do okna
+^KT     zmniejsz bieżące okno
+^KP     przejdź do okna powyżej
+^KI     pokaż wszystkie okna / jedno okno
+
+MAKRA
+^K[ 0-9 nagraj
+^K]     zakończ nagrywanie
+^K  0-9 wykonaj makro
+^K?     pytanie (???)
+^[D     pokaż makro
+
+
+Różne
+^K SPACJA stan
+^K\     powtórz
+^[M     matematyka
+^KA     wycentruj linię
+^[H     komunikat
+
+PRZEWIJANIE
+^[W     do góry
+^[Z     w dół
+^K<  w lewo
+^K>  w prawo
+
+Powłoka
+^K'     okno
+^[!     komenda
+
+
+CYTUJ
+`       CTRL-
+^\      META-
+
+
+Przejdź do
+^[B     do ^KB
+^[K     do ^KK
+
+SKASUJ
+^[Y     cofnij
+^[O     poprzednią linię
+
+Poszukiwanie przyrostowe
+^[R     w tył
+^[S     do przodu
+
+Zakładki
+^[ 0-9  przejdź do
+^[^[    ustaw
+
+Przejdź do
+^G      odpowiadającego ( [ {
+^K-     poprzedniego miejsca
+^K=     następnego miejsca
+^K;     zaznacza wyszukanie
+
+Wcięcie
+^K,     mniejsze
+^K.     większe
+
+KOMPILOWANIE
+^[C     skompiluj i zanalizuj błędy
+^[E     zanalizuj błędy
+^[=     do następnego błędu
+^[-     do poprzedniego błędu
+
+
+Specjalne sekwencje przeszukiwania:
+\^  \$  pasuje do początku/końca linii
+\<  \>    pasuje do początku/końca słowa
+\c      pasuje do wyważonego wyrażenia języka C
+\[..]   pasuje do znaku z danego zbioru
+\+      pasuje do 0 lub więcej wystąpień znaku podanego po tej sekwencji
+\?      pasuje do dowolnego pojedynczego znaku
+\*      pasuje do 0 lub więcej znaków
+\\      pasuje do \
+\n      pasuje do znaku końca linii
+
+Specjalne sekwencje zamiany:
+\&  zamiana na tekst, który został dopasowany przez łańcuch wyszukiwania
+\0 - 9  zamiana na tekst, który został dopasowany przez N-te wystąpienie \*, \?, \c, \+, lub \[..]
+\\      zamiana na \
+\n      zamiana na znak końca linii
+
+Klawisz TAB przy wyborze plików powoduje pokazanie menu nazw plików.
+Klawisze strzałek góra/dół pozwalają na dostęp do historii wcześniej wpisanych nazw.
+Specjalne nazwy plików:
+ !komenda               przepuść przez komendę powłoki
+ >>plik                   dopisz do pliku
+ -                      czytaj/pisz z/do standartowego wejścia/wyjścia
+ plik,POCZATEK,ROZMIAR  czytaj/pisz do części pliku/urządzenia
+        POCZATEK i ROZMIAR można podać w liczbach dziesiętnych (255), ósemkowych (0377), lub szestnastkowych (0xFF)
+
+
+Tłumaczenie: Marcin Owsiany <porridge@debian.org>
+(Z wersji 2.8)
--- joe-3.7.orig/debian/postrm
+++ joe-3.7/debian/postrm
@@ -0,0 +1,7 @@
+#!/bin/sh -e
+
+if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi
+
+if [ "$1" = "purge" ]; then
+  rm -rf /etc/joe
+fi
--- joe-3.7.orig/debian/preinst
+++ joe-3.7/debian/preinst
@@ -0,0 +1,13 @@
+#!/bin/sh -e
+
+case $1 in
+install|upgrade)
+	# drop old editorrc (master alternative and symlink file both)
+	if test -z "$2" || \
+	    dpkg --compare-versions "$2" lt '3.7-2.3~'; then
+		# this will noisily pass if editorrc was already removed,
+		# but not remove a slave alternative
+		(update-alternatives --remove-all editorrc 2>/dev/null || :)
+	fi
+	;;
+esac
--- joe-3.7.orig/debian/postinst
+++ joe-3.7/debian/postinst
@@ -0,0 +1,28 @@
+#!/bin/sh -e
+
+if [ "$1" = "configure" ]; then
+
+  update-alternatives --install /usr/bin/editor editor /usr/bin/joe 70 \
+    --slave /var/lib/misc/editorrc editorrc /etc/joe/joerc \
+    --slave /usr/share/man/man1/editor.1.gz editor.1.gz /usr/share/man/man1/joe.1.gz
+  update-alternatives --install /usr/bin/editor editor /usr/bin/jmacs 50 \
+    --slave /var/lib/misc/editorrc editorrc /etc/joe/jmacsrc \
+    --slave /usr/share/man/man1/editor.1.gz editor.1.gz /usr/share/man/man1/jmacs.1.gz
+  update-alternatives --install /usr/bin/editor editor /usr/bin/jstar 50 \
+    --slave /var/lib/misc/editorrc editorrc /etc/joe/jstarrc \
+    --slave /usr/share/man/man1/editor.1.gz editor.1.gz /usr/share/man/man1/jstar.1.gz
+  update-alternatives --install /usr/bin/editor editor /usr/bin/jpico 50 \
+    --slave /var/lib/misc/editorrc editorrc /etc/joe/jpicorc \
+    --slave /usr/share/man/man1/editor.1.gz editor.1.gz /usr/share/man/man1/jpico.1.gz
+  update-alternatives --install /usr/bin/editor editor /usr/bin/rjoe 25 \
+    --slave /var/lib/misc/editorrc editorrc /etc/joe/rjoerc \
+    --slave /usr/share/man/man1/editor.1.gz editor.1.gz /usr/share/man/man1/rjoe.1.gz
+
+  if test -z "$2" || dpkg --compare-versions "$2" lt '3.7-2.3~'; then
+    rm -f /etc/joe/editorrc
+    ln -sf ../../var/lib/misc/editorrc /etc/joe/editorrc
+  fi
+
+  if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi
+
+fi
--- joe-3.7.orig/debian/control
+++ joe-3.7/debian/control
@@ -0,0 +1,35 @@
+Source: joe
+Section: editors
+Priority: optional
+Maintainer: Josip Rodin <joy-packages@debian.org>
+Build-Depends: libncurses-dev
+Standards-Version: 3.9.1
+Homepage: http://joe-editor.sourceforge.net/
+
+Package: joe
+Architecture: any
+Depends: ${shlibs:Depends}
+Breaks: jupp (<< 3.1.18-2~)
+Description: user friendly full screen text editor
+ Joe, the Joe's Own Editor, has the feel of most PC text editors: the key
+ sequences are reminiscent of WordStar and Turbo C editors, but the feature
+ set is much larger than of those.  Joe has all of the features a Unix
+ user should expect: full use of termcap/terminfo, complete VI-style Unix
+ integration, a powerful configuration file, and regular expression search
+ system.  It also has six help reference cards which are always available,
+ and an intuitive, simple, and well thought-out user interface.
+ .
+ Joe has a great screen update optimization algorithm, multiple windows
+ (through/between which you can scroll) and lacks the confusing notion of
+ named buffers.  It has command history, TAB expansion in file selection
+ menus, undo and redo functions, (un)indenting and paragraph formatting,
+ filtering highlighted blocks through any external Unix command, editing
+ a pipe into or out of a command, and block move, copy, delete or filter.
+ .
+ Through simple QEdit-style configuration files, Joe can be set up to
+ emulate editors such as Pico and Emacs, along with a complete imitation
+ of WordStar, and a restricted mode version (lets you edit only the files
+ specified on the command line).  Joe also has a deferred screen update to
+ handle typeahead, and it ensures that deferral is not bypassed by tty
+ buffering.  It's usable even at 2400 baud, and it will work on any
+ kind of sane terminal.
--- joe-3.7.orig/debian/prerm
+++ joe-3.7/debian/prerm
@@ -0,0 +1,9 @@
+#!/bin/sh -e
+
+if [ "$1" != "upgrade" ]; then
+  update-alternatives --remove editor /usr/bin/joe
+  update-alternatives --remove editor /usr/bin/jmacs
+  update-alternatives --remove editor /usr/bin/jstar
+  update-alternatives --remove editor /usr/bin/jpico
+  update-alternatives --remove editor /usr/bin/rjoe
+fi
--- joe-3.7.orig/debian/changelog
+++ joe-3.7/debian/changelog
@@ -0,0 +1,478 @@
+joe (3.7-2.14.201411011508) ucs4-0-0-0; urgency=low
+
+  * UCS auto build. The following patches have been applied to the original source package
+    0001-bump-version-for-ucs400
+
+ -- Univention builddaemon <buildd@univention.de>  Sat, 01 Nov 2014 15:08:25 +0100
+
+joe (3.7-2) unstable; urgency=low
+
+  * Bump version, otherwise the build stamp in UCS 3.2 is higher than the 4.0
+    build (Bug #35387)
+
+ -- SĂśnke Schwardt-Krummrich <schwardt@univention.de>  Fri, 30 Oct 2014 14:43:23 +0200
+
+joe (3.7-2.3) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Also drop an old editorrc alternative if this package has never
+    been configured before (see #644481).
+  * Update version numbers for the joe/jupp conflicts.
+
+ -- Thorsten Glaser <tg@mirbsd.de>  Thu, 06 Oct 2011 08:58:39 +0000
+
+joe (3.7-2.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Really install the preinst maintainer script this time.
+    closes: #644468
+
+ -- Thorsten Glaser <tg@mirbsd.de>  Thu, 06 Oct 2011 08:06:10 +0000
+
+joe (3.7-2.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Improve coexistence of joe and jupp: move the editorrc symlink
+    to /var/lib/misc/editorrc and make it an update-alternatives
+    slave to editor (agreed by RaphaĂŤl Hertzog, Josip Rodin).
+    closes: #644282
+
+ -- Thorsten Glaser <tg@mirbsd.de>  Wed, 05 Oct 2011 20:29:50 +0000
+
+joe (3.7-2) unstable; urgency=high
+
+  * Fix the crash when typing too many dashes on a line, d'oh,
+    cherry-picked upstream CVS fix for uformat.c by Joseph Allen, and
+    fixed that in turn to actually assign the value of x to orgx, silly,
+    closes: #508159.
+  * Fix the various segfaults when called with more than one file, d'oh.
+    Thanks to Oyvind Aabling for a patch, but actually it seems that
+    this was a copy&waste error that crept up into the 3.7 tarball yet
+    was coded properly in CVS (main.c r1.79), so simply used that line
+    from the CVS version, closes: #514512.
+  * Fix the Ins key for jstar users by replacing the obsolete marker
+    "overtype" with "overwrite" in rc/jstarrc.in, thanks to Adam Borowski,
+    closes: #508797.
+  * Fix the matching of python<numbered> interpreters in rc/ftyperc,
+    thanks to Piotr Engelking, closes: #549277.
+  * Undo the mail formatting horror by reverting to the 3.5-2 (lenny)
+    version of syntax/mail.jsf.in. Neither the upstream commits nor the
+    NEWS file really explain the benefits of the new stuff, I only see
+    the bugs and all the excess red that's making me nauseous, too,
+    closes: #597825.
+  * Update standards version to 3.9.1.
+    + Update menu section from Apps/Editors to Applications/Editors. (3.7.3)
+    + Add Homepage field. (3.8.0)
+  * Declare 1.0 in debian/source/format explicitly.
+
+ -- Josip Rodin <joy-packages@debian.org>  Sat, 13 Nov 2010 21:38:30 +0100
+
+joe (3.7-1) unstable; urgency=low
+
+  * New upstream version, closes: #504122, #504439.
+    (Thanks to Jari Aalto for all the help with the BTS.)
+    + jstar is now able to set the left margin to 1, closes: #386883.
+    + Preserves timestamps of backup files once again, closes: #356267.
+    + Non-French sentence/paragraph spacing rules are now working properly,
+      closes: #389410.
+    + The French input (o) to the yes query now works (but thanks to
+      Jari Aalto for the alternative patch anyway), closes: #402565.
+    + Should now separate the interface locale from the input locale
+      (although I still had to forward-port my patch which unbreaks
+      langinfo.h CODESET detection), closes: #453310.
+    + Can now work with files/directories whose names begin with "!",
+      provided that they are doubly-escaped, closes: #163628.
+    + Can now work with files/directories whose names include "\",
+      provided that they are doubly-escaped, closes: 204449.
+    + Option -guess-indent no longer breaks -istep, closes: #430565.
+    + %a/%A fields in the status bar now work on (multibyte) chars,
+      closes: #443181.
+    + syntax/css.jsf no longer forces bold white on keywords, just bold,
+      closes: #414245.
+    + Improved Emacs keybindings in the find/replace query, closes: #440158.
+    + syntax/lua.jsf no longer has a syntax error on line 183,
+      closes: #505489.
+
+ -- Josip Rodin <joy-packages@debian.org>  Sat, 06 Dec 2008 16:08:31 +0100
+
+joe (3.5-2) unstable; urgency=low
+
+  * (Includes the NMU patch for emptiness in execmd.)
+  * Fixed crash when file can't be written to (due to lack of disk space
+    or being over quota), patch by Benjamin Mesing, closes: #103820.
+  * Fixed CHARSET detection to use the fine system function rather than
+    internal workaround, noticed by Chris Brown, closes: #408562.
+  * Stop highlighting '$foo' in PHP, patch by Sam Penny, extended by me to
+    also remove var_insqstring because it's an orphan now, closes: #469840.
+  * Replaced the utterly broken de.po with Jan Engelhardt's version
+    from the upstream tracker item 1629477, closes: #455503.
+
+ -- Josip Rodin <joy-packages@debian.org>  Sat, 31 May 2008 19:00:58 +0200
+
+joe (3.5-1.1) unstable; urgency=low
+
+  * Non-maintainer upload
+  * Fix Segfault when using execmd with empty command 
+    (closes: #392077)
+
+ -- Bas Zoetekouw <bas@debian.org>  Wed, 18 Oct 2006 20:47:22 +0200
+
+joe (3.5-1) unstable; urgency=low
+
+  * New upstream version.
+    + configure.ac now includes header check for term.h, dropped that patch
+    + types.h now conditionally includes unistd.h, and is included
+      everywhere else, dropped those patches
+    + termcap.c now includes term.h properly, dropped that patch
+    + There is no longer a default replace string set from history,
+      closes: #363460.
+    + Display of repeated search string now shows \, closes: #363345.
+    + Warning about ignore/steal/quit on vfat is gone, closes: #364493.
+    + Perl syntax highlighting now handles $`, closes: #261352.
+    + Python syntax highlighting now handles the '+comment+multiline
+      docstring, closes: #252643.
+    + Diff syntax highlighting now handles the minus cases properly,
+      though not with the exact patch by Darren Salt, closes: #258434.
+    + Shell syntax highlighting now handles HERE docs, closes: #284393.
+  * Stop shipping fixed /etc/joe/editorrc and instead add all our versions
+    as alternatives to it. Unfortunately it doesn't work as a slave
+    alternative to the main editor alternative, but this is as close
+    as it can get, closes: #269334.
+  * Updated conffiles list, fixed typo in old changelog ("urgence"),
+    removed FSF address from copyright file, moved menu entry to /usr/share,
+    compressed ru manual page, upped the standards version to 3.7.2.
+
+ -- Josip Rodin <joy-packages@debian.org>  Thu, 21 Sep 2006 00:37:33 +0200
+
+joe (3.3-5) unstable; urgency=medium
+
+  * Gah, HAVE_TERM_H was missing from autoconf configuration.
+  * Included utils.h in i18n.c so that joe_malloc is picked up.
+
+ -- Josip Rodin <joy-packages@debian.org>  Tue,  4 Apr 2006 12:32:50 +0200
+
+joe (3.3-4) unstable; urgency=medium
+
+  * Included a few more headers in order to avoid the broken casts on
+    architectures where getenv and malloc aren't the same as on ix86,
+    hopefully closes: #360666.
+
+ -- Josip Rodin <joy-packages@debian.org>  Tue,  4 Apr 2006 11:58:27 +0200
+
+joe (3.3-3) unstable; urgency=low
+
+  * Added the actual inclusion of <term.h> after the check for HAVE_TERM_H
+    in termcap.c, d'oh, thanks to Peter Troeger, closes: #252934.
+  * Added the #ifdef HAVE_STDLIB_H\n#include <stdlib.h>\n#endif sequence
+    wherever malloc is used, thanks to Tomas Kalibera, closes: #291267.
+  * Better documented some frequently asked questions, closes: #284142
+    and further alleviates #219914.
+
+ -- Josip Rodin <joy-packages@debian.org>  Mon,  3 Apr 2006 01:32:08 +0200
+
+joe (3.3-2) unstable; urgency=low
+
+  * Updated conffiles, dropped non-existent INFO file, dropped the doc
+    directory from /etc/joe (?!).
+
+ -- Josip Rodin <joy-packages@debian.org>  Sun, 12 Feb 2006 19:57:13 +0100
+
+joe (3.3-1) unstable; urgency=low
+
+  * New upstream version, closes: #348389.
+  * No longer lacks the initialization of a file descriptor in the charset
+    reading function, so it no longer crashes because of empty $HOME,
+    closes: #349257.
+
+ -- Josip Rodin <joy-packages@debian.org>  Sun, 12 Feb 2006 19:39:51 +0100
+
+joe (3.1-0.2) unstable; urgency=high
+
+  * NMU (urgency set to high since this breaks upgrades)
+  * Changed 'command -v' to the '-x' (as suggested by update-menu's
+    documentaiton) since if joe is upgraded together with menu 
+    update-menus is not guaranteed to be executable. Actually,
+    this is prevented so that update-menus is only run once in the upgrade
+    process (after it has been upgraded) (Closes: #253185, #253535, #254154)
+
+ -- Javier Fernandez-Sanguino Pen~a <jfs@computer.org>  Tue, 20 Jul 2004 11:58:55 +0200
+
+joe (3.1-0.1) unstable; urgency=low
+
+  * NMU
+  * The '3 years and 38 days to fix a new upstream release bug' release (Closes: #95303, #246136)
+  * Support added for color (Closes: #62752)
+  * debian/menu
+     o Fix missing quotte for needs
+     o Full path for command entry
+  * debian/changelog converted to UTF-8
+
+ -- Christian Marillat <marillat@debian.org>  Wed,  2 Jun 2004 18:28:13 +0200
+
+joe (2.9.8-1) experimental; urgency=low
+
+  * New upstream and new upstream version. :) closes: #95303
+    + No longer forgets small undone changes, closes: #30978
+    + Disables set[ug]id bits in backup files, closes: #90476
+  * Added one post-2.9.8 patch for uedit.c from vsamel, so that
+    the function go to previous/next word works properly.
+                                             
+ -- Josip Rodin <joy-packages@debian.org>  Tue, 19 Aug 2003 13:03:15 +0200
+
+joe (2.8-23) unstable; urgency=medium
+
+  * A forgotten free() wrapper invocation was mistakenly omitted while
+    disabling ./.joerc reading code, and this screwed up some of the
+    environment variable parsing. Thanks to Frederic Briere, closes: #196391.
+    (patch 015_disable_curdir_joerc)
+  * Updated paths where configuration files are searched for in the
+    commented out part of each conffile, closes: #161844.
+    (new patch 018_conffile_paths)
+
+ -- Josip Rodin <joy-packages@debian.org>  Tue, 19 Aug 2003 12:56:46 +0200
+
+joe (2.8-22) unstable; urgency=low
+
+  * Removed bogus reference to varargs.h, closes: #195152.
+    (patch 017_varargs)
+  * Removed old FHS transition code.
+
+ -- Josip Rodin <joy-packages@debian.org>  Fri, 15 Aug 2003 19:59:32 +0200
+
+joe (2.8-21) unstable; urgency=medium
+
+  * Fixed instant crashes on MIPS, which even though it has SA_INTERRUPT
+    and/or SV_INTERRUPT, needs just signal(SIGALRM,dotick).
+    Patch kindly provided by Peter Loje <pl@2m.dk>, closes: #113941.
+  * Added removal of /etc/joe in postrm+purge, closes: #133450.
+  * Added alternatives for other joe names, closes: #121086.
+  * Fixed misspelling of "imitation" in the description, closes: #124774.
+
+ -- Josip Rodin <jrodin@jagor.srce.hr>  Tue, 25 Jun 2002 20:25:13 +0200
+
+joe (2.8-20) unstable; urgency=low
+
+  * Added a note about the new version status in README.Debian.
+  * Moved the editor manual page symlink to /usr/share/man, closes: #88713.
+  * Fixed the description, closes: #91218, parts of #88713.
+  * Added a menu entry in Apps/Editors, another part of #88713.
+  * Added Marcin Owsiany's Polish translation of help, closes: #95384.
+
+ -- Josip Rodin <jrodin@jagor.srce.hr>  Tue, 16 Oct 2001 21:16:36 +0200
+
+joe (2.8-19) unstable; urgency=low
+
+  * Disabled loading of .joerc from the current directory because it is
+    a security risk, closes: #88055.
+  * Standards-Version: 3.5.2.
+
+ -- Josip Rodin <jrodin@jagor.srce.hr>  Fri,  2 Mar 2001 20:33:38 +0100
+
+joe (2.8-18) unstable; urgency=low
+
+  * Added some stuff from joe-2.8-43.src.rpm (some data collected from their
+    Bugzilla, too):
+     + 014_locale: fixes for the locale issues, from Petr Kolar
+       <PETR.KOLAR@vslib.cz>. International characters are displayed
+       properly (without -asis!), and word skipping is done correctly if
+       you set $LANG properly, closes: #36281.
+     + 009_sprintf_to_snprintf: renamed/merged from 009_percent_number_s,
+       because the purpose is mostly the same -- fixes some sprintfs to be
+       snprintfs to prevent possible buffer overflows, from Cristian Gafton
+       <gafton@redhat.com>.
+     + rc.h clarification of procrc arguments, from Trond Eivind GlomsrĂ¸d
+       <teg@redhat.com>, added to 006_missing_vars
+     + moved the vfile.c patch from 000_dwarfs to a new file,
+       000_large_file_segfault: it is indeed a fix for segmentation fault
+       when exiting after reading huge files, from b4506055@csie.ntu.edu.tw.
+  * Updated patch from Wichert, with which the DEADJOE files are written
+    correctly, and they have mode 0600 as before, closes: #78422.
+    BTW Red Hat's DEADJOE security patch appears to have some issues. :)
+  * Fixed some bits and pieces in debian/rules.
+
+ -- Josip Rodin <jrodin@jagor.srce.hr>  Sun, 26 Nov 2000 13:43:21 +0100
+
+joe (2.8-17) unstable; urgency=low
+
+  * Fixed editor.1 link, closes: #71214.
+  * Doesn't install /etc/joe/termcap anymore, either.
+  * Moved to DBS, because I need multiple-patch system.
+    Separated patches to these chunks:
+      + 000_dwarfs: three hunks meaning of which I have yet to determine :)
+        Dale said (but he wasn't 100% sure):
+        "I think this is one of the patches for the segfault on large files"
+      + 001_missing_headers: two headers needed for the thing to compile
+      + 002_int_to_long: changes to some casts, int -> long
+      + 003_renamed_stuff: renaming of *_alloc functions and variables
+      + 004_terminal_init: terminal initialization stuff
+      + 005_pts: support for /dev/pts/* under glibc 2.1
+      + 006_missing_vars: addition of missing variables in 3 function calls
+      + 007_parens_logic: fixed logic with parenthesis
+      + 008_protect_deadjoe: make DEADJOE 600.
+      + 009_percent_number_s: changes %s -> %.60s etc in messages
+      + 010_eol_in_conf_files: addition of "eol .@7" to config files
+      + 011_manpage: manual page patches
+      + 012_makefile_debug: changed default CFLAGS to -g [redundant]
+  * Removed a few bashisms from DBS files :/
+  * Added 013_Wall_patches: assorted patches to keep down warnings when
+    compiling with -Wall. (hopefully I didn't wreck something)
+  * Added Wichert's changes from the -15.1 potato NMU, closes: #77676
+      + safe creation of DEADJOE in order to prevent nastiness, closes: #34524
+        (added to 008_protect_deadjoe, with an addition of defining
+        _GNU_SOURCE in there because O_NOFOLLOW isn't defined otherwise)
+      + renamed _another_ function in order to prevent conflict with glibc
+        (added to 003_renamed_stuff)
+
+ -- Josip Rodin <jrodin@jagor.srce.hr>  Sat,  9 Sep 2000 20:40:23 +0200
+
+joe (2.8-16) unstable; urgency=low
+
+  * New maintainer.
+  * Fixed :include directive, closes: #70460.
+  * Added Kalle Olavi Niemitalo <tosi@stekt.oulu.fi>'s patches,
+    closes: #62396.
+  * Recompiled against libncurses5, closes: #67344.
+  * Since joe doesn't use termcap (but terminfo), termidx can be removed,
+    which is an ever so convenient way to do this: closes: #29890, #51611,
+    #56170.
+  * Undid the funny patch to a msdos-related file, closes: #66692.
+  * Updated for full Policy 3.x compliance. Lintian clean.
+  * Removed patches to the Makefile, do everything needed from debian/rules
+    in a cleaner way.
+  * Removed obsolete .editorrc, editorrc, debian.README files (used parts
+    of the latter for README.Debian).
+  * Removed unneeded Modifications section in the manual page, and
+    improved its header.
+  * Redid the package description. Various small updates to debian/*.
+
+ -- Josip Rodin <jrodin@jagor.srce.hr>  Tue, 29 Aug 2000 20:46:18 +0200
+
+joe (2.8-15) frozen unstable; urgency=low
+
+  * added another patch for large file segfault on exit.
+  *             closes: #18084, #18085, #33753, #42581, #50976
+
+ -- Dale Scheetz <dwarf@polaris.net>  Thu,  6 Apr 2000 09:38:44 -0400
+
+joe (2.8-14) unstable; urgency=low
+
+  * added patch for "core dump on large filename"
+
+ -- Dale Scheetz <dwarf@polaris.net>  Sun,  1 Aug 1999 14:29:21 -0400
+
+joe (2.8-13) unstable; urgency=low
+
+  * added patch for DEADJOE privileges: fixes #41444
+  * corrected typo in description: fixes #18946
+
+ -- Dale Scheetz <dwarf@polaris.net>  Sun,  1 Aug 1999 14:11:10 -0400
+
+joe (2.8-12) frozen unstable; urgency=low
+
+  * rebuilt against version independent libc6 and the newest ncurses4
+  * added the end key patch to the jstarrc file: fixes 24948
+  * added the end key patch to the other rc files to avoid further bugs
+  * fixed minor typo in description: fixes 18946
+  * applied patch changing int to long for alpha port: fixes 21138
+
+ -- Dale Scheetz <dwarf@polaris.net>  Thu, 10 Dec 1998 14:27:25 -0500
+
+joe (2.8-11) frozen unstable; urgency=low
+
+  * rebuilt against ncurses4
+
+ -- Dale Scheetz <dwarf@polaris.net>  Sun,  1 Nov 1998 14:56:35 -0500
+
+joe (2.8-10) frozen unstable; urgency=low
+
+  * truncated file name when building message buffers: fixes 18085
+  * remove substvars* and files* from the debian directory (unreported error)
+
+ -- Dale Scheetz <dwarf@polaris.net>  Sun, 19 Apr 1998 14:48:31 -0400
+
+joe (2.8-9) unstable; urgency=low
+
+  * Applied "end key" patch : fixes 16941, 18627
+  * Applied screen init patch : fixes 18626
+
+ -- Dale Scheetz <dwarf@polaris.net>  Thu, 26 Feb 1998 22:32:51 -0500
+
+joe (2.8-8) unstable; urgency=low
+
+  * compiled for libc6
+  * general clean up of rules file
+  * added update-alternatives for /usr/bin/editor
+  * removed execute permission from copyright : bug #13713
+  * fixed screensize problems : bug #14968
+
+ -- Dale Scheetz <dwarf@polaris.net>  Wed, 19 Nov 1997 09:28:47 -0500
+
+joe (2.8-7) frozen unstable; urgency=low
+
+  * corrected permissions on conffiles
+
+  * Upgraded source package format to Standards-Version 2.1.0.0
+
+ -- Dale Scheetz <dwarf@polaris.net>  Sun, 24 Nov 1996 12:34:33 -0500
+
+Fri Jun 28 12:43:33 MET DST 1996 Michael Meskes <meskes@informatik.rwth-aachen.de>
+
+        joe (2.8-5):
+
+	* Changed debian.rules for new naming scheme (Bug#3337)
+
+	* Added architecture field to debian.control
+
+	* gzip manpages
+
+Fri Mar  8 18:29:17 MET 1996 Michael Meskes <meskes@informatik.rwth-aachen.de>
+
+        joe (2.8-4):
+
+	* Moved termidx call into postinst file
+
+	* Added termcap and terminfo file to conffiles
+
+Tue Feb 27 19:56:42 MET 1996 Michael Meskes <meskes@informatik.rwth-aachen.de>
+
+        joe (2.8-3):
+
+	* Changed extended description
+
+	* Added automatic creation of .changes file
+
+	* Corrected control file to list revision again
+
+Wed Jan 24 12:34:23 MET 1996 Michael Meskes <meskes@informatik.rwth-aachen.de>
+
+	joe (2.8-2):
+
+	* Changed symbol name "valloc" to make joe run again with libc >= 5.3.2
+
+Tue Jan  9 15:56:13 MET 1996 Michael Meskes <meskes@informatik.rwth-aachen.de> 
+
+	joe (2.8-1):
+
+	* Added support for indexed termcap file
+
+Fri Apr 21 16:35:28 MET DST 1995 Christian Linhart <chris@cosy.sbg.ac.at>
+
+	joe (2.8-0):
+
+	* Added Debian GNU/Linux package maintenance system files.
+
+	* Configured Makefile:
+		- to be FSSTND-compliant. 
+		- CFLAGS to comply with Debian packaging guidelines
+	  	- Added DESTDIR-Variable for being able to install into
+	  	  debian-tmp
+
+	* Edited man-page to document the changed file positions.
+
+	* Made symlinks to joe's man page for the other names,
+	  joe can be invoked as.
+
+Local variables: 
+mode: debian-changelog
+End:
+
--- joe-3.7.orig/debian/conffiles
+++ joe-3.7/debian/conffiles
@@ -0,0 +1,7 @@
+/etc/joe/ftyperc
+/etc/joe/jicerc.ru
+/etc/joe/jmacsrc
+/etc/joe/joerc
+/etc/joe/jpicorc
+/etc/joe/jstarrc
+/etc/joe/rjoerc
--- joe-3.7.orig/debian/copyright
+++ joe-3.7/debian/copyright
@@ -0,0 +1,37 @@
+This is the Debian prepackaged version of joe. This package was previously
+maintained by Christian Linhart, Michael Meskes and Dale Scheetz.
+Current maintainer is Josip Rodin <joy-packages@debian.org>.
+
+Original sources can be found at http://joe-editor.sourceforge.net/
+
+   Copyright (C) 1992, 1995 Joseph H. Allen
+   Portions Copyright (C) 2001 Marek 'Marx' Grac
+
+   JOE is free software; you can redistribute it and/or modify it under the
+   terms of the GNU General Public License as published by the Free Software
+   Foundation; either version 1, or (at your option) any later version.
+
+   JOE is distributed in the hope that it will be useful, but WITHOUT ANY
+   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+   FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+   details.
+
+On Debian systems, the complete text of the GNU General Public License
+can be found in `/usr/share/common-licenses/GPL' file.
+
+Source uses the Berkeley/GLIBC random number generator:
+  
+   Copyright (c) 1983 Regents of the University of California.
+   All rights reserved.
+  
+   Redistribution and use in source and binary forms are permitted
+   provided that the above copyright notice and this paragraph are
+   duplicated in all such forms and that any documentation,
+   advertising materials, and other materials related to such
+   distribution and use acknowledge that the software was developed
+   by the University of California, Berkeley.  The name of the
+   University may not be used to endorse or promote products derived
+   from this software without specific prior written permission.
+   THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
--- joe-3.7.orig/debian/README.Debian
+++ joe-3.7/debian/README.Debian
@@ -0,0 +1,43 @@
+Joe's Own Editor Debian package
+-------------------------------
+
+Inclusion of configuration files
+--------------------------------
+
+Previously it was impossible to use a .joerc file without copying the entire
+set of defaults. Now there exists an ':include' statement which allows for
+the inclusion of other configuration files along with the one being read.
+In other words, put a ":include /etc/joe/joerc" at the end of one's ~/.joerc
+file and above that change only what you need.
+
+Back quotes or backticks (`)
+----------------------------
+
+The back quote character has a special meaning in joe, it is an escape
+character which invokes a special mode where the user can enter a
+three-digit ASCII code for non-printing characters.
+
+Locales with non-ASCII characters
+---------------------------------
+
+In older versions of joe, it was necessary to use the -asis mode in order
+to see non-ASCII characters. This is no longer necessary because there is
+proper locale support now. Simply export the LANG environment variable
+and set it to your language, and joe will follow that.
+
+More information
+----------------
+
+For further information about joe please see:
+
+  * joe manual page, joe(1)
+  * copying policy,
+	/usr/share/doc/joe/copyright
+  * changelog for Debian package,
+	/usr/share/doc/joe/changelog.Debian.gz
+  * joe's README:
+	/usr/share/doc/joe/README.gz
+  * any other files in /usr/share/doc/joe directory.
+
+ -- Michael Meskes <meskes@informatik.rwth-aachen.de>  Tue Jan  9 10:28:53 MET 1996
+    Josip Rodin <joy-packages@debian.org>  Pon Tra  3 01:55:49 CEST 2006
--- joe-3.7.orig/debian/source/format
+++ joe-3.7/debian/source/format
@@ -0,0 +1 @@
+1.0
--- joe-3.7.orig/syntax/php.jsf.in
+++ joe-3.7/syntax/php.jsf.in
@@ -105,12 +105,6 @@
   "\`"  idle
 	"\\"		string_bq_esc	recolor=-1
 
-:var_insqstring Var
-  *     string_sq recolor=-1
-  "a-zA-Z_" var_insqstring
-  "'" idle
-	"\\"		string_sq_esc	recolor=-1
-
 :maybe_method Methods
 	*		idle  recolor=-1
 	"?"		idle_qmark 
@@ -162,7 +156,6 @@
 
 :string_sq Constant_sq
 	*		string_sq
-	"$"     var_insqstring recolor=-1
 	"\'"		idle
 	"\\"		string_sq_esc	recolor=-1
 
--- joe-3.7.orig/syntax/mail.jsf.in
+++ joe-3.7/syntax/mail.jsf.in
@@ -1,188 +1,52 @@
 # JOE syntax highlight file for typical UNIX mail files
 # 2004-04-25 Tomas Szepe <szepe@pinerecords.com>
 
-# Improved to handle quote characters commonly seen on Usenet, and
-# highlighting of the more frequently edited mail and news headers, with
-# some sanity checking of the same.
-# 2004-06-26 Jeff Hurwit <darkmoon@verizon.net>
-
--
-
 =Idle
-=Head	bold
-=HdTo	red bg_white
-=HdFrom	bold red
-=HdSbj	bold magenta
-=HdDate	bold
-=HdRRT	black bg_white
-=HdGrp	bold white bg_red
-=HdFuT	bold red bg_yellow
-=HdBad	bold red
-=Quot1	green bg_white
-=Quot2	bold blue bg_white
-=Sign	bold magenta
+=Quot1	green
+=Quot2	cyan
+=Sign	magenta
 
-# Start in headers. We know we're out at the first blank line.
-
-:first Idle
-	*		hbol		noeat
+:newline Idle
+	*		knocolor
 	"\n"		newline
-	">|:~}#]"	newline		noeat
-
-# Require header
-#	"\n"		nohead
+	" "		newline
+	"\t"		newline
+	">"		q1trans		noeat
+	"-"		maybesign1
 
-:nohead HdBad
-	*		nohead
-
-:hbol Idle
-	*		hbad		recolor=-1
+:maybesign1 Idle
+	*		knocolor
 	"\n"		newline
-	"A-Z"		bufhdrs		buffer
-	"-"		newline		noeat
+	"-"		maybesign2
 
-:hbad HdBad
-	*		hbad
-	"\n"		hbol
-
-:hlbad HdBad
-	*		hbol
-
-:bufhdrs Idle
-	*		hbad		recolor=-1
-	"\n"		hlbad		noeat recolor=-2
-	"-_a-zA-Z0-9"	bufhdrs
-	":"		headers		hold
-
-:headers Idle
-	*		hbad		recolor=-1
-	" \n"		hnocolor	noeat strings
-	"To"		hsto		recolor=-2
-	"Cc"		hsto		recolor=-2
-	"Bcc"		hsto		recolor=-2
-	"From"		hsfrom		recolor=-2
-	"Subject"	hssbj		recolor=-2
-	"Date"		hsdate		recolor=-2
-	"Return-Receipt-To"	hsrrecp	recolor=-2
-	"Newsgroups"	hsgroups	recolor=-2
-	"Followup-To"	hsfolup		recolor=-2
-done
-
-:hnocolor Idle
-	*		hnocolor
-	"\n"		cont_nocolor
-
-:cont_nocolor Idle
-	*		hbol		noeat
-	" \t"		hnocolor	recolor=-1
-
-:hsto Head
-	*		hto
-	"\n"		hbol
-
-:hto HdTo
-	*		hto
-	"\n"		cont_to
-
-:cont_to HdTo
-	*		hbol		noeat
-	" \t"		hto		recolor=-1
-
-:hsfrom Head
-	*		hfrom
-	"\n"		hbol
-
-:hfrom HdFrom
-	*		hfrom
-	"\n"		hbol
-
-:hssbj Head
-	*		hsbj
-	"\n"		hbol
-
-:hsbj HdSbj
-	*		hsbj
-	"\n"		cont_sbj
-
-:cont_sbj HdSbj
-	*		hbol		noeat
-	" \t"		hsbj		recolor=-1
-
-:hsdate Head
-	*		hdate
-	"\n"		hbol
-
-:hdate HdDate
-	*		hdate
-	"\n"		hbol
-
-:hsrrecp Head
-	*		hrrecp
-	"\n"		hbol
-
-:hrrecp HdRRT
-	*		hrrecp
-	"\n"		hbol
-
-:hsgroups Head
-	*		hgroups
-	"\n"		hbol
-
-:hgroups HdGrp
-	*		hgroups
-	"\n"		hbol
-
-:hsfolup Head
-	*		hfolup
-	"\n"		hbol
-
-:hfolup HdFuT
-	*		hfolup
-	"\n"		hbol
-
-# body of the message
-
-:newline Idle
+:maybesign2 Idle
 	*		knocolor
 	"\n"		newline
-	">|:~}#]"	q1		recolor=-1
-	"-"		maybesign1	recolor=-1
-
-:maybesign1 Quot1
-	*		q1
-	" \t"		q1
-	"\n"		newline		recolor=-1
-	">|:~}#]"	q2		recolor=-1
-	"-"		maybesign2	recolor=-1
+	" "		maybesign3
 
-:maybesign2 Quot2
-	*		q2
-	"\t"		q2
-	"\n"		newline		recolor=-1
-	" "		maybesign3	recolor=-1
-	">|:~}#]"	q1		recolor=-1
-	"-"		knocolor	recolor=-3
-
-:maybesign3 Quot2
-	*		q2
-	" \t"		q2
-	"\n"		sign		recolor=-4
-	"->|:~}#]"	q1		recolor=-1
+:maybesign3 Idle
+	*		knocolor
+	"\n"		sign
 
 :sign Sign
 	*		sign
 
+:q1trans Quot1
+	*		q1		recolor=-1
+
 :q1 Quot1
 	*		kq1
 	"\n"		newline
-	" \t"		q1
-	"->|:~}#]"	q2		recolor=-1
+	" "		q1
+	"\t"		q1
+	">"		q2		recolor=-1
 
 :q2 Quot2
 	*		kq2
 	"\n"		newline
-	" \t"		q2
-	"->|:~}#]"	q1		recolor=-1
+	" "		q2
+	"\t"		q2
+	">"		q1		recolor=-1
 
 :knocolor Idle
 	*		knocolor
