emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/textmodes/fill.el


From: Kenichi Handa
Subject: [Emacs-diffs] Changes to emacs/lisp/textmodes/fill.el
Date: Wed, 30 Mar 2005 23:44:47 -0500

Index: emacs/lisp/textmodes/fill.el
diff -c emacs/lisp/textmodes/fill.el:1.174 emacs/lisp/textmodes/fill.el:1.175
*** emacs/lisp/textmodes/fill.el:1.174  Fri Mar 11 02:04:05 2005
--- emacs/lisp/textmodes/fill.el        Thu Mar 31 04:44:46 2005
***************
*** 539,544 ****
--- 539,555 ----
            ;; 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,552 ****
    (insert ?\n)
    ;; Give newline the properties of the space(s) it replaces
    (set-text-properties (1- (point)) (point)
!                      (text-properties-at (point)))
    (and (looking-at "\\( [ \t]*\\)\\(\\c|\\)?")
         (or (aref (char-category-set (or (char-before (1- (point))) ?\000)) ?|)
           (match-end 2))
--- 557,563 ----
    (insert ?\n)
    ;; Give newline the properties of the space(s) it replaces
    (set-text-properties (1- (point)) (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))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]