[Top][All Lists]

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

Re: [ELPA] New package: Auto Correct Mode

From: Eli Zaretskii
Subject: Re: [ELPA] New package: Auto Correct Mode
Date: Sun, 27 Aug 2017 19:34:26 +0300

> From: Ian Dunn <address@hidden>
> Date: Sun, 27 Aug 2017 12:06:06 -0400
> I'd like to submit auto-correct.el as a single-file package to ELPA.  It's a 
> small package that integrates with ispell and abbrev to provide auto-correct 
> functionality in Emacs.  It uses a separate abbrev table, which is only 
> enabled in auto-correct-mode, and only auto-corrects if a buffer-local 
> predicate returns true.
> As with the last two I've submitted today, if no one has any objections, I'll 
> update the copyright and push it to the git repo.

Thanks.  Please allow me a few stylistic comments:

> ;;; Commentary:
> ;;; Code:

I suggest to say at least a few words about the package and what it
does (or doesn't do) in the Commentary section.  "Auto-correct" sounds
very promising, so users might have their expectations too high...

> (defgroup auto-correct nil
>   "*Auto correction support."

We no longer use the leading asterisk in doc strings.

> (defun auto-correct-fix-and-add (p)
>   "Call `ispell-word', then create an abbrev for it.
> With prefix P, create local abbrev. Otherwise it will
> be global.

Our usual style is

  "With a non-nil argument P (interactively, the prefix argument),
  create ..."

Also, we use the US English convention of leaving 2 spaces between

> Originally pulled from endless parenthesis."


>       ;; correction was entered by hand.

Comments should preferably be full sentences, so start with a capital

> ;;;###autoload
> (defun auto-correct-scan-buffer ()
>   "Scans current buffer for misspelled words.

Our usual style is to say "Scan", not "Scans".

> When a misspelled word is found, offers to correct and add."
Resp. "offer".  Also, I'd elaborate a bit wrt "and add", as it
otherwise sounds mysterious.

> (defun auto-correct-scan-region (start end)
>   (interactive "r")

Interactive functions should have a doc string.

> (defun auto-correct-scan ()
>   "Scans the buffer or region."

This doc string sounds too minimal...

Thanks again for working on this.

reply via email to

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