diff options
| author | Kenichi Handa | 2005-03-31 04:45:27 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2005-03-31 04:45:27 +0000 |
| commit | 7c315e1cff9019c8af55921fab6f571e68b09623 (patch) | |
| tree | aa8992d555db739546da338bde295e3c66040e7c | |
| parent | ace4dad6d2edc4cb8b99637aeeda0cd3e0cb7e08 (diff) | |
| download | emacs-7c315e1cff9019c8af55921fab6f571e68b09623.tar.gz emacs-7c315e1cff9019c8af55921fab6f571e68b09623.zip | |
(fill-text-properties-at): New function.
(fill-newline): Use fill-text-properties-at instead of
text-properties-at.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/textmodes/fill.el | 13 |
2 files changed, 18 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f123732ed9e..a0a670300dc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2005-03-31 Kenichi Handa <handa@etlken2> | ||
| 2 | |||
| 3 | * textmodes/fill.el (fill-text-properties-at): New function. | ||
| 4 | (fill-newline): Use fill-text-properties-at instead of | ||
| 5 | text-properties-at. | ||
| 6 | |||
| 1 | 2005-03-31 Karl Berry <karl@freefriends.org> | 7 | 2005-03-31 Karl Berry <karl@freefriends.org> |
| 2 | 8 | ||
| 3 | * textmodes/tex-mode.el (tex-compile): shell-quote-argument, | 9 | * textmodes/tex-mode.el (tex-compile): shell-quote-argument, |
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index ccd7f21f502..c41145befc8 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el | |||
| @@ -539,6 +539,17 @@ The break position will be always after LINEBEG and generally before point." | |||
| 539 | ;; Make sure we take SOMETHING after the fill prefix if any. | 539 | ;; Make sure we take SOMETHING after the fill prefix if any. |
| 540 | (fill-find-break-point linebeg))))) | 540 | (fill-find-break-point linebeg))))) |
| 541 | 541 | ||
| 542 | ;; Like text-properties-at but don't include `composition' property. | ||
| 543 | (defun fill-text-properties-at (pos) | ||
| 544 | (let ((l (text-properties-at pos)) | ||
| 545 | prop-list) | ||
| 546 | (while l | ||
| 547 | (unless (eq (car l) 'composition) | ||
| 548 | (setq prop-list | ||
| 549 | (cons (car l) (cons (cadr l) prop-list)))) | ||
| 550 | (setq l (cddr l))) | ||
| 551 | prop-list)) | ||
| 552 | |||
| 542 | (defun fill-newline () | 553 | (defun fill-newline () |
| 543 | ;; Replace whitespace here with one newline, then | 554 | ;; Replace whitespace here with one newline, then |
| 544 | ;; indent to left margin. | 555 | ;; indent to left margin. |
| @@ -546,7 +557,7 @@ The break position will be always after LINEBEG and generally before point." | |||
| 546 | (insert ?\n) | 557 | (insert ?\n) |
| 547 | ;; Give newline the properties of the space(s) it replaces | 558 | ;; Give newline the properties of the space(s) it replaces |
| 548 | (set-text-properties (1- (point)) (point) | 559 | (set-text-properties (1- (point)) (point) |
| 549 | (text-properties-at (point))) | 560 | (fill-text-properties-at (point))) |
| 550 | (and (looking-at "\\( [ \t]*\\)\\(\\c|\\)?") | 561 | (and (looking-at "\\( [ \t]*\\)\\(\\c|\\)?") |
| 551 | (or (aref (char-category-set (or (char-before (1- (point))) ?\000)) ?|) | 562 | (or (aref (char-category-set (or (char-before (1- (point))) ?\000)) ?|) |
| 552 | (match-end 2)) | 563 | (match-end 2)) |