From: tgo@kutsuda.kuis.kyoto-u.ac.jp (TGO - Touji Okayama)
Subject: Re: Sorry! (Re: Patch for AUC-tex ver. 6)
Reply-To: tgo@kutsuda.kuis.kyoto-u.ac.jp
Organization: Kyoto Univ. dept. of Info. Sci. Tsuda Lab.
	<1086@gunma.cs.gunma-u.ac.jp> <1087@gunma.cs.gunma-u.ac.jp>
	<1091@gunma.cs.gunma-u.ac.jp>
	<TGO.92Nov13170150@shank.kutsuda.kuis.kyoto-u.ac.jp>
	<TGO.92Nov13175647@shank.kutsuda.kuis.kyoto-u.ac.jp>
Distribution: fj
Date: Fri, 13 Nov 1992 09:40:49 GMT

$@2,;3(J@$@5~Bg(J$@>pJs(J $@$G$9!#EY!9$I$&$b$9$$$^$;$s!#(J

In article <TGO.92Nov13175647@shank.kutsuda.kuis.kyoto-u.ac.jp>,
    tgo@kutsuda.kuis.kyoto-u.ac.jp (TGO - Touji Okayama) writes:

$@DMK\$5$s(J> $@$3$l$H$OJL$K!";d$N;XE&$7$?(J$@LdBj$r2r7h$9$k$K$O!"Nc$($P(J \item $@$N$"$k9T$N(J
$@DMK\$5$s(J> $@:G8e$N(J $@!V$3$l(J<$@2~9T(J>$@!W(J $@$,!"(J $@!V$3$l(J%<$@2~9T(J>$@!W(J $@$K$J(J$@$C$F$/$l$l$P$$$$$o$1$G(J
$@DMK\$5$s(J> $@$9!#(J

$@DMK\$5$s(J> $@$H$$$&$o$1$G!"$3$N$h$&$J(J fill $@$r2?$H$+$7$F<B8=$G$-$J(J$@$$$G$7$g$&$+!#(J

$@;d(J> $@:n$C$F$_$^$7$?!#(J

$@;d(J> AUC-TeX ver 6.1d (auc-tex.el,v 5.38 1992/09/16 12:14:18 amanda Exp) $@$X$N(J
$@;d(J> $@%Q%C%A$G$9!#B?J,!"(J6a $@$J$s$+$K$bEv$?$k$H;W$$$^$9!#(J

$@;d(J> $@$3$l$O0lC6%-%c%s%;%k$7$^$9!#(J$@%P%0$,8+$D$+$j$^$7$?!#(J

$@;d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?J}$O!"=PMh$l$P:#2s$N%Q%C(J$@%A$r$"$FD>$7$F2<$5$k$3$H$r$*4+$a$7$^$9!#(J
$@0J>e!"8x6&$N>l$r$*<Z$j$7$^$7$?!#(J

-----------------------------------------------------------------------
$@2,;3F#<#(J $@!w(J $@5~Bg>pJs(J $@DEEDBhFs8&5f<<(J	tgo@kutsuda.kuis.kyoto-u.ac.jp


--------------------------- $@@Z$j<h$j@~(J ---------------------------------
*** auc-tex.el.orig	Fri Nov 13 15:35:16 1992
--- auc-tex.el	Fri Nov 13 18:31:11 1992
***************
*** 512 ****
! 	 "^.*[^" (regexp-quote TeX-esc) "]%.*$\\|"
--- 512 ----
! ;	 "^.*[^" (regexp-quote TeX-esc) "]%.*$\\|"
***************
*** 524 ****
! 	 "^.*[^" (regexp-quote TeX-esc) "]%.*$\\|"
--- 524 ----
! ;	 "^.*[^" (regexp-quote TeX-esc) "]%.*$\\|"
***************
*** 666,676 ****
!   (save-excursion
!   (let ((indent (calculate-LaTeX-indentation)))
!     (if (/= (current-indentation) indent)
! 	(let ((beg (progn
! 		     (beginning-of-line)
! 		     (point))))
! 	  (back-to-indentation)
! 	  (delete-region beg (point))
! 	  (indent-to indent)))))
!   (if (< (current-column) (calculate-LaTeX-indentation))
!       (back-to-indentation)))
--- 666,678 ----
!   (if (= (point-min) (point-max))
!       nil
!     (save-excursion
!       (let ((indent (calculate-LaTeX-indentation)))
! 	(if (/= (current-indentation) indent)
! 	    (let ((beg (progn
! 			 (beginning-of-line)
! 			 (point))))
! 	      (back-to-indentation)
! 	      (delete-region beg (point))
! 	      (indent-to indent)))))
!     (if (< (current-column) (calculate-LaTeX-indentation))
! 	(back-to-indentation))))
***************
*** 677 ****
--- 680 ----
+ ;patched by tgo
***************
*** 690 ****
! 
--- 693 ----
!     
***************
*** 693 ****
! 
--- 696 ----
!     
***************
*** 697 ****
!       (insert ? ))
--- 700,703 ----
!       (if (eobp)
! 	  nil
! 	(delete-char 1)
! 	(insert "  ")))
***************
*** 699 ****
!     (subst-char-in-region from (point-max) ?\n ?\ )
--- 705,715 ----
!     (goto-char from)
!     (while (re-search-forward
! 	    (concat 
! 	     (if (string= LaTeX-fill-suffix "")
! 		 "\\("
! 	       (concat "[^\\]\\(" LaTeX-fill-suffix "?"))
! 	     "[\n]+[ \t]*\\)")
! 	    nil t)
!       (delete-region (match-beginning 1) (match-end 1))
!       (if (or (< (preceding-char) 128) (< (following-char) 128))
! 	  (insert " ")))
***************
*** 707,708 ****
! 	       (skip-chars-backward " ])\"'")
! 	       (memq (preceding-char) '(?. ?? ?!)))
--- 723,724 ----
! 		(skip-chars-backward " ])\"'")
! 		(memq (preceding-char) '(?. ?? ?!)))
***************
*** 714 ****
!     (goto-char (point-min))
--- 730 ----
!     (goto-char from)
***************
*** 717 ****
! 	(move-to-column (1+ fill-column))
--- 733,734 ----
! 	(move-to-column (- fill-column (length LaTeX-fill-suffix)))
! 	(or (>= fill-column (current-column)) (backward-char 1))
***************
*** 720,726 ****
! 	  (skip-chars-backward "^ \n")
! 	  (if (if (zerop prefixcol)
! 		  (bolp)
! 		(>= prefixcol (current-column)))
! 	      (skip-chars-forward "^ \n")
! 	    (forward-char -1)))
! 	(delete-horizontal-space)
--- 737,777 ----
! 	  (skip-chars-backward " \t")
! 	  (if (or (<= 128 (preceding-char))
! 		  (<= 128 (following-char))
! 		  (= (following-char) ? )
! 		  (= (following-char) ?\t))
! 	      (kinsoku-shori)
! 	    (if (re-search-backward "[ \t\n]\\|\\z"
! 				    (point-min) (point-min))
! 		(forward-char 1))
! 	    (skip-chars-backward " \t")
! 	    (kinsoku-shori))
! 	  (if (>= prefixcol (current-column))
! 	      (progn
! 		(move-to-column prefixcol)
! 		(if (re-search-forward "[ \t]\\|\\z"
! 				       (point-max) (point-max))
! 		    (backward-char 1))
! 		(skip-chars-backward " \t")
! 		(kinsoku-shori)
! 		(if (>= prefixcol (current-column))
! 		    (goto-char (point-max))))))
! 	(if (not kanji-flag) (delete-horizontal-space)
! 	  (let ((start) (end))
! 	    (skip-chars-backward " \t")
! 	    (setq start (point))
! 	    (skip-chars-forward  " \t")
! 	    (setq end (point))
! 	    (delete-region start end)
! 	    (if (and (not
! 		      (and (save-excursion
! 			     (skip-chars-backward " ])\"'")
! 			     (memq (preceding-char) '(?. ?? ?!)))
! 			   (= end (+ start 2))))
! 		     (or (and (or (<= 128 (preceding-char))
! 				  (<= 128 (following-char)))
! 			      (< start end)
! 			      (not (eobp)))
! 			 (and (memq (preceding-char) '(?. ?? ?!))
! 			      (= (1+ start) end)
! 			      (not (eobp)))))
! 		(insert ?  ))))
***************
*** 728 ****
--- 780,781 ----
+ 	(if (<= 128 (preceding-char))
+ 	    (insert LaTeX-fill-suffix))
***************
*** 736,737 ****
! 	       (forward-line 1)))
! 	)
--- 789 ----
! 	       (forward-line 1))))
***************
*** 741 ****
--- 794 ----
+ ;patched by tgo
***************
*** 749,753 ****
!     (or (bolp) (newline 1))
!     (let ((end (point-marker))
! 	  (start (progn
! 		   (backward-paragraph)
! 		   (point))))
--- 802,814 ----
!     (let* ((startmark) (endmark)
! 	   (flag (if (eobp) (progn (setq startmark (point-marker))
! 				   (insert "\ndummy")
! 				   (setq endmark (point-marker))
! 				   t)
! 		   nil))
! 	   (end (point-marker))
! 	   (start (progn
! 		    (backward-paragraph)
! 		    (if flag (progn (delete-region startmark endmark)
! 				    (beginning-of-line)))
! 
! 		    (point))))
***************
*** 755 ****
--- 817 ----
+ ;patched by tgo
***************
*** 777 ****
! 				     "\\|^ +$\\|\\'\\)" )
--- 839 ----
! 				     "\\|^ +$\\|\\'\\|[\n][\n]+\\)" )
***************
*** 824 ****
!     (re-search-forward "{\\([^}]+\\)}")
--- 886 ----
!     (save-excursion (re-search-forward "{\\([^}]+\\)}"))
***************
*** 838 ****
!     (re-search-forward "{\\([^}]+\\)}")
--- 900 ----
!     (save-excursion (re-search-forward "{\\([^}]+\\)}"))
***************
*** 1117,1118 ****
-   
- 
--- 1178 ----
Newsgroups: fj.editor.emacs