Re: Issues with japanese support
Ikumi Keita <[email protected]> Wed, 09 Mar 2005 22:28:08 +0900
| Newsgroups | gmane.emacs.auc-tex |
|---|---|
| Message-ID | <[email protected]> |
>>>>> Ralf Angeli <[email protected]> writes: >> ----- [C] ------------------------------------------------------------ > We will probably not gain much, so I prefer the code which is easier > to read. I see. Actually, [C] does not seem good even to me. >> ----- [D] ------------------------------------------------------------ > But we need the variable in `LaTeX-fill-delete-newlines' nevertheless, > so we would not gain much. We could however consider to convert it to > a defvar instead of a defcustom. I don't think there is much sense in > exposing this as a customizable option anyway. I agree with you. By the way, there are two more additional problems in the fill code in latex.el. (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 (forward-line 1))) (when use-hard-newlines (remove-list-of-text-properties from to '(hard))) <----- THIS LINE ---------------------------------------------------------------------- I think these can lead to some errors in Emacs 21. (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. Best regards, Ikumi Keita