From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: Auto Capitalize Mode Date: Sun, 27 Aug 2017 12:36:10 -0400 Message-ID: References: <87d17hdmnm.fsf@escafil> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1503851900 4665 195.159.176.226 (27 Aug 2017 16:38:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 27 Aug 2017 16:38:20 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 27 18:38:17 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dm0ZX-0000Qe-O7 for ged-emacs-devel@m.gmane.org; Sun, 27 Aug 2017 18:38:03 +0200 Original-Received: from localhost ([::1]:33310 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dm0Ze-0007qh-KS for ged-emacs-devel@m.gmane.org; Sun, 27 Aug 2017 12:38:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46552) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dm0YO-0007Bp-NB for emacs-devel@gnu.org; Sun, 27 Aug 2017 12:36:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dm0YK-0001c0-Qf for emacs-devel@gnu.org; Sun, 27 Aug 2017 12:36:52 -0400 Original-Received: from [195.159.176.226] (port=35150 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dm0YK-0001bd-Jw for emacs-devel@gnu.org; Sun, 27 Aug 2017 12:36:48 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dm0Xv-0003sm-Es for emacs-devel@gnu.org; Sun, 27 Aug 2017 18:36:23 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 34 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:cgetgYkfsF61UR80W7fLM2VHSBA= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:217852 Archived-At: > 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