Xref: utzoo comp.emacs:8082 gnu.emacs:2632 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucsd!ames!decwrl!shelby!neon!Neon.Stanford.EDU!yossi From: yossi@Neon.Stanford.EDU (Joseph Friedman) Newsgroups: comp.emacs,gnu.emacs Subject: Hebrew support for GNU Emacs/Epoch under X11 (part 02 of 02) Keywords: Semitic languages, Emacs, X Windows Message-ID: <1990Apr8.182136.25283@Neon.Stanford.EDU> Date: 8 Apr 90 18:21:36 GMT Sender: yossi@Neon.Stanford.EDU (Joseph Friedman) Organization: Computer Science Department, Stanford University Lines: 1149 Looks like Emacs is going International. I heard of a Japanese Emacs, and recently there have been some postings about a Swedish Emacs. Well, I'd like to contribute my stuff: Hebrew Emacs (and I hope that somehow all these foreign dialects will make it to version 19). The basic problem with Hebrew is that, like other Semitic languages, you write it from right to left. The other problem is that Hebrew fonts share nothing with Roman fonts, so I had to use a 256-character font. I enclose a sample Hebrew X11 screen font, as well as patches to both GNU Emacs 18.55 and Epoch 3.1. Enjoy! Oh, and please report any problems to me. -yossi -----------------8<-----------------------8<----------------- #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh 'emacs-18.55/patch-src' <<'END_OF_FILE' X*** buffer.c.orig Thu Jul 20 15:36:02 1989 X--- buffer.c Sat Apr 7 10:52:58 1990 X*************** X*** 1098,1107 **** X--- 1098,1109 ---- X buffer_defaults.abbrev_table = Qnil; X X XFASTINT (buffer_defaults.tab_width) = 8; X buffer_defaults.truncate_lines = Qnil; X buffer_defaults.ctl_arrow = Qt; X+ buffer_defaults.display_literal = Qnil; /* yossi */ X+ buffer_defaults.display_reversed = Qnil; /* yossi */ X X XFASTINT (buffer_defaults.fill_column) = 70; X XFASTINT (buffer_defaults.left_margin) = 0; X X /* Assign the local-flags to the slots that have default values. X*************** X*** 1134,1143 **** X--- 1136,1147 ---- X XFASTINT (buffer_local_flags.truncate_lines) = 0x100; X XFASTINT (buffer_local_flags.ctl_arrow) = 0x200; X XFASTINT (buffer_local_flags.fill_column) = 0x400; X XFASTINT (buffer_local_flags.left_margin) = 0x800; X XFASTINT (buffer_local_flags.abbrev_table) = 0x1000; X+ XFASTINT (buffer_local_flags.display_literal) = 0x2000; /* yossi */ X+ XFASTINT (buffer_local_flags.display_reversed) = 0x4000; /* yossi */ X X Vbuffer_alist = Qnil; X bf_cur = 0; X all_buffers = 0; X X*************** X*** 1207,1216 **** X--- 1211,1230 ---- X DEFVAR_LISP_NOPRO ("default-ctl-arrow", X &buffer_defaults.ctl_arrow, X "Default ctl-arrow for buffers that do not override it.\n\ X This is the same as (default-value 'ctl-arrow)."); X X+ DEFVAR_LISP_NOPRO ("default-display-literal", /* yossi */ X+ &buffer_defaults.display_literal, X+ "Default display-literal for buffers that do not override it.\n\ X+ This is the same as (default-value 'display-literal)."); X+ X+ DEFVAR_LISP_NOPRO ("default-display-reversed", /* yossi */ X+ &buffer_defaults.display_reversed, X+ "Default display-reversed for buffers that do not override it.\n\ X+ This is the same as (default-value 'display-reversed)."); X+ X DEFVAR_LISP_NOPRO ("default-truncate-lines", X &buffer_defaults.truncate_lines, X "Default truncate-lines for buffers that do not override it.\n\ X This is the same as (default-value 'truncate-lines)."); X X*************** X*** 1298,1307 **** X--- 1312,1332 ---- X X DEFVAR_PER_BUFFER ("ctl-arrow", &bf_cur->ctl_arrow, X "*Non-nil means display control chars with uparrow.\n\ X Nil means use backslash and octal digits.\n\ X Automatically becomes local when set in any fashion."); X+ X+ DEFVAR_PER_BUFFER ("display-literal", &bf_cur->display_literal, /* yossi */ X+ "*Non-nil means display the characters in the buffer as they are,\n\ X+ even when ther are \"nonprintable\" ascii.\n\ X+ Nil means display using ctl-arrow for the low nonprintables, and use\n\ X+ backslash and octal digits for the high nonprintables.\n\ X+ Automatically becomes local when set in any fashion."); X+ X+ DEFVAR_PER_BUFFER ("display-reversed", &bf_cur->display_reversed, /* yossi */ X+ "*Non-nil means display each line of the buffer in reversed order,\n\ X+ useful for editing texts in Semitic languages which write right-to-left."); X X DEFVAR_PER_BUFFER ("truncate-lines", &bf_cur->truncate_lines, X "*Non-nil means do not display continuation lines;\n\ X give each line of text one screen line.\n\ X Automatically becomes local when set in any fashion.\n\ X*** buffer.h.orig Sun Feb 8 06:35:54 1987 X--- buffer.h Sat Apr 7 10:55:10 1990 X*************** X*** 140,149 **** X--- 140,155 ---- X X /* Non-nil means do not display continuation lines */ X Lisp_Object truncate_lines; X /* Non-nil means display ctl chars with uparrow */ X Lisp_Object ctl_arrow; X+ /* yossi-- Non-nil means display the characters in the buffer as they are, X+ even when they are "nonprintable" ascii. This is particularly useful X+ for fonts which have more than 128 characters */ X+ Lisp_Object display_literal; X+ /* yossi-- Non-nil means reverse each line of the buffer, for Semitics */ X+ Lisp_Object display_reversed; X /* Non-nil means do selective display; X See doc string in syms_of_buffer (buffer.c) for details. */ X Lisp_Object selective_display; X /* Non-nil means show ... at end of line followed by invisible lines. */ X Lisp_Object selective_display_ellipses; X*** dispnew.c.orig Sat Aug 12 09:30:37 1989 X--- dispnew.c Sat Apr 7 11:33:47 1990 X*************** X*** 522,532 **** X XFASTINT (w->last_modified) = bf_modified; X X reassert_line_highlight (0, cursY); X write_chars (p->body + hpos, 1); X fflush (stdout); X! ++cursX; X p->length = max (p->length, cursX); X p->body[p->length] = 0; X return 1; X } X X--- 522,532 ---- X XFASTINT (w->last_modified) = bf_modified; X X reassert_line_highlight (0, cursY); X write_chars (p->body + hpos, 1); X fflush (stdout); X! cursX += (NULL(XBUFFER(w->buffer)->display_reversed))? 1: -1; /* yossi */ X p->length = max (p->length, cursX); X p->body[p->length] = 0; X return 1; X } X X*************** X*** 538,548 **** X X /* Avoid losing if cursor is in invisible text off left margin */ X if (XINT (w->hscroll) && cursX == XFASTINT (w->left)) X return 0; X X! cursX += n; X XFASTINT (w->last_point_x) = cursX; X XFASTINT (w->last_point) = point; X topos (cursY, cursX); X fflush (stdout); X return 1; X--- 538,548 ---- X X /* Avoid losing if cursor is in invisible text off left margin */ X if (XINT (w->hscroll) && cursX == XFASTINT (w->left)) X return 0; X X! cursX += (NULL(XBUFFER(w->buffer)->display_reversed))? n: -n; /* yossi */ X XFASTINT (w->last_point_x) = cursX; X XFASTINT (w->last_point) = point; X topos (cursY, cursX); X fflush (stdout); X return 1; X*** indent.c.orig Mon Aug 15 19:51:14 1988 X--- indent.c Sat Apr 7 11:05:28 1990 X*************** X*** 66,75 **** X--- 66,76 ---- X register unsigned char *ptr, *stop, c; X register int tab_seen; X register int post_tab; X register int tab_width = XINT (bf_cur->tab_width); X int ctl_arrow = !NULL (bf_cur->ctl_arrow); X+ int display_literal = !NULL (bf_cur->display_literal); /* yossi */ X X if (point == last_known_column_point X && bf_modified == last_known_column_modified) X return last_known_column; X X*************** X*** 106,115 **** X--- 107,120 ---- X X post_tab += col; X col = 0; X tab_seen = 1; X } X+ else if (display_literal) /* yossi */ X+ { X+ col++; X+ } X else X col += (ctl_arrow && c < 0200) ? 2 : 4; X } X X if (tab_seen) X*************** X*** 230,239 **** X--- 235,245 ---- X register int col = current_column (); X register int goal; X register int end = NumCharacters; X register int tab_width = XINT (bf_cur->tab_width); X register int ctl_arrow = !NULL (bf_cur->ctl_arrow); X+ register int display_literal = !NULL (bf_cur->display_literal); /* yossi */ X X Lisp_Object val; X X if (tab_width <= 0 || tab_width > 20) tab_width = 8; X CHECK_NUMBER (column, 0); X*************** X*** 256,268 **** X if (c == '\t') X { X col += tab_width - 1; X col = col / tab_width * tab_width; X } X! else if (ctl_arrow && (c < 040 || c == 0177)) X col++; X! else if (c < 040 || c >= 0177) X col += 3; X } X X SetPoint (pos); X X--- 262,274 ---- X if (c == '\t') X { X col += tab_width - 1; X col = col / tab_width * tab_width; X } X! else if ((!display_literal) && ctl_arrow && (c < 040 || c == 0177)) /* yossi */ X col++; X! else if ((!display_literal) && (c < 040 || c >= 0177)) /* yossi */ X col += 3; X } X X SetPoint (pos); X X*************** X*** 305,314 **** X--- 311,321 ---- X register int target = tohpos + (tovpos << SHORTBITS); X register int pos; X register int c; X register int tab_width = XFASTINT (bf_cur->tab_width); X register int ctl_arrow = !NULL (bf_cur->ctl_arrow); X+ register int display_literal = !NULL (bf_cur->display_literal); /* yossi */ X int selective X = XTYPE (bf_cur->selective_display) == Lisp_Int X ? XINT (bf_cur->selective_display) X : !NULL (bf_cur->selective_display) ? -1 : 0; X int prevpos; X*************** X*** 367,376 **** X--- 374,385 ---- X cpos += 4; X if (HPOS (cpos) >= width) X cpos -= HPOS (cpos) - width; X } X } X+ else if (display_literal) /* yossi */ X+ cpos++; X else X cpos += (ctl_arrow && c < 0200) ? 2 : 4; X X if (HPOS (cpos) >= width X && (HPOS (cpos) > width X*** xdisp.c.orig Wed Apr 26 13:13:59 1989 X--- xdisp.c Sun Apr 8 07:35:40 1990 X*************** X*** 391,400 **** X--- 391,407 ---- X - (XFASTINT (w->width) + XFASTINT (w->left) != screen_width), X XINT (w->hscroll), 0); X if (pos.vpos < 1) X { X cursX = max (XFASTINT (w->left), pos.hpos); X+ if (!NULL(XBUFFER(w->buffer)->display_reversed)) { /* yossi */ X+ register int width = XFASTINT (w->width) - 1 X+ - (XFASTINT(w->width) + XFASTINT(w->left) != screen_width); X+ X+ cursX = XFASTINT(w->left) + width - X+ (cursX - XFASTINT(w->left)); X+ } X cursY = this_line_vpos; X goto update; X } X else X goto cancel; X*************** X*** 520,529 **** X--- 527,562 ---- X /* t is unequal to any useful value of Voverlay_arrow_... */ X last_arrow_position = Qt; X last_arrow_string = Qt; X } X } X+ X+ /* X+ * yossi-- the following function is a simplified version of Denys Duchier's X+ * epoch::redisplay-screen, stolen from Epoch 3.1. X+ */ X+ DEFUN ("x-smart-redisplay",Fx_smart_redisplay,Sx_smart_redisplay,0,0,"", X+ "Perform a smart redisplay of the screen.") X+ () X+ { X+ Lisp_Object root_window = XWINDOW (minibuf_window)->prev; X+ int modified = bf_text.modified++; X+ X+ windows_or_buffers_changed++; X+ X+ hold_window_change(); X+ if (interrupt_input) unrequest_sigio(); X+ X+ redisplay_window(root_window,0); X+ update_screen(1,1); X+ X+ bf_text.modified = modified; X+ unhold_window_change(); X+ if (interrupt_input) request_sigio(); X+ X+ return Qnil; X+ } X X int do_id = 1; X X /* Do full redisplay of one or all windows. X This does not include updating the screen; X*************** X*** 638,647 **** X--- 671,687 ---- X lpoint = point; X X if (EQ (window, selected_window)) X { X cursX = max (0, pos.hpos) + XFASTINT (w->left); X+ if (!NULL(XBUFFER(w->buffer)->display_reversed)) { /* yossi */ X+ register int width = XFASTINT (w->width) - 1 X+ - (XFASTINT(w->width) + XFASTINT(w->left) != screen_width); X+ X+ cursX = XFASTINT(w->left) + width - X+ (cursX - XFASTINT(w->left)); X+ } X cursY = pos.vpos + XFASTINT (w->top); X } X } X goto done; X } X*************** X*** 669,678 **** X--- 709,725 ---- X /* Ok, point is still on screen */ X if (w == XWINDOW (selected_window)) X { X /* These variables are supposed to be origin 1 */ X cursX = max (0, pos.hpos) + XFASTINT (w->left); X+ if (!NULL(XBUFFER(w->buffer)->display_reversed)) { /* yossi */ X+ register int width = XFASTINT (w->width) - 1 X+ - (XFASTINT(w->width) + XFASTINT(w->left) != screen_width); X+ X+ cursX = XFASTINT(w->left) + width - X+ (cursX - XFASTINT(w->left)); X+ } X cursY = pos.vpos + XFASTINT (w->top); X } X /* This doesn't do the trick, because if a window to the right of X this one must be redisplayed, this does nothing because there X is nothing in DesiredScreen yet, and then the other window is X*************** X*** 1148,1157 **** X--- 1195,1211 ---- X point_vpos = val.vpos + top; X point_hpos = val.hpos + XFASTINT (w->left); X } X X cursX = max (0, point_hpos); X+ if (!NULL(XBUFFER(w->buffer)->display_reversed)) { /* yossi */ X+ register int width = XFASTINT (w->width) - 1 X+ - (XFASTINT(w->width) + XFASTINT(w->left) != screen_width); X+ X+ cursX = XFASTINT(w->left) + width - X+ (cursX - XFASTINT(w->left)); X+ } X cursY = point_vpos; X X if (debug_end_pos) X { X val = *compute_motion (start, 0, lmargin, NumCharacters + 1, X*************** X*** 1202,1211 **** X--- 1256,1266 ---- X register char *startp; X register char *p1prev; X register struct display_line *line; X int tab_width = XINT (bf_cur->tab_width); X int ctl_arrow = !NULL (bf_cur->ctl_arrow); X+ int display_literal = !NULL (bf_cur->display_literal); /* yossi */ X int width = XFASTINT (w->width) - 1 X - (XFASTINT (w->width) + XFASTINT (w->left) != screen_width); X struct position val; X int lastpos; X int invis; X*************** X*** 1317,1326 **** X--- 1372,1387 ---- X p1 = endp; X strncpy (p1prev, " ...", p1 - p1prev); X } X break; X } X+ else if (display_literal) /* yossi */ X+ { X+ if (p1 >= startp) X+ *p1 = c; X+ p1++; X+ } X else if (c < 0200 && ctl_arrow) X { X if (p1 >= startp) X *p1 = '^'; X p1++; X*************** X*** 1468,1477 **** X--- 1529,1562 ---- X line->length = len + startp - line->body; X } X X val.bufpos = pos; X val_display_text_line = val; X+ X+ /* yossi-- reverse the line if necessary */ X+ if (!NULL(bf_cur->display_reversed)) { X+ char *p2, t; X+ X+ if (p1 < endp + 1) { X+ while (p1 <= endp) *p1++ = ' '; X+ line->length = max(line->length, p1 - line->body); X+ line->body[line->length] = 0; X+ } X+ X+ /* reverse the line */ X+ for (p1 = startp, p2 = startp + width; p1 < p2; p1++, --p2) { X+ t = *p1; X+ *p1 = *p2; X+ *p2 = t; X+ } X+ X+ /* reverse the position of point if necessary */ X+ if ((point_vpos == vpos) && (w == XWINDOW (selected_window))) X+ cursX = XFASTINT(w->left) + width - X+ (cursX - XFASTINT(w->left)); X+ } X+ X return &val_display_text_line; X } X X /* Display the mode line for window w */ X X*************** X*** 1916,1925 **** X--- 2001,2016 ---- X *p1 = ' '; X p1++; X } X while ((p1 - start + hscroll - (hscroll > 0)) % tab_width); X } X+ else if (buffer_defaults.display_literal) /* yossi */ X+ { X+ if (p1 >= start) X+ *p1 = c; X+ p1++; X+ } X else if (c < 0200 && buffer_defaults.ctl_arrow) X { X if (p1 >= start) X *p1 = '^'; X p1++; X*************** X*** 2005,2014 **** X--- 2096,2106 ---- X DEFVAR_BOOL ("mode-line-inverse-video", &mode_line_inverse_video, X "*Non-nil means use inverse video, or other suitable display mode, for the mode line."); X mode_line_inverse_video = 1; X X defsubr (&Sredraw_display); X+ defsubr (&Sx_smart_redisplay); /* yossi */ X } X X /* initialize the window system */ X init_xdisp () X { X*** keyboard.c.orig Wed Jul 19 22:32:59 1989 X--- keyboard.c Sat Apr 7 11:29:56 1990 X*************** X*** 591,601 **** X { X if (EQ (cmd, Qforward_char) && point <= NumCharacters) X { X lose = CharAt (point); X SetPoint (point + 1); X! if (lose >= ' ' && lose < 0177 X && (XFASTINT (XWINDOW (selected_window)->last_modified) X >= bf_modified) X && (XFASTINT (XWINDOW (selected_window)->last_point) X == point) X && !windows_or_buffers_changed X--- 591,602 ---- X { X if (EQ (cmd, Qforward_char) && point <= NumCharacters) X { X lose = CharAt (point); X SetPoint (point + 1); X! if (((lose >= ' ' && lose < 0177) || X! !NULL(bf_cur->display_literal)) /* yossi */ X && (XFASTINT (XWINDOW (selected_window)->last_modified) X >= bf_modified) X && (XFASTINT (XWINDOW (selected_window)->last_point) X == point) X && !windows_or_buffers_changed X*************** X*** 607,617 **** X } X else if (EQ (cmd, Qbackward_char) && point > FirstCharacter) X { X SetPoint (point - 1); X lose = CharAt (point); X! if (lose >= ' ' && lose < 0177 X && (XFASTINT (XWINDOW (selected_window)->last_modified) X >= bf_modified) X && (XFASTINT (XWINDOW (selected_window)->last_point) X == point) X && !windows_or_buffers_changed X--- 608,619 ---- X } X else if (EQ (cmd, Qbackward_char) && point > FirstCharacter) X { X SetPoint (point - 1); X lose = CharAt (point); X! if (((lose >= ' ' && lose < 0177) || X! !NULL(bf_cur->display_literal)) /* yossi */ X && (XFASTINT (XWINDOW (selected_window)->last_modified) X >= bf_modified) X && (XFASTINT (XWINDOW (selected_window)->last_point) X == point) X && !windows_or_buffers_changed X*************** X*** 647,658 **** X lose = 1; X nonundocount = 0; X } X if (!lose X && (point == NumCharacters + 1 || CharAt (point) == '\n') X! && last_command_char >= ' ' X! && last_command_char < 0177) X no_redisplay X = direct_output_for_insert (last_command_char); X goto directly_done; X } X } X--- 649,660 ---- X lose = 1; X nonundocount = 0; X } X if (!lose X && (point == NumCharacters + 1 || CharAt (point) == '\n') X! && ((last_command_char >= ' ' && last_command_char < 0177) || X! !NULL(bf_cur->display_literal))) /* yossi */ X no_redisplay X = direct_output_for_insert (last_command_char); X goto directly_done; X } X } END_OF_FILE if test 17245 -ne `wc -c <'emacs-18.55/patch-src'`; then echo shar: \"'emacs-18.55/patch-src'\" unpacked with wrong size! fi # end of 'emacs-18.55/patch-src' fi if test -f 'epoch-3.1/patch-src' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'epoch-3.1/patch-src'\" else echo shar: Extracting \"'epoch-3.1/patch-src'\" \(16562 characters\) sed "s/^X//" >'epoch-3.1/patch-src' <<'END_OF_FILE' X*** buffer.c.orig Wed Jan 31 16:50:28 1990 X--- buffer.c Sat Apr 7 10:07:30 1990 X*************** X*** 1145,1154 **** X--- 1145,1156 ---- X buffer_defaults.abbrev_table = Qnil; X X XFASTINT (buffer_defaults.tab_width) = 8; X buffer_defaults.truncate_lines = Qnil; X buffer_defaults.ctl_arrow = Qt; X+ buffer_defaults.display_literal = Qnil; /* yossi */ X+ buffer_defaults.display_reversed = Qnil; /* yossi */ X X XFASTINT (buffer_defaults.fill_column) = 70; X XFASTINT (buffer_defaults.left_margin) = 0; X X /* Assign the local-flags to the slots that have default values. X*************** X*** 1184,1193 **** X--- 1186,1197 ---- X XFASTINT (buffer_local_flags.truncate_lines) = 0x100; X XFASTINT (buffer_local_flags.ctl_arrow) = 0x200; X XFASTINT (buffer_local_flags.fill_column) = 0x400; X XFASTINT (buffer_local_flags.left_margin) = 0x800; X XFASTINT (buffer_local_flags.abbrev_table) = 0x1000; X+ XFASTINT (buffer_local_flags.display_literal) = 0x2000; /* yossi */ X+ XFASTINT (buffer_local_flags.display_reversed) = 0x4000; /* yossi */ X X Vbuffer_alist = Qnil; X bf_cur = 0; X all_buffers = 0; X X*************** X*** 1257,1266 **** X--- 1261,1280 ---- X DEFVAR_LISP_NOPRO ("default-ctl-arrow", X &buffer_defaults.ctl_arrow, X "Default ctl-arrow for buffers that do not override it.\n\ X This is the same as (default-value 'ctl-arrow)."); X X+ DEFVAR_LISP_NOPRO ("default-display-literal", /* yossi */ X+ &buffer_defaults.display_literal, X+ "Default display-literal for buffers that do not override it.\n\ X+ This is the same as (default-value 'display-literal)."); X+ X+ DEFVAR_LISP_NOPRO ("default-display-reversed", /* yossi */ X+ &buffer_defaults.display_reversed, X+ "Default display-reversed for buffers that do not override it.\n\ X+ This is the same as (default-value 'display-reversed)."); X+ X DEFVAR_LISP_NOPRO ("default-truncate-lines", X &buffer_defaults.truncate_lines, X "Default truncate-lines for buffers that do not override it.\n\ X This is the same as (default-value 'truncate-lines)."); X X*************** X*** 1348,1357 **** X--- 1362,1382 ---- X X DEFVAR_PER_BUFFER ("ctl-arrow", &bf_cur->ctl_arrow, X "*Non-nil means display control chars with uparrow.\n\ X Nil means use backslash and octal digits.\n\ X Automatically becomes local when set in any fashion."); X+ X+ DEFVAR_PER_BUFFER ("display-literal", &bf_cur->display_literal, /* yossi */ X+ "*Non-nil means display the characters in the buffer as they are,\n\ X+ even when ther are \"nonprintable\" ascii.\n\ X+ Nil means display using ctl-arrow for the low nonprintables, and use\n\ X+ backslash and octal digits for the high nonprintables.\n\ X+ Automatically becomes local when set in any fashion."); X+ X+ DEFVAR_PER_BUFFER ("display-reversed", &bf_cur->display_reversed, /* yossi */ X+ "*Non-nil means display each line of the buffer in reversed order,\n\ X+ useful for editing texts in Semitic languages which write right-to-left."); X X DEFVAR_PER_BUFFER ("truncate-lines", &bf_cur->truncate_lines, X "*Non-nil means do not display continuation lines;\n\ X give each line of text one screen line.\n\ X Automatically becomes local when set in any fashion.\n\ X*** buffer.h.orig Tue Jan 30 09:40:40 1990 X--- buffer.h Sat Apr 7 10:09:06 1990 X*************** X*** 140,149 **** X--- 140,155 ---- X X /* Non-nil means do not display continuation lines */ X Lisp_Object truncate_lines; X /* Non-nil means display ctl chars with uparrow */ X Lisp_Object ctl_arrow; X+ /* yossi-- Non-nil means display the characters in the buffer as they are, X+ even when they are "nonprintable" ascii. This is particularly useful X+ for fonts which have more than 128 characters */ X+ Lisp_Object display_literal; X+ /* yossi-- Non-nil means reverse each line of the buffer, for Semitics */ X+ Lisp_Object display_reversed; X /* Non-nil means do selective display; X See doc string in syms_of_buffer (buffer.c) for details. */ X Lisp_Object selective_display; X /* Non-nil means show ... at end of line followed by invisible lines. */ X Lisp_Object selective_display_ellipses; X*** dispepoch.c.orig Wed Jan 24 06:30:18 1990 X--- dispepoch.c Sat Apr 7 10:10:48 1990 X*************** X*** 574,584 **** X XFASTINT (w->last_modified) = bf_modified; X X reassert_line_highlight (0, WS->cursor_y); X write_chars (p->body + hpos, 1); X fflush (stdout); X! ++(WS->cursor_x); X p->length = max (p->length, WS->cursor_x); X p->body[p->length] = 0; X return 1; X } X /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ X--- 574,584 ---- X XFASTINT (w->last_modified) = bf_modified; X X reassert_line_highlight (0, WS->cursor_y); X write_chars (p->body + hpos, 1); X fflush (stdout); X! WS->cursor_x += (NULL(XBUFFER(w->buffer)->display_reversed))? 1: -1; /* yossi */ X p->length = max (p->length, WS->cursor_x); X p->body[p->length] = 0; X return 1; X } X /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ X*************** X*** 590,600 **** X X /* Avoid losing if cursor is in invisible text off left margin */ X if (XINT (w->hscroll) && cursX == XFASTINT (w->left)) X return 0; X X! WS->cursor_x += n; X XFASTINT (w->last_point_x) = WS->cursor_x; X XFASTINT (w->last_point) = point; X topos (WS->cursor_y,WS->cursor_x); X fflush (stdout); X return 1; X--- 590,600 ---- X X /* Avoid losing if cursor is in invisible text off left margin */ X if (XINT (w->hscroll) && cursX == XFASTINT (w->left)) X return 0; X X! WS->cursor_x += (NULL(XBUFFER(w->buffer)->display_reversed))? n: -n; /* yossi */ X XFASTINT (w->last_point_x) = WS->cursor_x; X XFASTINT (w->last_point) = point; X topos (WS->cursor_y,WS->cursor_x); X fflush (stdout); X return 1; X*** indent.c.orig Tue Jan 23 08:44:36 1990 X--- indent.c Sat Apr 7 10:13:58 1990 X*************** X*** 68,77 **** X--- 68,78 ---- X register unsigned char *ptr, *stop, c; X register int tab_seen; X register int post_tab; X register int tab_width = XINT (bf_cur->tab_width); X int ctl_arrow = !NULL (bf_cur->ctl_arrow); X+ int display_literal = !NULL (bf_cur->display_literal); /* yossi */ X X if (point == last_known_column_point X && bf_modified == last_known_column_modified) X return last_known_column; X X*************** X*** 108,117 **** X--- 109,122 ---- X X post_tab += col; X col = 0; X tab_seen = 1; X } X+ else if (display_literal) /* yossi */ X+ { X+ col++; X+ } X else X col += (ctl_arrow && c < 0200) ? 2 : 4; X } X X if (tab_seen) X*************** X*** 232,241 **** X--- 237,247 ---- X register int col = current_column (); X register int goal; X register int end = NumCharacters; X register int tab_width = XINT (bf_cur->tab_width); X register int ctl_arrow = !NULL (bf_cur->ctl_arrow); X+ register int display_literal = !NULL (bf_cur->display_literal); /* yossi */ X X Lisp_Object val; X X if (tab_width <= 0 || tab_width > 20) tab_width = 8; X CHECK_NUMBER (column, 0); X*************** X*** 258,270 **** X if (c == '\t') X { X col += tab_width - 1; X col = col / tab_width * tab_width; X } X! else if (ctl_arrow && (c < 040 || c == 0177)) X col++; X! else if (c < 040 || c >= 0177) X col += 3; X } X X SetPoint (pos); X X--- 264,276 ---- X if (c == '\t') X { X col += tab_width - 1; X col = col / tab_width * tab_width; X } X! else if ((!display_literal) && ctl_arrow && (c < 040 || c == 0177)) /* yossi */ X col++; X! else if ((!display_literal) && (c < 040 || c >= 0177)) /* yossi */ X col += 3; X } X X SetPoint (pos); X X*************** X*** 307,316 **** X--- 313,323 ---- X register int target = tohpos + (tovpos << SHORTBITS); X register int pos; X register int c; X register int tab_width = XFASTINT (bf_cur->tab_width); X register int ctl_arrow = !NULL (bf_cur->ctl_arrow); X+ register int display_literal = !NULL (bf_cur->display_literal); /* yossi */ X int selective X = XTYPE (bf_cur->selective_display) == Lisp_Int X ? XINT (bf_cur->selective_display) X : !NULL (bf_cur->selective_display) ? -1 : 0; X int prevpos; X*************** X*** 369,378 **** X--- 376,387 ---- X cpos += 4; X if (HPOS (cpos) >= width) X cpos -= HPOS (cpos) - width; X } X } X+ else if (display_literal) /* yossi */ X+ cpos++; X else X cpos += (ctl_arrow && c < 0200) ? 2 : 4; X X if (HPOS (cpos) >= width X && (HPOS (cpos) > width X*** xdisp.c.orig Mon Jan 29 15:45:35 1990 X--- xdisp.c Sat Apr 7 10:31:37 1990 X*************** X*** 403,412 **** X--- 403,419 ---- X XINT (w->hscroll), 0); X if (pos.vpos < 1) X { X struct W_Screen *ws = XWSCREEN(XROOT(w->root)->win); X ws->cursor_x = XFASTINT(w->left) + (pos.hpos < 0 ? 0 : pos.hpos); X+ if (!NULL(XBUFFER(w->buffer)->display_reversed)) { /* yossi */ X+ register int width = XFASTINT (w->width) - 1 X+ - (XFASTINT(w->width) + XFASTINT(w->left) != ws->width); X+ X+ ws->cursor_x = XFASTINT(w->left) + width - X+ (ws->cursor_x - XFASTINT(w->left)); X+ } X ws->cursor_y = this_line_vpos; X goto update; X } X else X goto cancel; X*************** X*** 772,781 **** X--- 779,795 ---- X lpoint = point; X X if (EQ (window, selected_window)) X { X ws->cursor_x = max (0, pos.hpos) + XFASTINT (w->left); X+ if (!NULL(XBUFFER(w->buffer)->display_reversed)) { /* yossi */ X+ register int width = XFASTINT (w->width) - 1 X+ - (XFASTINT(w->width) + XFASTINT(w->left) != ws->width); X+ X+ ws->cursor_x = XFASTINT(w->left) + width - X+ (ws->cursor_x - XFASTINT(w->left)); X+ } X ws->cursor_y = pos.vpos + XFASTINT (w->top); X } X } X goto done; X } X*************** X*** 805,814 **** X--- 819,835 ---- X /* Ok, point is still on screen */ X if (w == XWINDOW (selected_window)) X { X /* These variables are supposed to be origin 1 */ X ws->cursor_x = max (0, pos.hpos) + XFASTINT (w->left); X+ if (!NULL(XBUFFER(w->buffer)->display_reversed)) { /* yossi */ X+ register int width = XFASTINT (w->width) - 1 X+ - (XFASTINT(w->width) + XFASTINT(w->left) != ws->width); X+ X+ ws->cursor_x = XFASTINT(w->left) + width - X+ (ws->cursor_x - XFASTINT(w->left)); X+ } X ws->cursor_y = pos.vpos + XFASTINT (w->top); X } X goto done; X } X /* Don't bother trying redisplay with same start; X*************** X*** 1278,1287 **** X--- 1299,1315 ---- X point_vpos = val.vpos + top; X point_hpos = val.hpos + XFASTINT (w->left); X } X X ws->cursor_x = max (0, point_hpos); X+ if (!NULL(XBUFFER(w->buffer)->display_reversed)) { /* yossi */ X+ register int width = XFASTINT (w->width) - 1 X+ - (XFASTINT(w->width) + XFASTINT(w->left) != ws->width); X+ X+ ws->cursor_x = XFASTINT(w->left) + width - X+ (ws->cursor_x - XFASTINT(w->left)); X+ } X ws->cursor_y = point_vpos; X X if (debug_end_pos) X { X val = *compute_motion (start, 0, lmargin, NumCharacters + 1, X*************** X*** 1333,1342 **** X--- 1361,1371 ---- X register char *p1prev; X register struct display_line *line; X struct W_Screen *ws = XWSCREEN(XROOT(w->root)->win); X int tab_width = XINT (bf_cur->tab_width); X int ctl_arrow = !NULL (bf_cur->ctl_arrow); X+ int display_literal = !NULL (bf_cur->display_literal); /* yossi */ X int width = XFASTINT (w->width) - 1 X - (XFASTINT (w->width) + XFASTINT (w->left) != ws->width); X struct position val; X int lastpos; X int invis; X*************** X*** 1476,1485 **** X--- 1505,1520 ---- X p1 = endp; X strncpy (p1prev, " ...", p1 - p1prev); X } X break; X } X+ else if (display_literal) /* yossi */ X+ { X+ if (p1 >= startp) X+ *p1 = c; X+ NEXT_CHAR; X+ } X else if (c < 0200 && ctl_arrow) X { X if (p1 >= startp) X *p1 = '^'; X NEXT_CHAR; X*************** X*** 1637,1646 **** X--- 1672,1719 ---- X line->length = len + startp - line->body; X } X X val.bufpos = pos; X val_display_text_line = val; X+ X+ /* yossi-- reverse the line if necessary */ X+ if (!NULL(bf_cur->display_reversed)) { X+ char *p2, t; X+ unsigned char *a2, at; X+ X+ if (p1 < endp + 1) { X+ while (p1 <= endp) *p1++ = ' '; X+ line->length = max(line->length, p1 - line->body); X+ line->body[line->length] = 0; X+ } X+ X+ /* reverse the line */ X+ for (p1 = startp, p2 = startp + width; p1 < p2; p1++, --p2) { X+ t = *p1; X+ *p1 = *p2; X+ *p2 = t; X+ } X+ X+ #ifdef BUTTON X+ /* reverse the buttons */ X+ for ( X+ a1 = line->attrib + XFASTINT (w->left), X+ a2 = line->attrib + XFASTINT (w->left) + width; X+ a1 < a2; X+ a1++, --a2 X+ ) { X+ at = *a1; X+ *a1 = *a2; X+ *a2 = at; X+ } X+ #endif BUTTON X+ X+ /* reverse the position of point if necessary */ X+ if ((point_vpos == vpos) && (w == XWINDOW (selected_window))) X+ ws->cursor_x = XFASTINT(w->left) + width - X+ (ws->cursor_x - XFASTINT(w->left)); X+ } X return &val_display_text_line; X } X X /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ X /* Display the mode line for window w */ X*************** X*** 2088,2097 **** X--- 2161,2176 ---- X if (p1 >= start) X *p1 = ' '; X p1++; X } X while ((p1 - start + hscroll - (hscroll > 0)) % tab_width); X+ } X+ else if (buffer_defaults.display_literal) /* yossi */ X+ { X+ if (p1 >= start) X+ *p1 = c; X+ p1++; X } X else if (c < 0200 && buffer_defaults.ctl_arrow) X { X if (p1 >= start) X *p1 = '^'; X*** keyboard.c.orig Thu Jan 25 09:14:47 1990 X--- keyboard.c Sat Apr 7 10:33:39 1990 X*************** X*** 592,602 **** X { X if (EQ (cmd, Qforward_char) && point <= NumCharacters) X { X lose = CharAt (point); X SetPoint (point + 1); X! if (lose >= ' ' && lose < 0177 X && (XFASTINT (XWINDOW (selected_window)->last_modified) X >= bf_modified) X && (XFASTINT (XWINDOW (selected_window)->last_point) X == (point+1)) /* dd/amc */ X && !windows_or_buffers_changed X--- 592,603 ---- X { X if (EQ (cmd, Qforward_char) && point <= NumCharacters) X { X lose = CharAt (point); X SetPoint (point + 1); X! if (((lose >= ' ' && lose < 0177) || X! !NULL(bf_cur->display_literal)) /* yossi */ X && (XFASTINT (XWINDOW (selected_window)->last_modified) X >= bf_modified) X && (XFASTINT (XWINDOW (selected_window)->last_point) X == (point+1)) /* dd/amc */ X && !windows_or_buffers_changed X*************** X*** 608,618 **** X } X else if (EQ (cmd, Qbackward_char) && point > FirstCharacter) X { X SetPoint (point - 1); X lose = CharAt (point); X! if (lose >= ' ' && lose < 0177 X && (XFASTINT (XWINDOW (selected_window)->last_modified) X >= bf_modified) X && (XFASTINT (XWINDOW (selected_window)->last_point) X == (point-1)) /* dd/amc */ X && !windows_or_buffers_changed X--- 609,620 ---- X } X else if (EQ (cmd, Qbackward_char) && point > FirstCharacter) X { X SetPoint (point - 1); X lose = CharAt (point); X! if (((lose >= ' ' && lose < 0177) || X! !NULL(bf_cur->display_literal)) /* yossi */ X && (XFASTINT (XWINDOW (selected_window)->last_modified) X >= bf_modified) X && (XFASTINT (XWINDOW (selected_window)->last_point) X == (point-1)) /* dd/amc */ X && !windows_or_buffers_changed X*************** X*** 648,659 **** X lose = 1; X nonundocount = 0; X } X if (!lose X && (point == NumCharacters + 1 || CharAt (point) == '\n') X! && last_command_char >= ' ' X! && last_command_char < 0177) X no_redisplay X = direct_output_for_insert (last_command_char); X goto directly_done; X } X } X--- 650,661 ---- X lose = 1; X nonundocount = 0; X } X if (!lose X && (point == NumCharacters + 1 || CharAt (point) == '\n') X! && ((last_command_char >= ' ' && last_command_char < 0177) || X! !NULL(bf_cur->display_literal))) /* yossi */ X no_redisplay X = direct_output_for_insert (last_command_char); X goto directly_done; X } X } END_OF_FILE if test 16562 -ne `wc -c <'epoch-3.1/patch-src'`; then echo shar: \"'epoch-3.1/patch-src'\" unpacked with wrong size! fi # end of 'epoch-3.1/patch-src' fi echo shar: End of archive 2 \(of 2\). cp /dev/null ark2isdone MISSING="" for I in 1 2 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked both archives. rm -f ark[1-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0