[Top][All Lists]

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

Re: [ELPA] New package: Auto Capitalize Mode

From: Stefan Monnier
Subject: Re: [ELPA] New package: Auto Capitalize Mode
Date: Sun, 27 Aug 2017 12:36:10 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

> 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))


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

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

    (define-globalized-minor-mode global-auto-capitalize-mode
      auto-capitalize-mode auto-capitalize-mode)


reply via email to

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