xemacs-beta / mule-doc / TAB.jp

Date: Wed, 8 Apr 92 18:51:54 JST
From: gniibe@mri.co.jp (NIIBE Yutaka)
Return-Path: <gniibe@mri.co.jp>
To: handa@etl.go.jp
Subject: note on indent.h, indent.c, and xdisp.c

$B:G8e$KKM$N$d$C$?=$@5$K4X$7$F(B, $B3P=q$rAw$j$^$9!#(B
================ FROM HERE ==============
compute_motion (), display_text_string () $B$K4X$9$k3P=q(B  ; -*- Indented-Text -*-
Tue Apr  7 09:35:41 1992
Wed Apr  8 18:26:26 1992
GniiBE <gniibe@mri.co.jp>

column $B$r85$K(B tab $B$N7W;;$O9T$J$o$l$k!#(B

multi width (multi column $B$GESCf$G3d$k$3$H$N$G$-$J$$(B) character
($B4A;z$J$I(B)$B$,$"$k>l9g(B, $B0l9T$O0lDj$N(B column $B$G$"$k$H$O8B$i$J$$!#(B


$BK\2H$N(B emacs $B$O!V0l9T$O0lDj$N(B column $B$G$"$k!W$H2>Dj$7$F$$$k!#(B

struct position $B$K(B tab_offset $B$H$$$&(B member $B$rDI2C$7(B, $B$=$3$K(B 
tab_offset $B$NCM$rJ];}$9$k$3$H$G$3$N=$@5$r$*$3$J$&!#(B

$B$3$3$G(B, tab_offset $B$H(B hpos, column $B$N4V$K$O(B,

    tab_offset + hpos = column

$B$H$$$&4X78$,$"$k!#$^(B, $BAa$$OC$7$,(B column $B$r$$$A$$$A7W;;$7$J$$$G3P$((B

        * indent.h (struct position):
          tab_offset $B$H$$$&(B member $B$rDI2C$7$?!#(B

        * indent.c (compute_motion):
          truncate, lastpos $B$rDI2C!#(B
	  emacs $B$N(B bug $B=$@5!#(B

          for ()
              (1) $B%-%c%i%/%?$,$I$l$@$1?J$`$+7W;;(B;
              (2) width $B$rD6$($k$s$@$C$?$i$=$N=hM}(B;

          $B$N(B (2) $B$N!VD6$($A$c$&!W$N>r7o$r!VD6$($A$c$C$?!W$KJQ99$9(B

          for ()
              (1) $B%-%c%i%/%?$,$I$l$@$1?J$`$+7W;;(B;
              (2) width $B$rD6$A$c$C$?$i$=$N=hM}(B;

          (3-1) $B1[$($A$c$&$G=hM}$5$l$?$O$:$N=hM}(B($B0l$DLa$9(B);
          (3-2) $B1[$($A$c$&$N=hM}(B;

(**) pos : buffer $B>e$N0LCV(B
(**) (hpos, vpos) : $B2hLL>e$N0LCV(B

compute_motion $B$O(B
 (i) $B$"$k(B (hpos, vpos) $B$^$GI=<($9$k$K$O$I$N(B pos $B$,BP1~$9$k$+(B
 (ii) $B$"$k(B pos $B$^$GI=<($7$?$i$I$3$N(B (hpos, vpos) $B$K$J$k$+(B

$B$=$7$F(B, loop $B$N=*N;>r7o$O(B, (i) $B$N>l9g(B (hpos, vpos), (ii) $B$N>l9g(B
pos $B$K$J$k!#(B


----------                       ($B;29M(B) ----------                         
abcdefgh\\                              abcdefgh\\                         
$B4A(B      ^----(a)                        333     ^---- cursor $B$O$3$3$K$/$k!#(B
^---- (b) cursor $B$O$3$3$K$/$k!#(B            ^---- $B<!$O$3$3!#(B                
  ^---- (c) $B<!$O$3$3!#(B                  ----------                         
----------                         multi column character $B$N>l9g!#(B         
multi width char. $B$N>l9g!#(B

j        ^---- (a)
$BIaDL$N(B char. $B$N>l9g!#(B

(i) $B$KBP$7$F(B, (3-1) $B$N=hM}$O(B, (c) $B$G9T$r1[$($?$H;W$C$F$$$k$H$3$m(B
$B$r(B, $B$=$NA0$G1[$($F$$$?$H(B (b) $B$K(B (hpos, vpos) $B$rLa$7(B, pos $B$b0l$DLa(B

(ii) $B$KBP$7$F(B, (3-2) $B$N=hM}$O(B, (a) $B$K(B (hpos, vpos) $B$,$"$k$H;W$C$F(B
$B$$$k$N$r(B (b) $B$K0\$9!#(B 

        * indent.c (pos_tab_offset):
          $BK\2H$N(B pos_tab_offset $B$O!V0l9T$O0lDj$N(B column(s) $B$G$"$k!W(B
          $B$3$H$r2>Dj$7(B, current_column $B$G(B column $B$r5a$a$F(B, $B$=$l$G(B 
          width $B$G(B % $B$H$C$?$j$7$F$$$k!#$^$:$$$N$G(B, $B=q$-D>$7!#(B

        * indent.c (vmotion):
          pos.vpos * width $B$H$$$&!V0l9T$O0lDj$N(B column(s) $B$G$"$k!W(B
          $B$3$H$r2>Dj$7$F$"$kItJ,$r=$@5(B, pos.tab_offset $B$rMQ$$$k!#(B

        * xdisp.c (redisplay):

--------          --------
$B$3$s$J(Ba\   DEL    $B$3$s$J(B\\
$B>l9g(B       ==>    $B>l9g(B
^^                ^^
--------          --------

         $B$r=hM}$9$k$h$&$K(B, goto cancel $B$K$J$k>r7o$r$D$1$k!#(B

        * xdisp.c (try_window):
	  tab_offset $B$N=hM}!#(B

	* xdisp.c (try_window_id):
	  emacs $B$N(B bug $B=$@5!#(B
	  tab_offset $B$N=hM}!#(B

	* xdisp.c (display_text_line):
	  tab_offset $B$N=hM}!#(B
	  $B9TKv$N(B truncate, multi width char. $B$N>l9g(B, $$ $B$N=hM}!#(B
	  emacs $B$N(B bug $B=$@5!#(B
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.