[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ELPA] New package: Auto Capitalize Mode
From: |
Ian Dunn |
Subject: |
Re: [ELPA] New package: Auto Capitalize Mode |
Date: |
Sun, 27 Aug 2017 20:49:16 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
>>>>> "Stefan" == Stefan Monnier <address@hidden> 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.
auto-capitalize-mode.el
Description: application/emacs-lisp
--
Ian Dunn