Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Emanuel Berg <embe8573@student.uu.se>
To: info-gnus-english@gnu.org
Subject: Re: Trigger spell checking before sending
Date: Sat, 13 Feb 2016 05:42:20 +0100	[thread overview]
Message-ID: <87mvr5ql03.fsf@debian.uxu> (raw)
In-Reply-To: <87vb5uvxbd.fsf@pietrop-debian64RfL.eng.citrite.net>

Pietro <pulsarpietro@posteo.net> writes:

> Alternatively I am thinking of writing a function
> which asks the user for the language the ispell
> function should check for, it does not need to
> accept all the languages and for instance I would be
> more than happy to have something like that :
>
> Mini-buffer says: [Which language ?[e : English, i:
> Italian]

I still don't like the idea of having this complicated
a thing in a hook; on the other hand, I just realized
that the code I provided isn't compatible with the
hook solution, so it isn't of any help if you are set
on that idea.

OK, try this, only change the Swedish stuff for
Italian, no?

(defun message-spell-before-send (lang-char)
  (interactive "s(e)nglish or (s)wedish: ")
  (let ((lang (pcase lang-char
                ("e" "american-insane") ; these has to be added outside of Emacs
                ("s" "svenska") )))
    (if lang
        (progn
          (ispell-change-dictionary lang) ; N.B. side-effect - this isn't reset
          (ispell-message) )
      (message "Spelling not done - no support for: %s" lang-char) )))

If you don't want to spell, just hit RET.

-- 
underground experts united
http://user.it.uu.se/~embe8573



  parent reply	other threads:[~2016-02-13  4:42 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-11 22:47 Pietro
2016-02-11 23:34 ` Emanuel Berg
2016-02-12 14:05   ` Pietro
2016-02-13  3:27     ` Emanuel Berg
2016-02-13  4:42     ` Emanuel Berg [this message]
2016-02-18 16:11       ` Pietro
2016-02-19  0:17         ` Emanuel Berg
2016-02-19 10:20           ` Pietro
2016-03-05 17:38             ` Pietro
2016-03-05 17:43               ` Pietro
2016-03-06  5:53                 ` Emanuel Berg
2016-02-19 13:53           ` B.V. Raghav
2016-02-19 20:15             ` Emanuel Berg
2016-02-20  7:12               ` B.V. Raghav
2016-02-15 11:12     ` Peter Münster
2016-02-12  0:07 ` Trigger spell checking before sending [flyspell?] Andrzej A. Filip
2016-02-12  0:21   ` Emanuel Berg
2016-02-12  8:58     ` Andrzej A. Filip
2016-02-13  4:47       ` Emanuel Berg
     [not found]   ` <mailman.4442.1455236524.843.info-gnus-english@gnu.org>
2016-02-12  9:41     ` Loris Bennett
2016-02-13  5:00       ` Emanuel Berg
2016-02-12  7:31 ` Trigger spell checking before sending Eric S Fraga

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mvr5ql03.fsf@debian.uxu \
    --to=embe8573@student.uu.se \
    --cc=info-gnus-english@gnu.org \
    /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.
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 NNTP newsgroup(s).