Re: Issues with japanese support

Ralf Angeli <[email protected]> Fri, 11 Mar 2005 08:57:01 +0100
Newsgroups gmane.emacs.auc-tex
Message-ID <[email protected]>
* Ikumi Keita (2005-03-09) writes:

> (1) LaTeX-fill-region-as-para-do contains two functions,
> fill-indent-to-left-margin and remove-list-of-text-properties, which are
> not defined in Emacs 21, without fboundp check in the following form:
> ----------------------------------------------------------------------
> 	      (if (and (not (eolp))
> 		       (< (LaTeX-current-indentation) (current-left-margin)))
> 		  (fill-indent-to-left-margin)) <----- THIS LINE

I haven't made anything with the margin yet.  Can the condition that
the current indentation is smaller than the current left margin
actually be true in some cases?  Maybe there exist minor modes which
use this?

Anyway, we could add the actual definition of
`fill-indent-to-left-margin' as a fallback if the function is not
defined.  It is only a few lines long.

> 	      (forward-line 1)))
>
> 	(when use-hard-newlines
> 	  (remove-list-of-text-properties from to '(hard))) <----- THIS LINE

If I understand the descriptions of `remove-list-of-text-properties'
and `remove-text-properties' correctly the above could be written as
(remove-text-properties from to '(hard nil)) ... Argh, it actually is
written like this in `fill-region-as-paragraph' of Emacs 21.3.  Why
didn't I look there earlier.

I already changed this in CVS.

> (2)These lines are taken from LaTeX-fill-newline.
> ----------------------------------------------------------------------
> 1:  (newline 1)
> (snip)
> 2:    ;; Give newline the properties of the space(s) it replaces
> 3:    (set-text-properties (1- (point)) (point)
> 4:			 (text-properties-at (point)))
> (snip)
> 5:	 ;; When refilling later on, this newline would normally not
> 6:	 ;; be replaced by a space, so we need to mark it specially to
> 7:	 ;; re-install the space when we unfill.
> 8:	 (put-text-property (1- (point)) (point) 'fill-space (match-string 1)))
> ----------------------------------------------------------------------
> The lines 3-4 and 8 expect that the point is just after the newline
> inserted at line 1.  However, the function newline not only inserts \n
> but also performs indentation in general.  So there is a possibility
> that lines 3-4 and 8 put the text properties on the wrong place.

AFAICS `newline' does not do indentation.  Do you have an example?

-- 
Ralf