emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 3 dots vanish at end of filled line


From: Juri Linkov
Subject: Re: 3 dots vanish at end of filled line
Date: Fri, 21 Oct 2005 14:55:00 +0300
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

> I think this is a cleaner way to implement what Texinfo mode needs.
> Does it work?

There is a dangling opening paren in the default value of sentence-end-base.
I think it is not good to break the grouping construct by moving its
opening paren to sentence-end-base, and leaving the closing paren
in sentence-end.  (Also there were two typos: missing space in `Info
node' and one missing Lisp paren in texinfo.el.)  With the following
fix to your patch I can confirm that it works:

*** emacs/lisp/textmodes/paragraphs.el.orig     Fri Oct 21 14:52:52 2005
--- emacs/lisp/textmodes/paragraphs.el  Fri Oct 21 14:54:09 2005
***************
*** 159,165 ****
    :group 'paragraphs
    :type '(choice regexp (const :tag "Use default value" nil)))
  
! (defcustom sentence-end-base "\\([.?!][]\"'\xd0c9\x5397d)}]*"
    "*Regexp matching the basic end of a sentence, not including following 
space."
    :group 'paragraphs
    :type 'string
--- 159,165 ----
    :group 'paragraphs
    :type '(choice regexp (const :tag "Use default value" nil)))
  
! (defcustom sentence-end-base "[.?!][]\"'\xd0c9\x5397d)}]*"
    "*Regexp matching the basic end of a sentence, not including following 
space."
    :group 'paragraphs
    :type 'string
***************
*** 176,185 ****
  The default value specifies that in order to be recognized as the
  end of a sentence, the ending period, question mark, or exclamation point
  must be followed by two spaces, with perhaps some closing delimiters
! in between.  See Infonode `(elisp)Standard Regexps'."
    (or sentence-end
        (concat (if sentence-end-without-period "\\w  \\|")
!             sentence-end-base
                (if sentence-end-double-space
                    "\\($\\| $\\|\t\\|  \\)" "\\($\\|[\t ]\\)")
                "\\|[" sentence-end-without-space "]+\\)"
--- 176,185 ----
  The default value specifies that in order to be recognized as the
  end of a sentence, the ending period, question mark, or exclamation point
  must be followed by two spaces, with perhaps some closing delimiters
! in between.  See Info node `(elisp)Standard Regexps'."
    (or sentence-end
        (concat (if sentence-end-without-period "\\w  \\|")
!             "\\(" sentence-end-base
                (if sentence-end-double-space
                    "\\($\\| $\\|\t\\|  \\)" "\\($\\|[\t ]\\)")
                "\\|[" sentence-end-without-space "]+\\)"

*** emacs/lisp/textmodes/texinfo.el.orig        Fri Oct 21 14:52:59 2005
--- emacs/lisp/textmodes/texinfo.el     Fri Oct 21 14:54:09 2005
***************
*** 595,601 ****
    (setq paragraph-start (concat "\b\\|@[a-zA-Z]*[ \n]\\|" paragraph-start))
    (make-local-variable 'sentence-end-base)
    (setq sentence-end-base
!       "\\(\\(@\\(end\\)?dots{}\\|[.?!]\\)[]\"'\xd0c9\x5397d)}]*"
    (make-local-variable 'adaptive-fill-mode)
    (setq adaptive-fill-mode nil)
    (make-local-variable 'fill-column)
--- 595,601 ----
    (setq paragraph-start (concat "\b\\|@[a-zA-Z]*[ \n]\\|" paragraph-start))
    (make-local-variable 'sentence-end-base)
    (setq sentence-end-base
!       "\\(@\\(end\\)?dots{}\\|[.?!]\\)[]\"'\xd0c9\x5397d)}]*")
    (make-local-variable 'adaptive-fill-mode)
    (setq adaptive-fill-mode nil)
    (make-local-variable 'fill-column)

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]