all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: [ELPA] New package: Auto Capitalize Mode
Date: Sun, 27 Aug 2017 12:36:10 -0400	[thread overview]
Message-ID: <jwvtw0tkm5x.fsf-monnier+gmane.emacs.devel@gnu.org> (raw)
In-Reply-To: 87d17hdmnm.fsf@escafil

> If there are no issues, I'll push it to the git repo myself.

No objection on my side.  Thanks you.
Just one comment:

> (defvar-local auto-capitalize-sentence-bounds-function
>   #'auto-capitalize--default-sentence-bounds
>   "Function to determine the bounds of the current sentence.
>
> Should return the bounds just as `bounds-of-thing-at-point'.")

You only use the `car` part of the return value AFAICT, so requiring the
cdr part just imposes an extra burden.

IOW, I'd remove the `car` you have (twice) in auto-capitalize--run and
put it inside auto-capitalize--default-sentence-bounds instead
(and rename since it doesn't return "bounds" any more).

> (defun turn-on-auto-capitalize-mode ()
>   (auto-capitalize-mode 1))

AKA 

    (defun turn-on-auto-capitalize-mode ()
      (auto-capitalize-mode))

hence, it's unnecessary, you can just do:

    ;;;###autoload
    (define-globalized-minor-mode global-auto-capitalize-mode
      auto-capitalize-mode auto-capitalize-mode)


        Stefan




  reply	other threads:[~2017-08-27 16:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-27 16:02 [ELPA] New package: Auto Capitalize Mode Ian Dunn
2017-08-27 16:36 ` Stefan Monnier [this message]
2017-08-28  0:49   ` Ian Dunn
2017-08-29 12:31 ` Uwe Brauer
2017-08-30  0:35   ` Ian Dunn
2017-08-30  7:29     ` Uwe Brauer
2017-09-01  2:19       ` Ian Dunn
2017-09-01  2:29         ` Stefan Monnier
2017-09-02 19:23           ` [ELPA] New package: Captain (was [ELPA] New package: Auto Capitalize Mode) Ian Dunn
2017-09-02 19:43             ` Stefan Monnier
2017-09-02 21:16               ` Ian Dunn
2017-09-02  7:54         ` [ELPA] New package: Auto Capitalize Mode Uwe Brauer
2017-09-03 14:08           ` Timur Aydin

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=jwvtw0tkm5x.fsf-monnier+gmane.emacs.devel@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.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.