From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sebastian Meisel Newsgroups: gmane.emacs.help Subject: Where is the mistake? Date: Sun, 12 Feb 2006 18:43:15 +0100 Organization: EmK Message-ID: <200602121844.04142.sebastianmeisel@web.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0232282481==" X-Trace: sea.gmane.org 1139766373 9364 80.91.229.2 (12 Feb 2006 17:46:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 12 Feb 2006 17:46:13 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Feb 12 18:46:09 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F8LIV-0004oI-DQ for geh-help-gnu-emacs@m.gmane.org; Sun, 12 Feb 2006 18:46:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F8LIU-0003RT-Ow for geh-help-gnu-emacs@m.gmane.org; Sun, 12 Feb 2006 12:46:06 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F8LFL-00012x-6D for help-gnu-emacs@gnu.org; Sun, 12 Feb 2006 12:42:51 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F8LFI-00011h-3W for help-gnu-emacs@gnu.org; Sun, 12 Feb 2006 12:42:50 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F8LFH-00011d-S0 for help-gnu-emacs@gnu.org; Sun, 12 Feb 2006 12:42:47 -0500 Original-Received: from [217.72.192.225] (helo=smtp07.web.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1F8LJY-0007ju-9h for help-gnu-emacs@gnu.org; Sun, 12 Feb 2006 12:47:12 -0500 Original-Received: from [85.216.86.36] (helo=[192.168.2.100]) by smtp07.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.105 #340) id 1F8LFF-0002tu-00 for help-gnu-emacs@gnu.org; Sun, 12 Feb 2006 18:42:45 +0100 Original-To: help-gnu-emacs@gnu.org User-Agent: KMail/1.9.1 X-Sender: sebastianmeisel@web.de X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:33163 Archived-At: --===============0232282481== Content-Type: multipart/signed; boundary="nextPart4674144.FdbPbW675X"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart4674144.FdbPbW675X Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I worked on on my flyspell-incorrect-hook, and again it doesn't work as=20 aspected, but I can't find the error. Maybe someone can have a look: =2D-> (add-hook 'flyspell-incorrect-hook 'flyspell-zusammen()) (setq ispell-dictionary-alist=20 '(("english" "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1) ("german8" "[a-zA-Z=C4=D6=DC=E4=F6=DF=FC]" "[^a-zA-Z=C4=D6=DC=E4=F6=DF=FC]= " "[']" t ("-S" "-d" "german") "~latin1" iso-8859-1))) (setq ispell-dictionary "german8") (defun flyspell-zusammen (beg end poss) "This function is to be called by 'flyspell-incorrect-hook. It looks for=20 german hyphenationmarks (\"-) and=20 checks if the 'misspelled words could be correct parts of combined word in= =20 german language." (save-excursion (when (consp poss) (if (re-search-backward "\"-" (- beg 2) t)=20 (save-excursion=20 (setq temp-buffer (get-buffer-create " *flyspell-temp*")) (copy-to-buffer temp-buffer beg end) (set-buffer temp-buffer) (goto-char (point-min)) (setq word (capitalize (buffer-string))) (when (member word (nth 2 poss)) t)=20 )=20 (if (and (re-search-forward "-" (+ end 2) t) =20 (re-search-backward "[se]" (1- end) t)) (save-excursion=20 (message "hi here") (setq temp-buffer (get-buffer-create " *flyspell-temp*")) (copy-to-buffer temp-buffer beg (1- end)) (set-buffer temp-buffer) (goto-char (point-min)) (setq word (capitalize (buffer-string))) (if (when (member word (nth 2 poss)) t) t (when (member (concat word "e") (nth 2 poss)) t)) ) (if (and (re-search-forward "-" (+ end 2) t) =20 (re-search-backward "[lr]" (1- end) t)) (save-excursion=20 (message "hi there")=20 (setq temp-buffer (get-buffer-create " *flyspell-temp*")) (copy-to-buffer temp-buffer beg end) (set-buffer temp-buffer) (goto-char (point-min)) (setq word (capitalize (buffer-string))) (if (when (member (concat word "e") (nth 2 poss)) t)=20 t nil) )=20 (progn (message "not there") nil))=20 ))))) <-- In Geschichts"-wissenschaft=20 (if (and (re-search-forward "-" (+ end 2) t) =20 (re-search-backward "[se]" (1- end) t)) correctly recognizes that within 2 chars after Geschichts there is a "-, while with Erz=E4hl"-rahmen=20 (if (and (re-search-forward "-" (+ end 2) t) =20 (re-search-backward "[lr]" (1- end) t)) doesn't match the Erz=E4hl"-. What did I do wrong? =2D-=20 Sebastian Meisel --nextPart4674144.FdbPbW675X Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQBD73Pk7mUbbJvmkdkRApiZAJ9DgpfaqXT5+/NtJ3Ai69lXp2mbngCgrlCE NbNAwYX6YwGdTSqUU0t80UI= =m3UD -----END PGP SIGNATURE----- --nextPart4674144.FdbPbW675X-- --===============0232282481== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ help-gnu-emacs mailing list help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs --===============0232282481==--