all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
Cc: bob@rattlesnake.com, karl@freefriends.org, emacs-devel@gnu.org
Subject: Re: 3 dots vanish at end of filled line
Date: Fri, 21 Oct 2005 14:55:00 +0300	[thread overview]
Message-ID: <878xwn5b4j.fsf@jurta.org> (raw)
In-Reply-To: <E1ESjzQ-0004a0-0r@fencepost.gnu.org> (Richard M. Stallman's message of "Thu, 20 Oct 2005 19:38:28 -0400")

> 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	other threads:[~2005-10-21 11:55 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-07 20:32 3 dots vanish at end of filled line Karl Berry
2005-10-07 21:12 ` Juri Linkov
2005-10-07 21:21   ` Karl Berry
2005-10-07 21:47     ` Juri Linkov
2005-10-07 23:12       ` Karl Berry
2005-10-07 23:56       ` Luc Teirlinck
2005-10-08  2:54       ` Luc Teirlinck
2005-10-08 22:57     ` Richard M. Stallman
2005-10-09  0:14       ` Karl Berry
2005-10-09  0:57       ` Luc Teirlinck
2005-10-09  6:11         ` Juri Linkov
2005-10-09 17:17           ` Karl Berry
2005-10-09 19:16             ` Luc Teirlinck
2005-10-10 15:00               ` Stefan Monnier
2005-10-10 17:07                 ` Karl Berry
2005-10-10 18:01                   ` Stefan Monnier
2005-10-11 14:46                     ` Richard M. Stallman
2005-10-11 17:06                       ` Stefan Monnier
2005-10-10 23:48                   ` Richard M. Stallman
2005-10-10 23:48                   ` Richard M. Stallman
2005-10-11  2:18                 ` Luc Teirlinck
2005-10-11  3:31                 ` Luc Teirlinck
2005-10-11 22:42                   ` Richard M. Stallman
2005-10-12  0:21                     ` Luc Teirlinck
2005-10-12 19:47                     ` Stefan Monnier
2005-10-13 20:10                       ` Richard M. Stallman
2005-10-28  4:41                       ` KOBAYASHI Yasuhiro
2005-10-10  6:18             ` Juri Linkov
2005-10-09 19:54           ` Luc Teirlinck
2005-10-10  4:14         ` Richard M. Stallman
2005-10-10 15:02           ` Stefan Monnier
2005-10-10 23:47             ` Richard M. Stallman
2005-10-09 11:09       ` Robert J. Chassell
2005-10-10  4:14         ` Richard M. Stallman
2005-10-10 12:21           ` Robert J. Chassell
2005-10-10 23:47             ` Richard M. Stallman
2005-10-11 12:57               ` Robert J. Chassell
2005-10-20 11:11           ` Juri Linkov
2005-10-20 23:38             ` Richard M. Stallman
2005-10-21 11:55               ` Juri Linkov [this message]
2005-10-21 22:19                 ` Richard M. Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878xwn5b4j.fsf@jurta.org \
    --to=juri@jurta.org \
    --cc=bob@rattlesnake.com \
    --cc=emacs-devel@gnu.org \
    --cc=karl@freefriends.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.