[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/textmodes/fill.el
From: |
Kim F. Storm |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/textmodes/fill.el |
Date: |
Wed, 13 Nov 2002 18:32:21 -0500 |
Index: emacs/lisp/textmodes/fill.el
diff -c emacs/lisp/textmodes/fill.el:1.150 emacs/lisp/textmodes/fill.el:1.151
*** emacs/lisp/textmodes/fill.el:1.150 Thu Nov 7 17:50:57 2002
--- emacs/lisp/textmodes/fill.el Wed Nov 13 18:32:21 2002
***************
*** 316,325 ****
:type 'hook
:options '(fill-french-nobreak-p fill-single-word-nobreak-p))
(defun fill-nobreak-p ()
"Return nil if breaking the line at point is allowed.
! Can be customized with the variable `fill-nobreak-predicate'."
! (unless (bolp)
(or
;; Don't break after a period followed by just one space.
;; Move back to the previous place to break.
--- 316,333 ----
:type 'hook
:options '(fill-french-nobreak-p fill-single-word-nobreak-p))
+ (defcustom fill-nobreak-invisible nil
+ "Non-nil means that fill command do not break lines in invisible text."
+ :type 'boolean
+ :group 'fill)
+
(defun fill-nobreak-p ()
"Return nil if breaking the line at point is allowed.
! Can be customized with the variables `fill-nobreak-predicate'
! and `fill-nobreak-invisible'."
! (or
! (and fill-nobreak-invisible (line-move-invisible (point)))
! (unless (bolp)
(or
;; Don't break after a period followed by just one space.
;; Move back to the previous place to break.
***************
*** 340,346 ****
(unless use-hard-newlines
(save-excursion
(skip-chars-forward " \t") (looking-at paragraph-start)))
! (run-hook-with-args-until-success 'fill-nobreak-predicate))))
;; Put `fill-find-break-point-function' property to charsets which
;; require special functions to find line breaking point.
--- 348,354 ----
(unless use-hard-newlines
(save-excursion
(skip-chars-forward " \t") (looking-at paragraph-start)))
! (run-hook-with-args-until-success 'fill-nobreak-predicate)))))
;; Put `fill-find-break-point-function' property to charsets which
;; require special functions to find line breaking point.
***************
*** 525,530 ****
--- 533,543 ----
;; Give newline the properties of the space(s) it replaces
(set-text-properties (1- (point)) (point)
(text-properties-at (point)))
+ ;; If we don't want breaks in invisible text, don't insert
+ ;; an invisible newline.
+ (if fill-nobreak-invisible
+ (remove-text-properties (1- (point)) (point)
+ '(invisible t)))
(if (or fill-prefix
(not fill-indent-according-to-mode))
(indent-to-left-margin)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/textmodes/fill.el,
Kim F. Storm <=