# HG changeset patch # User Kenichi Handa # Date 1112244286 0 # Node ID 801f886872c533f82642a4c863986b7056ebda08 # Parent 81b738b4c7290ec7e40b3dccb2a868cf5b738c5c (fill-text-properties-at): New function. (fill-newline): Use fill-text-properties-at instead of text-properties-at. diff -r 81b738b4c729 -r 801f886872c5 lisp/textmodes/fill.el --- a/lisp/textmodes/fill.el Thu Mar 31 00:24:57 2005 +0000 +++ b/lisp/textmodes/fill.el Thu Mar 31 04:44:46 2005 +0000 @@ -539,6 +539,17 @@ ;; Make sure we take SOMETHING after the fill prefix if any. (fill-find-break-point linebeg))))) +;; Like text-properties-at but don't include `composition' property. +(defun fill-text-properties-at (pos) + (let ((l (text-properties-at pos)) + prop-list) + (while l + (unless (eq (car l) 'composition) + (setq prop-list + (cons (car l) (cons (cadr l) prop-list)))) + (setq l (cddr l))) + prop-list)) + (defun fill-newline () ;; Replace whitespace here with one newline, then ;; indent to left margin. @@ -546,7 +557,7 @@ (insert ?\n) ;; Give newline the properties of the space(s) it replaces (set-text-properties (1- (point)) (point) - (text-properties-at (point))) + (fill-text-properties-at (point))) (and (looking-at "\\( [ \t]*\\)\\(\\c|\\)?") (or (aref (char-category-set (or (char-before (1- (point))) ?\000)) ?|) (match-end 2))