comparison lisp/textmodes/fill.el @ 60561:7f57e96cf880

Change encoding to iso-2022-7bit and add coding: tag. (adaptive-fill-regexp): Add more bullets. (fill-french-nobreak-p): Add Latin-1 and Latin-9 guillemets in regexps.
author Kenichi Handa <handa@m17n.org>
date Fri, 11 Mar 2005 02:04:05 +0000
parents fb549e5bb99c
children 801f886872c5 8395880305fe
comparison
equal deleted inserted replaced
60560:003f15290687 60561:7f57e96cf880
1 ;;; fill.el --- fill commands for Emacs 1 ;;; fill.el --- fill commands for Emacs -*- coding: iso-2022-7bit -*-
2 2
3 ;; Copyright (C) 1985,86,92,94,95,96,97,1999,2001,02,03,2004 3 ;; Copyright (C) 1985,86,92,94,95,96,97,1999,2001,02,03,2004
4 ;; Free Software Foundation, Inc. 4 ;; Free Software Foundation, Inc.
5 5
6 ;; Maintainer: FSF 6 ;; Maintainer: FSF
85 :group 'fill) 85 :group 'fill)
86 86
87 (defcustom adaptive-fill-regexp 87 (defcustom adaptive-fill-regexp
88 ;; Added `!' for doxygen comments starting with `//!' or `/*!'. 88 ;; Added `!' for doxygen comments starting with `//!' or `/*!'.
89 ;; Added `%' for TeX comments. 89 ;; Added `%' for TeX comments.
90 (purecopy "[ \t]*\\([-!|#%;>*]+[ \t]*\\|(?[0-9]+[.)][ \t]*\\)*") 90 (purecopy "[ \t]*\\([-!|#%;>*,A7$,1s"s#sC$,2"F(B]+[ \t]*\\|(?[0-9]+[.)][ \t]*\\)*")
91 "*Regexp to match text at start of line that constitutes indentation. 91 "*Regexp to match text at start of line that constitutes indentation.
92 If Adaptive Fill mode is enabled, a prefix matching this pattern 92 If Adaptive Fill mode is enabled, a prefix matching this pattern
93 on the first and second lines of a paragraph is used as the 93 on the first and second lines of a paragraph is used as the
94 standard indentation for the whole paragraph. 94 standard indentation for the whole paragraph.
95 95
302 This is used in `fill-nobreak-predicate' to prevent breaking lines just 302 This is used in `fill-nobreak-predicate' to prevent breaking lines just
303 after an opening paren or just before a closing paren or a punctuation 303 after an opening paren or just before a closing paren or a punctuation
304 mark such as `?' or `:'. It is common in French writing to put a space 304 mark such as `?' or `:'. It is common in French writing to put a space
305 at such places, which would normally allow breaking the line at those 305 at such places, which would normally allow breaking the line at those
306 places." 306 places."
307 (or (looking-at "[ \t]*[])}»?!;:-]") 307 (or (looking-at "[ \t]*[])},A;,b;(B?!;:-]")
308 (save-excursion 308 (save-excursion
309 (skip-chars-backward " \t") 309 (skip-chars-backward " \t")
310 (unless (bolp) 310 (unless (bolp)
311 (backward-char 1) 311 (backward-char 1)
312 (or (looking-at "[([{«]") 312 (or (looking-at "[([{,A+,b+(B]")
313 ;; Don't cut right after a single-letter word. 313 ;; Don't cut right after a single-letter word.
314 (and (memq (preceding-char) '(?\t ?\ )) 314 (and (memq (preceding-char) '(?\t ?\ ))
315 (eq (char-syntax (following-char)) ?w))))))) 315 (eq (char-syntax (following-char)) ?w)))))))
316 316
317 (defcustom fill-nobreak-predicate nil 317 (defcustom fill-nobreak-predicate nil