Mercurial > emacs
comparison lisp/textmodes/fill.el @ 26898:182d67795a5b
(fill-find-break-point): Delete codes for
composite characters.
(fill-region-as-paragraph): Likewise.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Wed, 15 Dec 1999 00:52:08 +0000 |
parents | 7ab723e4a21a |
children | 523c67808ff4 |
comparison
equal
deleted
inserted
replaced
26897:9895d3c3e7ce | 26898:182d67795a5b |
---|---|
293 (charset (char-charset ch)) | 293 (charset (char-charset ch)) |
294 func) | 294 func) |
295 (if (eq charset 'ascii) | 295 (if (eq charset 'ascii) |
296 (setq ch (preceding-char) | 296 (setq ch (preceding-char) |
297 charset (char-charset ch))) | 297 charset (char-charset ch))) |
298 (if (eq charset 'ascii) | 298 (setq func (get-charset-property charset 'fill-find-break-point-function)) |
299 nil | 299 (if (and func (fboundp func)) |
300 (if (eq charset 'composition) | 300 (funcall func limit)))) |
301 (setq charset (char-charset (composite-char-component ch 0))))) | |
302 (setq func (get-charset-property charset 'fill-find-break-point-function)) | |
303 (if (and func (fboundp func)) | |
304 (funcall func limit)))) | |
305 | 301 |
306 (defun fill-region-as-paragraph (from to &optional justify | 302 (defun fill-region-as-paragraph (from to &optional justify |
307 nosqueeze squeeze-after) | 303 nosqueeze squeeze-after) |
308 "Fill the region as one paragraph. | 304 "Fill the region as one paragraph. |
309 It removes any paragraph breaks in the region and extra newlines at the end, | 305 It removes any paragraph breaks in the region and extra newlines at the end, |
443 ;; character preceding a newline has text property | 439 ;; character preceding a newline has text property |
444 ;; `nospace-between-words'. | 440 ;; `nospace-between-words'. |
445 (while (search-forward "\n" nil t) | 441 (while (search-forward "\n" nil t) |
446 (let ((prev (char-before (match-beginning 0))) | 442 (let ((prev (char-before (match-beginning 0))) |
447 (next (following-char))) | 443 (next (following-char))) |
448 (if (cmpcharp prev) | |
449 (setq prev (composite-char-component prev 0))) | |
450 (if (cmpcharp next) | |
451 (setq next (composite-char-component next 0))) | |
452 (if (and (or (aref (char-category-set next) ?|) | 444 (if (and (or (aref (char-category-set next) ?|) |
453 (aref (char-category-set prev) ?|)) | 445 (aref (char-category-set prev) ?|)) |
454 (or (get-charset-property (char-charset prev) | 446 (or (get-charset-property (char-charset prev) |
455 'nospace-between-words) | 447 'nospace-between-words) |
456 (get-text-property (1- (match-beginning 0)) | 448 (get-text-property (1- (match-beginning 0)) |