From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Schlee Newsgroups: gmane.emacs.help Subject: Fw: spell checking a string in elisp code Date: Thu, 30 Aug 2012 08:02:29 -0700 (PDT) Message-ID: <1346338949.62950.YahooMailNeo@web125405.mail.ne1.yahoo.com> References: <1346148275.42110.YahooMailNeo@web125405.mail.ne1.yahoo.com> <871uirt1n0.fsf@gmail.com> <1346220977.9904.YahooMailNeo@web125402.mail.ne1.yahoo.com> Reply-To: Stefan Schlee NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="-1772663527-1223280938-1346338949=:62950" X-Trace: ger.gmane.org 1346338969 32525 80.91.229.3 (30 Aug 2012 15:02:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Aug 2012 15:02:49 +0000 (UTC) To: "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 30 17:02:50 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T76Gf-0007T1-Oq for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Aug 2012 17:02:50 +0200 Original-Received: from localhost ([::1]:53726 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T76Gd-0004b6-D4 for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Aug 2012 11:02:47 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57421) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T76GW-0004ap-UG for help-gnu-emacs@gnu.org; Thu, 30 Aug 2012 11:02:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T76GN-0007Et-5b for help-gnu-emacs@gnu.org; Thu, 30 Aug 2012 11:02:40 -0400 Original-Received: from nm24-vm1.bullet.mail.ne1.yahoo.com ([98.138.90.45]:27033) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1T76GM-0007Ec-TA for help-gnu-emacs@gnu.org; Thu, 30 Aug 2012 11:02:31 -0400 Original-Received: from [98.138.90.57] by nm24.bullet.mail.ne1.yahoo.com with NNFMP; 30 Aug 2012 15:02:29 -0000 Original-Received: from [98.138.89.240] by tm10.bullet.mail.ne1.yahoo.com with NNFMP; 30 Aug 2012 15:02:29 -0000 Original-Received: from [127.0.0.1] by omp1013.mail.ne1.yahoo.com with NNFMP; 30 Aug 2012 15:02:29 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 767057.98647.bm@omp1013.mail.ne1.yahoo.com Original-Received: (qmail 70004 invoked by uid 60001); 30 Aug 2012 15:02:29 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1346338949; bh=YzpSVk2Si6cHTe26VsjemJ6rKy3bI3hk+sKR/lQumhs=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=S5pE/A6kOn/4kPXPlEdYua4HxpLIy5CEz04ika0K3Dlyb9Fk0QHzGFy1ytVrvhyeHKvzqYnj27dW96UO9EMNQaEqmrnxQ+yVLPCVrBgDL6q1uwGVbsiSXahUwwu5sw1Zn49V31H3kMgu0ZhoexNeseSzougN6Zuop8z7kagZj/A= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=lFCspx5vDbSgkHGO7SDtCK3gMR9jPZRGN2m3HqC3LCNK2p8LngGEAzIH4/JjeS/MODVs6+0erPBkLgi7XC2Wh6EHUQAn17NG97HtlNFrhx72FjL64lRHrKfvZj2Z0GJt53HoqF8hSUrdzE8W9hjFN+36puLqoKKX1NDqVCsfNLM=; X-YMail-OSG: wVBJ34QVM1nouCvAKxi1sJA9c3B9YzlmmUBlrzNfnrNf4M. 0iY8LssoaPivUdUWPVZlwZcly0txgR6UBOXghosR7Y5E4Uo3o08uaLCPhkoT 3zili0zsfdb18FiY4OVmaa9bwFF80GW2CH1TrXNLMoz1ZlbWMXShMjUWAwwM FUBOk.EUP6AbS3SBBewShI7q7GizWp6gZ5bQaspP6SgIngrfYaICA3svEfgJ 55udjK5Uzen7ky6D213ytaOqpKtFrXeS3A8AW1nLeaGf4e2I14vFk7RbCbr4 feBO0nZV54Nvf2z2S9s0f75RMYXqS3L0IyI5QUGV0SZeBZpRlePcwimheyf6 acoOtOk4Kmtzou1bneCXg2SAYRXOq6SS2ZFDoUbK0rjWg0_VLJW2PSs5dxfU f_HwkggVPCXa9A6MRZD5.a0tYLIof_IVejjP98raWJ_D_RLqmIOx37t06gI8 UKqPRknPQQxIurUaBhWqKymnP4WDFZfLYHgx8i95cG75Y2g-- Original-Received: from [93.82.14.53] by web125405.mail.ne1.yahoo.com via HTTP; Thu, 30 Aug 2012 08:02:29 PDT X-Mailer: YahooMailWebService/0.8.121.416 In-Reply-To: <1346220977.9904.YahooMailNeo@web125402.mail.ne1.yahoo.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 98.138.90.45 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:86591 Archived-At: ---1772663527-1223280938-1346338949=:62950 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable =0A=0AThank you for your quick reply.=A0 As far as I understand `ispell-wor= d=B4 only works for words in a buffer.=A0 I want to check the spelling of a= string referred to from a variable form within elisp code.=0A=0A=0A=0A=0A>= Hello dear list!=0A>=0A> I am posed with the problem to look up strings fr= om within my elisp=0A> code in one of the dictionaries that emacs uses. The= re used to be a=0A> function 'spell-string' but the spell-packages is obsol= eted and the=0A> build in help system refers me to 'ispell'. But I cannot f= ind an=0A> equivalent function in the 'ispell' package. Does any one know a= =0A> solution?=0A=0AMay be this?=0A=0A,----[ C-h k M-$ ]=0A| M-$ runs the c= ommand ispell-word, which is an interactive autoloaded=0A| compiled Lisp fu= nction in `ispell.el'.=0A| =0A| It is bound to M-$, .=0A| =0A| (ispell-word &optional FOLLOWING QUIETLY CONTIN= UE REGION)=0A| =0A| Check spelling of word under or before the=0A cursor.= =0A| If the word is not found in dictionary, display possible corrections= =0A| in a window allowing you to choose one.=0A| =0A| If optional argument = FOLLOWING is non-nil or if `ispell-following-word'=0A| is non-nil when call= ed interactively, then the following word=0A| (rather than preceding) is ch= ecked when the cursor is not over a word.=0A| When the optional argument QU= IETLY is non-nil or `ispell-quietly' is non-nil=0A| when called interactive= ly, non-corrective messages are suppressed.=0A| =0A| With a prefix argument= (or if CONTINUE is non-nil),=0A| resume interrupted spell-checking of a bu= ffer or region.=0A| =0A| Interactively, in Transient Mark mode when the mar= k is active, call=0A| `ispell-region' to check the active region for spelli= ng errors.=0A| =0A| Word syntax is controlled by the definition of the chos= en dictionary,=0A| which is in `ispell-local-dictionary-alist' or `ispell-d= ictionary-alist'.=0A| =0A| This will check=0A or reload the dictionary.=A0 = Use M-x ispell-change-dictionary=0A| or M-x ispell-region to update the Isp= ell process.=0A| =0A| Return values:=0A| nil=A0 =A0 =A0 =A0 =A0 word is co= rrect or spelling is accepted.=0A| 0=A0 =A0 =A0 =A0 =A0 =A0 word is insert= ed into buffer-local definitions.=0A| "word"=A0 =A0 =A0 =A0 word corrected = from word list.=0A| ("word" arg)=A0 word is hand entered.=0A| quit=A0 =A0 = =A0 =A0 =A0 spell session exited.=0A| =0A| [back]=0A`----=0A=0A=0A=0A> Than= ks in advance=0A>=0A> Stefan=0A>=0A=0A-- ---1772663527-1223280938-1346338949=:62950 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable

Thank you for your quick reply.  As far as I understand `ispell-wor= d=B4 only works for words in a buffer.  I want to check the spelling o= f a string referred to from a variable form within elisp code.
<= div style=3D"font-family: arial,helvetica,sans-serif; font-size: 12pt;">


> Hello dear l= ist!
>
> I am posed with the problem to look up strings from wi= thin my elisp
> code in one of the dictionaries that emacs uses. Ther= e used to be a
> function 'spell-string' but the spell-packages is obsolete= d and the
> build in help system refers me to 'ispell'. But I cannot = find an
> equivalent function in the 'ispell' package. Does any one k= now a
> solution?

May be this?

,----[ C-h k M-$ ]
| = M-$ runs the command ispell-word, which is an interactive autoloaded
| c= ompiled Lisp function in `ispell.el'.
|
| It is bound to M-$, <me= nu-bar> <tools> <spell> <ispell-word>.
|
| (isp= ell-word &optional FOLLOWING QUIETLY CONTINUE REGION)
|
| Check = spelling of word under or before the=0A cursor.
| If the word is not fou= nd in dictionary, display possible corrections
| in a window allowing yo= u to choose one.
|
| If optional argument FOLLOWING is non-nil or if= `ispell-following-word'
| is non-nil when called interactively, then th= e following word
| (rather than preceding) is checked when the cursor is= not over a word.
| When the optional argument QUIETLY is non-nil or `is= pell-quietly' is non-nil
| when called interactively, non-corrective mes= sages are suppressed.
|
| With a prefix argument (or if CONTINUE is = non-nil),
| resume interrupted spell-checking of a buffer or region.
= |
| Interactively, in Transient Mark mode when the mark is active, call=
| `ispell-region' to check the active region for spelling errors.
| =
| Word syntax is controlled by the definition of the chosen dictionary,=
| which is in `ispell-local-dictionary-alist' or `ispell-dictionary-ali= st'.
|
| This will check=0A or reload the dictionary.  Use M-x = ispell-change-dictionary
| or M-x ispell-region to update the Ispell pro= cess.
|
| Return values:
| nil          = word is correct or spelling is accepted.
| 0       =     word is inserted into buffer-local definitions.
| "word"=         word corrected from word list.
| ("word" arg= )  word is hand entered.
| quit          s= pell session exited.
|
| [back]
`----



> Thanks = in advance
>
> Stefan
>

--




---1772663527-1223280938-1346338949=:62950--