From owner-ports-jp@jp.freebsd.org  Tue Nov 13 10:57:53 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id KAA23544;
	Tue, 13 Nov 2001 10:57:53 +0900 (JST)
	(envelope-from owner-ports-jp@jp.FreeBSD.org)
Received: from diana.infonets.hiroshima-u.ac.jp (diana.infonets.hiroshima-u.ac.jp [133.41.33.53])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id KAA23539
	for <ports-jp@jp.freebsd.org>; Tue, 13 Nov 2001 10:57:52 +0900 (JST)
	(envelope-from taoka@infonets.hiroshima-u.ac.jp)
Received: from peg.infonets.hiroshima-u.ac.jp (peg.infonets.hiroshima-u.ac.jp [133.41.33.64])
	by diana.infonets.hiroshima-u.ac.jp (8.11.1/3.7W) with ESMTP id fAD1vn011742;
	Tue, 13 Nov 2001 10:57:49 +0900 (JST)
Received: from localhost (localhost [127.0.0.1]) by peg.infonets.hiroshima-u.ac.jp (8.11.3/3.6W) with ESMTP
	id fAD1vm700634; Tue, 13 Nov 2001 10:57:48 +0900 (JST)
To: ports-jp@jp.freebsd.org
Cc: shige@FreeBSD.org
From: Satoshi TAOKA <taoka@infonets.hiroshima-u.ac.jp>
X-Mailer: Mew version 1.94.2 on Emacs 20.7 / Mule 4.0 (HANANOEN)
X-URL: http://www.infonets.hiroshima-u.ac.jp/~taoka/
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Message-Id: <20011113105748Q.taoka@infonets.hiroshima-u.ac.jp>
Date: Tue, 13 Nov 2001 10:57:48 +0900
X-Dispatcher: imput version 20000228(IM140)
Lines: 628
Reply-To: ports-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+010328
X-Sequence: ports-jp 11786
Subject: [ports-jp 11786] emacs20{,-dl} =?ISO-2022-JP?B?GyRCJE4bKEI=?=
 =?ISO-2022-JP?B?GyRCOVQ0VjJESlFCUDF+GyhC?= 
Errors-To: owner-ports-jp@jp.freebsd.org
Sender: owner-ports-jp@jp.freebsd.org
X-Originator: taoka@infonets.hiroshima-u.ac.jp


$BED2,$G$9!#(B

Emacsen $B$NCf$G!"(BEmacs20 $B$@$1$,!"9T4V$rJQ99$G$-$^$;$s!#%U%)%s%H$K$h$C$F(B
$B$O(B ($BFC$K(B16dot$B$N>l9g$K$O(B)$B!"Hs>o$K8+$K$/$$$G$9!#$G!"C5$7$?$i!"9T4V2DJQBP(B
$B1~%Q%C%A$,$"$j$^$7$?$N$G!"(Bemacs20{,-dl}$B$N(Bports$B$KH?1G$5$;$F$_$^$7$?!#(B

$B$?$@$7!"(B2$BE@$[$I!"1x$$$H$3$m$,$"$j$^$9!#(B

(1) $B$3$N%Q%C%A$r!"(Bfiles/patch-lsp $B$K$7$F$$$^$9!#%*%j%8%J%k$O(B

http://www.netlaputa.ne.jp/~kose/Emacs/Archives/emacs-20.5-linespace-patch.gz

$B$J$N$G$9$,!"$3$l$O(Bemcws-20.5-19991208$B$N%Q%C%A$,Ev$C$?8e$r2>Dj$7$F$$$k(B
$B$?$a!"@5$7$/Ev$j$^$;$s!#$G!":n$jD>$7$F!"(Bfiles/patch-lsp $B$H$7$^$7$?!#(B
gzip$B$7$F!"(BPATCHFILES $B$K;XDj$9$kJ}$,NI$$$N$G$7$g$&!#(B

(2) $B",$N%Q%C%A$G!"(Bemacs-20.7/lisp/startup.el $B$,99?7$5$l$k$N$G$9$,!"(B
emacs$B$r%@%s%W$9$kA0$K!"(B
$B$3$l$r%P%$%H%3%s%Q%$%k$7$J$1$l$P$J$j$^$;$s!#$=$N>uBV$G$O!"(Bemacs $B$,B8:_(B
$B$7$F$$$^$;$s!#(Bsrc/temacs$B$OB8:_$7$F$$$k$N$G$9$,!#$^$?!"(Bbytecompile$B$9$k%k!<%k(B
$B$O(BMakefile$B$K$OF~$C$F$J$$$h$&$G$9!#(B

$B$=$3$G!"4JC1$K$3$l$r<B8=$9$k$?$a$K!"(Bdo-build$B$G:n$C$?(B src/emacs $B$r;H$C(B
$B$F=hM}$9$k$h$&$K$7$^$7$?!#$=$l$,"-$G$9!#(B

post-build:
# to rebuild emacs because startup.elc should be updated
	cd ${WRKSRC}/lisp; \
	${WRKSRC}/src/emacs -batch -q -no-init-file \
			-f batch-byte-compile startup.el
	${RM} -f ${WRKSRC}/src/emacs ${WRKSRC}/src/emacs-20*
	cd ${WRKSRC}/src; ${MAKE}

$B$b$C$HNI$$(B($B<+A3$J(B)$BJ}K!$O!"(Bstartup.el $B$r(Bsrc/temacs $B$G%P%$(B
$B%H%3%s%Q%$%k$9$k%k!<%k$r!"(Bemacs-20.7/lisp/Makefile $B$^$?$O!"(B 
emacs-20.7/src/Makefile $B$J$I$K$$$l$F!"(Bdo-build $B$G!"0lH/$G(Bbuild$B$9$k$N$,(B
$BNI$$$N$G$7$g$&!#LLE]$J$N$G!"$3$N>uBV$K$7$F$$$^$9!#(B

$B$J$*!"$3$l$r9T$o$J$$$H!"%3%^%s%I%i%$%s$G$N<B9T$G!"(B

emacs-20.7 -lsp 4

$B$,$&$^$/9T$-$^$;$s!#(B.emacs$B$G$N(B

(setq default-frame-alist
    (append '((line-space . "1")) default-frame-alist))

$B$J$i!"$7$F$b!"$7$J$/$F$bNI$$$N$G$9$,!#(B

$B0J2<$r;n$7$F$/$@$5$$!#(B

Index: emacs20/Makefile
===================================================================
RCS file: /home/ncvs/ports/editors/emacs20/Makefile,v
retrieving revision 1.53
diff -u -r1.53 Makefile
--- emacs20/Makefile	2001/09/22 21:56:21	1.53
+++ emacs20/Makefile	2001/11/13 01:32:49
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	emacs
-PORTVERSION=	20.7
+PORTVERSION=	${EMACS_VER}
 CATEGORIES+=	editors ipv6
 MASTER_SITES=	${MASTER_SITE_GNU}
 MASTER_SITE_SUBDIR=	emacs
@@ -15,6 +15,7 @@
 
 USE_AUTOCONF=	yes
 USE_GMAKE=	yes
+EMACS_VER=	20.7
 CONFIGURE_TARGET=	${MACHINE_ARCH}--freebsd
 .if defined(WITHOUT_X11)
 CONFIGURE_ARGS=	--with-x=no --with-pop
@@ -22,13 +23,22 @@
 CONFIGURE_ARGS=	--with-x-toolkit --with-pop
 USE_XLIB=	yes
 .endif
+CONFIGURE_ARGS+=--with-line-space
 
 MAKE_ENV=	INSTALL_SCRIPT="${INSTALL_SCRIPT}"
 MAN1=		emacs.1 etags.1 ctags.1
-PLIST_SUB=	EMACS_VER=20.7 EMACS_ARCH=${CONFIGURE_TARGET}
+PLIST_SUB=	EMACS_VER=${EMACS_VER} EMACS_ARCH=${CONFIGURE_TARGET}
 #WRKSRC=		${WRKDIR}/emacs-20.7
 
 pre-build:
 	${RM} -rf ${WRKSRC}/info/*
+
+post-build:
+# to rebuild emacs because startup.elc should be updated
+	cd ${WRKSRC}/lisp; \
+	${WRKSRC}/src/emacs -batch -q -no-init-file \
+			-f batch-byte-compile startup.el
+	${RM} -f ${WRKSRC}/src/emacs ${WRKSRC}/src/emacs-20*
+	cd ${WRKSRC}/src; ${MAKE}
 
 .include <bsd.port.mk>
Index: emacs20/files/patch-lsp
===================================================================
RCS file: patch-lsp
diff -N patch-lsp
--- /dev/null	Tue Nov 13 10:09:45 2001
+++ patch-lsp	Mon Nov 12 11:18:06 2001
@@ -0,0 +1,242 @@
+The original patch is
+http://www.netlaputa.ne.jp/~kose/Emacs/Archives/emacs-20.5-linespace-patch.gz
+It is required emcws-20.5-19991208 and cannot be applied to the
+original emacs-20.7. So the following patch is modified for the
+original one.
+
+by Taoka <taoka@FreeBSD.org>
+
+diff -ur ../emacs-20.7.orig/configure.in ./configure.in
+--- ../emacs-20.7.orig/configure.in	Tue Jun  6 00:42:49 2000
++++ ./configure.in	Mon Nov 12 10:57:29 2001
+@@ -34,6 +34,9 @@
+ archlibdir='${libexecdir}/emacs/${version}/${configuration}'
+ docdir='${datadir}/emacs/${version}/etc'
+ 
++AC_ARG_WITH(line-space,
++[  --with-line-space       support line space feature],
++[AC_DEFINE(LINESPACE)])
+ AC_ARG_WITH(gcc,
+ [  --with-gcc              use GCC to compile Emacs])
+ AC_ARG_WITH(pop,
+diff -ur ../emacs-20.7.orig/lisp/startup.el ./lisp/startup.el
+--- ../emacs-20.7.orig/lisp/startup.el	Mon Aug  2 10:12:00 1999
++++ ./lisp/startup.el	Mon Nov 12 10:57:29 2001
+@@ -201,6 +201,9 @@
+     ("-vb" 0 x-handle-switch vertical-scroll-bars t)
+     ("-hb" 0 x-handle-switch horizontal-scroll-bars t)
+     ("-bd" 1 x-handle-switch)
++    ;; For LINESPACE
++    ("-lsp" 1 x-handle-switch line-space)
++    ;; end of patch
+     ("--border-width" 1 x-handle-numeric-switch border-width)
+     ("--display" 1 x-handle-display)
+     ("--name" 1 x-handle-name-switch)
+@@ -217,7 +220,10 @@
+     ("--xrm" 1 x-handle-xrm-switch)
+     ("--cursor-color" 1 x-handle-switch cursor-color)
+     ("--vertical-scroll-bars" 0 x-handle-switch vertical-scroll-bars t)
+-    ("--border-color" 1 x-handle-switch border-width))
++    ("--border-color" 1 x-handle-switch border-width)
++    ;; For LINESPACE
++    ("--line-space" 1 x-handle-switch line-space))
++    ;; end of patch
+   "Alist of X Windows options.
+ Each element has the form
+   (NAME NUMARGS HANDLER FRAME-PARAM VALUE)
+diff -ur ../emacs-20.7.orig/src/config.in ./src/config.in
+--- ../emacs-20.7.orig/src/config.in	Sat May 20 23:58:21 2000
++++ ./src/config.in	Mon Nov 12 10:57:29 2001
+@@ -262,6 +262,8 @@
+ #define INLINE
+ #endif
+ 
++#undef LINESPACE	        /* flag whether to enable line space feature */
++
+ #undef EMACS_CONFIGURATION
+ 
+ #undef EMACS_CONFIG_OPTIONS
+diff -ur ../emacs-20.7.orig/src/xfaces.c ./src/xfaces.c
+--- ../emacs-20.7.orig/src/xfaces.c	Wed Nov 18 10:36:41 1998
++++ ./src/xfaces.c	Mon Nov 12 10:57:30 2001
+@@ -789,6 +789,9 @@
+ 	if (height > biggest)
+ 	  biggest = height;
+       }
++#ifdef LINESPACE
++  biggest += f->output_data.x->upper_space + f->output_data.x->lower_space;
++#endif /* LINESPACE */
+ 
+   if (biggest == f->output_data.x->line_height)
+     return 0;
+diff -ur ../emacs-20.7.orig/src/xfns.c ./src/xfns.c
+--- ../emacs-20.7.orig/src/xfns.c	Thu Jul  1 09:09:39 1999
++++ ./src/xfns.c	Mon Nov 12 10:57:30 2001
+@@ -205,6 +205,9 @@
+ Lisp_Object Quser_position;
+ Lisp_Object Quser_size;
+ Lisp_Object Qdisplay;
++#ifdef LINESPACE
++Lisp_Object Qline_space;
++#endif /* LINESPACE */
+ 
+ /* The below are defined in frame.c.  */
+ extern Lisp_Object Qheight, Qminibuffer, Qname, Qonly, Qwidth;
+@@ -679,6 +682,9 @@
+ void x_set_icon_type ();
+ void x_set_icon_name ();
+ void x_set_font ();
++#ifdef LINESPACE
++void x_set_line_space ();
++#endif /* LINESPACE */
+ void x_set_border_width ();
+ void x_set_internal_border_width ();
+ void x_explicitly_set_name ();
+@@ -705,6 +711,9 @@
+   "icon-name", x_set_icon_name,
+   "icon-type", x_set_icon_type,
+   "internal-border-width", x_set_internal_border_width,
++#ifdef LINESPACE
++  "line-space", x_set_line_space,
++#endif /* LINESPACE */
+   "menu-bar-lines", x_set_menu_bar_lines,
+   "mouse-color", x_set_mouse_color,
+   "name", x_explicitly_set_name,
+@@ -1676,6 +1685,50 @@
+   call1 (Qface_set_after_frame_default, frame);
+ }
+ 
++#ifdef LINESPACE
++void
++x_set_line_space (f, arg, oldval)
++     struct frame *f;
++     Lisp_Object arg, oldval;
++{
++  int upper, lower;
++  char *s, *p;
++
++  CHECK_STRING (arg, 0);
++  s = (char *) XSTRING (arg)->data;
++
++  upper = lower = 0;
++  if (*s) {
++    if (*s != '+')
++      upper = atoi(s);
++    if (p = (char *) index (s, '+')) {
++      lower = atoi(p);
++    } else {
++      lower = upper - (upper / 2);
++      upper /= 2;
++    }
++  }
++  if (upper < 0) upper = 0;
++  if (lower < 0) lower = 0;
++
++  if (f->output_data.x->upper_space != upper
++      || f->output_data.x->lower_space != lower) {
++    f->output_data.x->line_height
++      += (upper - f->output_data.x->upper_space
++	  + lower - f->output_data.x->lower_space);
++    f->output_data.x->upper_space = upper;
++    f->output_data.x->lower_space = lower;
++    if (FRAME_X_WINDOW (f) != 0) {
++      BLOCK_INPUT;
++      x_set_window_size (f, 0, f->width, f->height);
++      XFlush (FRAME_X_DISPLAY (f));
++      UNBLOCK_INPUT;
++      SET_FRAME_GARBAGED (f);
++    }
++  }
++}
++#endif /* LINESPACE */
++
+ void
+ x_set_border_width (f, arg, oldval)
+      struct frame *f;
+@@ -3376,6 +3429,11 @@
+   xlwmenu_default_font = f->output_data.x->font;
+ #endif
+ 
++#ifdef LINESPACE
++  x_default_parameter (f, parms, Qline_space, build_string ("0"),
++		       "lineSpace", "LineSpace", string);
++#endif /* LINESPACE */
++
+   x_default_parameter (f, parms, Qborder_width, make_number (2),
+ 		       "borderWidth", "BorderWidth", number);
+   /* This defaults to 2 in order to match xterm.  We recognize either
+@@ -5315,6 +5373,10 @@
+   staticpro (&Quser_size);
+   Qdisplay = intern ("display");
+   staticpro (&Qdisplay);
++#ifdef LINESPACE
++  Qline_space = intern ("line-space");
++  staticpro (&Qline_space);
++#endif /* LINESPACE */ 
+   /* This is the end of symbol initialization.  */
+ 
+   Qface_set_after_frame_default = intern ("face-set-after-frame-default");
+diff -ur ../emacs-20.7.orig/src/xterm.c ./src/xterm.c
+--- ../emacs-20.7.orig/src/xterm.c	Mon Aug  2 09:16:43 1999
++++ ./src/xterm.c	Mon Nov 12 10:57:30 2001
+@@ -724,10 +724,17 @@
+ 	    font = (XFontStruct *) (fontp->font);
+ 	    gc = FACE_NON_ASCII_GC (face);
+ 	    XSetFont (FRAME_X_DISPLAY (f), gc, font->fid);
++#ifdef LINESPACE
++	    baseline
++	      = (font->max_byte1 != 0
++		 ? (line_height + f->output_data.x->upper_space - f->output_data.x->lower_space + font->ascent - font->descent) / 2
++		 : f->output_data.x->font_baseline - fontp->baseline_offset);
++#else
+ 	    baseline
+ 	      = (font->max_byte1 != 0
+ 		 ? (line_height + font->ascent - font->descent) / 2
+ 		 : f->output_data.x->font_baseline - fontp->baseline_offset);
++#endif /* LINESPACE */
+ 	    if (FONT_HEIGHT (font) <= line_height
+ 		&& (font->ascent > baseline
+ 		    || font->descent > line_height - baseline))
+@@ -795,7 +802,11 @@
+ 		font = FACE_FONT (face);
+ 		if (!font || font == (XFontStruct *) FACE_DEFAULT)
+ 		  font = f->output_data.x->font;
++#ifdef LINESPACE
++		baseline = FONT_BASE (f->output_data.x->font) + f->output_data.x->upper_space;
++#else
+ 		baseline = FONT_BASE (f->output_data.x->font);
++#endif /* LINESPACE */
+ 		if (charset == charset_latin_iso8859_1)
+ 		  {
+ 		    if (font->max_char_or_byte2 < 0x80)
+@@ -5419,7 +5430,12 @@
+   else
+     /* If we are setting a new frame's font for the first time,
+        there are no faces yet, so this font's height is the line height.  */
++#ifdef LINESPACE
++    f->output_data.x->line_height = FONT_HEIGHT (f->output_data.x->font)
++      + f->output_data.x->upper_space + f->output_data.x->lower_space;
++#else
+     f->output_data.x->line_height = FONT_HEIGHT (f->output_data.x->font);
++#endif /* LINESPACE */
+ 
+   return build_string (fontp->full_name);
+ }
+diff -ur ../emacs-20.7.orig/src/xterm.h ./src/xterm.h
+--- ../emacs-20.7.orig/src/xterm.h	Sun Aug 16 07:58:10 1998
++++ ./src/xterm.h	Mon Nov 12 10:57:30 2001
+@@ -348,6 +348,14 @@
+   /* Height of a line, in pixels.  */
+   int line_height;
+ 
++#ifdef LINESPACE
++  /* Upper space of each line, in pixels. */
++  int upper_space;
++
++  /* Lower space of each line, in pixels. */
++  int lower_space;
++#endif /* LINESPACE */
++
+   /* The tiled border used when the mouse is out of the frame.  */
+   Pixmap border_tile;
+ 
Index: emacs20-dl/Makefile
===================================================================
RCS file: /home/ncvs/ports/editors/emacs20-dl/Makefile,v
retrieving revision 1.23
diff -u -r1.23 Makefile
--- emacs20-dl/Makefile	2001/05/09 17:51:19	1.23
+++ emacs20-dl/Makefile	2001/11/13 01:14:36
@@ -38,6 +38,7 @@
 .else
 CONFIGURE_ARGS=	--with-x=no --with-pop
 .endif
+CONFIGURE_ARGS+=--with-line-space
 
 # for XIM extension
 XIM_PATCH=	emacs20-xim-20000713
@@ -70,6 +71,14 @@
 pre-build:
 	@${RM} -rf ${WRKSRC}/info/*
 	@${LN} -sf DOC ${WRKSRC}/etc/${DOC_FILE}
+
+post-build:
+# to rebuild emacs because startup.elc should be updated
+	cd ${WRKSRC}/lisp; \
+	${WRKSRC}/src/emacs -batch -q -no-init-file \
+			-f batch-byte-compile startup.el
+	${RM} -f ${WRKSRC}/src/emacs ${WRKSRC}/src/emacs-20*
+	cd ${WRKSRC}/src; ${MAKE}
 
 do-install:
 	@${INSTALL} -c -s -m 555 -o root -g wheel ${WRKSRC}/src/emacs ${PREFIX}/bin/emacs-dl-${EMACS_VER}
Index: emacs20-dl/files/patch-lsp
===================================================================
RCS file: patch-lsp
diff -N patch-lsp
--- /dev/null	Tue Nov 13 10:09:45 2001
+++ patch-lsp	Mon Nov 12 11:18:06 2001
@@ -0,0 +1,242 @@
+The original patch is
+http://www.netlaputa.ne.jp/~kose/Emacs/Archives/emacs-20.5-linespace-patch.gz
+It is required emcws-20.5-19991208 and cannot be applied to the
+original emacs-20.7. So the following patch is modified for the
+original one.
+
+by Taoka <taoka@FreeBSD.org>
+
+diff -ur ../emacs-20.7.orig/configure.in ./configure.in
+--- ../emacs-20.7.orig/configure.in	Tue Jun  6 00:42:49 2000
++++ ./configure.in	Mon Nov 12 10:57:29 2001
+@@ -34,6 +34,9 @@
+ archlibdir='${libexecdir}/emacs/${version}/${configuration}'
+ docdir='${datadir}/emacs/${version}/etc'
+ 
++AC_ARG_WITH(line-space,
++[  --with-line-space       support line space feature],
++[AC_DEFINE(LINESPACE)])
+ AC_ARG_WITH(gcc,
+ [  --with-gcc              use GCC to compile Emacs])
+ AC_ARG_WITH(pop,
+diff -ur ../emacs-20.7.orig/lisp/startup.el ./lisp/startup.el
+--- ../emacs-20.7.orig/lisp/startup.el	Mon Aug  2 10:12:00 1999
++++ ./lisp/startup.el	Mon Nov 12 10:57:29 2001
+@@ -201,6 +201,9 @@
+     ("-vb" 0 x-handle-switch vertical-scroll-bars t)
+     ("-hb" 0 x-handle-switch horizontal-scroll-bars t)
+     ("-bd" 1 x-handle-switch)
++    ;; For LINESPACE
++    ("-lsp" 1 x-handle-switch line-space)
++    ;; end of patch
+     ("--border-width" 1 x-handle-numeric-switch border-width)
+     ("--display" 1 x-handle-display)
+     ("--name" 1 x-handle-name-switch)
+@@ -217,7 +220,10 @@
+     ("--xrm" 1 x-handle-xrm-switch)
+     ("--cursor-color" 1 x-handle-switch cursor-color)
+     ("--vertical-scroll-bars" 0 x-handle-switch vertical-scroll-bars t)
+-    ("--border-color" 1 x-handle-switch border-width))
++    ("--border-color" 1 x-handle-switch border-width)
++    ;; For LINESPACE
++    ("--line-space" 1 x-handle-switch line-space))
++    ;; end of patch
+   "Alist of X Windows options.
+ Each element has the form
+   (NAME NUMARGS HANDLER FRAME-PARAM VALUE)
+diff -ur ../emacs-20.7.orig/src/config.in ./src/config.in
+--- ../emacs-20.7.orig/src/config.in	Sat May 20 23:58:21 2000
++++ ./src/config.in	Mon Nov 12 10:57:29 2001
+@@ -262,6 +262,8 @@
+ #define INLINE
+ #endif
+ 
++#undef LINESPACE	        /* flag whether to enable line space feature */
++
+ #undef EMACS_CONFIGURATION
+ 
+ #undef EMACS_CONFIG_OPTIONS
+diff -ur ../emacs-20.7.orig/src/xfaces.c ./src/xfaces.c
+--- ../emacs-20.7.orig/src/xfaces.c	Wed Nov 18 10:36:41 1998
++++ ./src/xfaces.c	Mon Nov 12 10:57:30 2001
+@@ -789,6 +789,9 @@
+ 	if (height > biggest)
+ 	  biggest = height;
+       }
++#ifdef LINESPACE
++  biggest += f->output_data.x->upper_space + f->output_data.x->lower_space;
++#endif /* LINESPACE */
+ 
+   if (biggest == f->output_data.x->line_height)
+     return 0;
+diff -ur ../emacs-20.7.orig/src/xfns.c ./src/xfns.c
+--- ../emacs-20.7.orig/src/xfns.c	Thu Jul  1 09:09:39 1999
++++ ./src/xfns.c	Mon Nov 12 10:57:30 2001
+@@ -205,6 +205,9 @@
+ Lisp_Object Quser_position;
+ Lisp_Object Quser_size;
+ Lisp_Object Qdisplay;
++#ifdef LINESPACE
++Lisp_Object Qline_space;
++#endif /* LINESPACE */
+ 
+ /* The below are defined in frame.c.  */
+ extern Lisp_Object Qheight, Qminibuffer, Qname, Qonly, Qwidth;
+@@ -679,6 +682,9 @@
+ void x_set_icon_type ();
+ void x_set_icon_name ();
+ void x_set_font ();
++#ifdef LINESPACE
++void x_set_line_space ();
++#endif /* LINESPACE */
+ void x_set_border_width ();
+ void x_set_internal_border_width ();
+ void x_explicitly_set_name ();
+@@ -705,6 +711,9 @@
+   "icon-name", x_set_icon_name,
+   "icon-type", x_set_icon_type,
+   "internal-border-width", x_set_internal_border_width,
++#ifdef LINESPACE
++  "line-space", x_set_line_space,
++#endif /* LINESPACE */
+   "menu-bar-lines", x_set_menu_bar_lines,
+   "mouse-color", x_set_mouse_color,
+   "name", x_explicitly_set_name,
+@@ -1676,6 +1685,50 @@
+   call1 (Qface_set_after_frame_default, frame);
+ }
+ 
++#ifdef LINESPACE
++void
++x_set_line_space (f, arg, oldval)
++     struct frame *f;
++     Lisp_Object arg, oldval;
++{
++  int upper, lower;
++  char *s, *p;
++
++  CHECK_STRING (arg, 0);
++  s = (char *) XSTRING (arg)->data;
++
++  upper = lower = 0;
++  if (*s) {
++    if (*s != '+')
++      upper = atoi(s);
++    if (p = (char *) index (s, '+')) {
++      lower = atoi(p);
++    } else {
++      lower = upper - (upper / 2);
++      upper /= 2;
++    }
++  }
++  if (upper < 0) upper = 0;
++  if (lower < 0) lower = 0;
++
++  if (f->output_data.x->upper_space != upper
++      || f->output_data.x->lower_space != lower) {
++    f->output_data.x->line_height
++      += (upper - f->output_data.x->upper_space
++	  + lower - f->output_data.x->lower_space);
++    f->output_data.x->upper_space = upper;
++    f->output_data.x->lower_space = lower;
++    if (FRAME_X_WINDOW (f) != 0) {
++      BLOCK_INPUT;
++      x_set_window_size (f, 0, f->width, f->height);
++      XFlush (FRAME_X_DISPLAY (f));
++      UNBLOCK_INPUT;
++      SET_FRAME_GARBAGED (f);
++    }
++  }
++}
++#endif /* LINESPACE */
++
+ void
+ x_set_border_width (f, arg, oldval)
+      struct frame *f;
+@@ -3376,6 +3429,11 @@
+   xlwmenu_default_font = f->output_data.x->font;
+ #endif
+ 
++#ifdef LINESPACE
++  x_default_parameter (f, parms, Qline_space, build_string ("0"),
++		       "lineSpace", "LineSpace", string);
++#endif /* LINESPACE */
++
+   x_default_parameter (f, parms, Qborder_width, make_number (2),
+ 		       "borderWidth", "BorderWidth", number);
+   /* This defaults to 2 in order to match xterm.  We recognize either
+@@ -5315,6 +5373,10 @@
+   staticpro (&Quser_size);
+   Qdisplay = intern ("display");
+   staticpro (&Qdisplay);
++#ifdef LINESPACE
++  Qline_space = intern ("line-space");
++  staticpro (&Qline_space);
++#endif /* LINESPACE */ 
+   /* This is the end of symbol initialization.  */
+ 
+   Qface_set_after_frame_default = intern ("face-set-after-frame-default");
+diff -ur ../emacs-20.7.orig/src/xterm.c ./src/xterm.c
+--- ../emacs-20.7.orig/src/xterm.c	Mon Aug  2 09:16:43 1999
++++ ./src/xterm.c	Mon Nov 12 10:57:30 2001
+@@ -724,10 +724,17 @@
+ 	    font = (XFontStruct *) (fontp->font);
+ 	    gc = FACE_NON_ASCII_GC (face);
+ 	    XSetFont (FRAME_X_DISPLAY (f), gc, font->fid);
++#ifdef LINESPACE
++	    baseline
++	      = (font->max_byte1 != 0
++		 ? (line_height + f->output_data.x->upper_space - f->output_data.x->lower_space + font->ascent - font->descent) / 2
++		 : f->output_data.x->font_baseline - fontp->baseline_offset);
++#else
+ 	    baseline
+ 	      = (font->max_byte1 != 0
+ 		 ? (line_height + font->ascent - font->descent) / 2
+ 		 : f->output_data.x->font_baseline - fontp->baseline_offset);
++#endif /* LINESPACE */
+ 	    if (FONT_HEIGHT (font) <= line_height
+ 		&& (font->ascent > baseline
+ 		    || font->descent > line_height - baseline))
+@@ -795,7 +802,11 @@
+ 		font = FACE_FONT (face);
+ 		if (!font || font == (XFontStruct *) FACE_DEFAULT)
+ 		  font = f->output_data.x->font;
++#ifdef LINESPACE
++		baseline = FONT_BASE (f->output_data.x->font) + f->output_data.x->upper_space;
++#else
+ 		baseline = FONT_BASE (f->output_data.x->font);
++#endif /* LINESPACE */
+ 		if (charset == charset_latin_iso8859_1)
+ 		  {
+ 		    if (font->max_char_or_byte2 < 0x80)
+@@ -5419,7 +5430,12 @@
+   else
+     /* If we are setting a new frame's font for the first time,
+        there are no faces yet, so this font's height is the line height.  */
++#ifdef LINESPACE
++    f->output_data.x->line_height = FONT_HEIGHT (f->output_data.x->font)
++      + f->output_data.x->upper_space + f->output_data.x->lower_space;
++#else
+     f->output_data.x->line_height = FONT_HEIGHT (f->output_data.x->font);
++#endif /* LINESPACE */
+ 
+   return build_string (fontp->full_name);
+ }
+diff -ur ../emacs-20.7.orig/src/xterm.h ./src/xterm.h
+--- ../emacs-20.7.orig/src/xterm.h	Sun Aug 16 07:58:10 1998
++++ ./src/xterm.h	Mon Nov 12 10:57:30 2001
+@@ -348,6 +348,14 @@
+   /* Height of a line, in pixels.  */
+   int line_height;
+ 
++#ifdef LINESPACE
++  /* Upper space of each line, in pixels. */
++  int upper_space;
++
++  /* Lower space of each line, in pixels. */
++  int lower_space;
++#endif /* LINESPACE */
++
+   /* The tiled border used when the mouse is out of the frame.  */
+   Pixmap border_tile;
+ 
