From: Ian Dunn <dunni@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: [ELPA] New package: Auto Capitalize Mode
Date: Sun, 27 Aug 2017 20:49:16 -0400 [thread overview]
Message-ID: <87k21ocy9f.fsf@escafil> (raw)
In-Reply-To: <jwvtw0tkm5x.fsf-monnier+gmane.emacs.devel@gnu.org> (Stefan Monnier's message of "Sun, 27 Aug 2017 12:36:10 -0400")
[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]
>>>>> "Stefan" == Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> If there are no issues, I'll push it to the git repo myself.
Stefan> 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'.")
Stefan> You only use the `car` part of the return value AFAICT, so
Stefan> requiring the cdr part just imposes an extra burden.
Stefan> IOW, I'd remove the `car` you have (twice) in
Stefan> auto-capitalize--run and put it inside
Stefan> auto-capitalize--default-sentence-bounds instead (and rename
Stefan> since it doesn't return "bounds" any more).
>> (defun turn-on-auto-capitalize-mode () (auto-capitalize-mode 1))
Stefan> AKA
Stefan> (defun turn-on-auto-capitalize-mode ()
Stefan> (auto-capitalize-mode))
Stefan> hence, it's unnecessary, you can just do:
Stefan> ;;;###autoload (define-globalized-minor-mode
Stefan> global-auto-capitalize-mode auto-capitalize-mode
Stefan> auto-capitalize-mode)
I agree on both counts. I've attached a file with the fixes applied.
[-- Attachment #2: auto-capitalize-mode.el --]
[-- Type: application/emacs-lisp, Size: 4732 bytes --]
[-- Attachment #3: Type: text/plain, Size: 14 bytes --]
--
Ian Dunn
next prev parent reply other threads:[~2017-08-28 0:49 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
2017-08-28 0:49 ` Ian Dunn [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k21ocy9f.fsf@escafil \
--to=dunni@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).