/[emacs]/emacs/lisp/textmodes/fill.el
ViewVC logotype

Diff of /emacs/lisp/textmodes/fill.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.150 by monnier, Thu Nov 7 22:50:57 2002 UTC revision 1.151 by kfstorm, Wed Nov 13 23:32:21 2002 UTC
# Line 316  be tested.  If it returns t, fill comman Line 316  be tested.  If it returns t, fill comman
316    :type 'hook    :type 'hook
317    :options '(fill-french-nobreak-p fill-single-word-nobreak-p))    :options '(fill-french-nobreak-p fill-single-word-nobreak-p))
318    
319    (defcustom fill-nobreak-invisible nil
320      "Non-nil means that fill command do not break lines in invisible text."
321      :type 'boolean
322      :group 'fill)
323    
324  (defun fill-nobreak-p ()  (defun fill-nobreak-p ()
325    "Return nil if breaking the line at point is allowed.    "Return nil if breaking the line at point is allowed.
326  Can be customized with the variable `fill-nobreak-predicate'."  Can be customized with the variables `fill-nobreak-predicate'
327    (unless (bolp)  and `fill-nobreak-invisible'."
328      (or
329       (and fill-nobreak-invisible (line-move-invisible (point)))
330       (unless (bolp)
331      (or      (or
332       ;; Don't break after a period followed by just one space.       ;; Don't break after a period followed by just one space.
333       ;; Move back to the previous place to break.       ;; Move back to the previous place to break.
# Line 340  Can be customized with the variable `fil Line 348  Can be customized with the variable `fil
348       (unless use-hard-newlines       (unless use-hard-newlines
349         (save-excursion         (save-excursion
350           (skip-chars-forward " \t") (looking-at paragraph-start)))           (skip-chars-forward " \t") (looking-at paragraph-start)))
351       (run-hook-with-args-until-success 'fill-nobreak-predicate))))       (run-hook-with-args-until-success 'fill-nobreak-predicate)))))
352    
353  ;; Put `fill-find-break-point-function' property to charsets which  ;; Put `fill-find-break-point-function' property to charsets which
354  ;; require special functions to find line breaking point.  ;; require special functions to find line breaking point.
# Line 525  The break position will be always after Line 533  The break position will be always after
533    ;; Give newline the properties of the space(s) it replaces    ;; Give newline the properties of the space(s) it replaces
534    (set-text-properties (1- (point)) (point)    (set-text-properties (1- (point)) (point)
535                         (text-properties-at (point)))                         (text-properties-at (point)))
536      ;; If we don't want breaks in invisible text, don't insert
537      ;; an invisible newline.
538      (if fill-nobreak-invisible
539          (remove-text-properties (1- (point)) (point)
540                                  '(invisible t)))
541    (if (or fill-prefix    (if (or fill-prefix
542            (not fill-indent-according-to-mode))            (not fill-indent-according-to-mode))
543        (indent-to-left-margin)        (indent-to-left-margin)

Legend:
Removed from v.1.150  
changed lines
  Added in v.1.151

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26