From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dirk Ullrich Newsgroups: gmane.emacs.bugs Subject: bug#8579: 24.0.50; ispell bug in `ispell-add-per-file-word-list' Date: Thu, 28 Apr 2011 18:08:26 +0200 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1304084158 20751 80.91.229.12 (29 Apr 2011 13:35:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 29 Apr 2011 13:35:58 +0000 (UTC) To: 8579@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Apr 29 15:35:50 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QFnrK-0007kP-ES for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 Apr 2011 15:35:50 +0200 Original-Received: from localhost ([::1]:41716 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFnrJ-0002DZ-Qd for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 Apr 2011 09:35:49 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:48059) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFXUF-0005rw-4S for bug-gnu-emacs@gnu.org; Thu, 28 Apr 2011 16:06:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QFXUD-0007ua-HW for bug-gnu-emacs@gnu.org; Thu, 28 Apr 2011 16:06:55 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45904) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFXUD-0007uV-EF for bug-gnu-emacs@gnu.org; Thu, 28 Apr 2011 16:06:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QFX85-0001Hc-R8; Thu, 28 Apr 2011 15:44:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dirk Ullrich Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Apr 2011 19:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 8579 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13040198004858 (code B ref -1); Thu, 28 Apr 2011 19:44:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Apr 2011 19:43:20 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QFX7O-0001GI-Mp for submit@debbugs.gnu.org; Thu, 28 Apr 2011 15:43:20 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QFTld-0004pV-Ad for submit@debbugs.gnu.org; Thu, 28 Apr 2011 12:08:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QFTlW-0006GI-N5 for submit@debbugs.gnu.org; Thu, 28 Apr 2011 12:08:31 -0400 Original-Received: from lists.gnu.org ([140.186.70.17]:60699) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFTlW-0006GE-LT for submit@debbugs.gnu.org; Thu, 28 Apr 2011 12:08:30 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:54983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFTlV-0001qO-GR for bug-gnu-emacs@gnu.org; Thu, 28 Apr 2011 12:08:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QFTlU-0006Fw-1l for bug-gnu-emacs@gnu.org; Thu, 28 Apr 2011 12:08:29 -0400 Original-Received: from mail-gy0-f169.google.com ([209.85.160.169]:46401) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFTlT-0006Fk-Sh for bug-gnu-emacs@gnu.org; Thu, 28 Apr 2011 12:08:27 -0400 Original-Received: by gyd8 with SMTP id 8so1234391gyd.0 for ; Thu, 28 Apr 2011 09:08:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=tCPRsMLGBdDrQDzFRTG9RVlC8XhoJrITBo3g1OmFEBw=; b=KSta85hqfTieM1iz99zMx4tvFeOQglkQRrr8v/ixXr7+rqBqtc6XPPvKjcpola+j5q QJOd3HuUGNYiGUxM/2pDy2/5I4U/RBIbXmwKWogr22EPS93o4XIAluuNgUc/WJfSvt4f nOfrn3FztneqS3H0OxHH9KGShIrihsinPPUXI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=QB+UBOMdQvboAjmcj40hpJFfZ4Av2i40v8h8VN1kXeCQG8OYPn9QoXR/L+najnTU80 32gR6Rb1A9VjPFeOdTkXhPRXPXdcTgSuG1UjqLVnUW6POJtBbiJ0vSFSFnywovphD47e SYOycO0xwfYlGKkGRks0ZJ3bnXl2XgQpR/imc= Original-Received: by 10.151.4.3 with SMTP id g3mr3184017ybi.152.1304006906073; Thu, 28 Apr 2011 09:08:26 -0700 (PDT) Original-Received: by 10.150.178.16 with HTTP; Thu, 28 Apr 2011 09:08:26 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Thu, 28 Apr 2011 15:43:18 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 28 Apr 2011 15:44:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-Mailman-Approved-At: Fri, 29 Apr 2011 09:35:42 -0400 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:46076 Archived-At: This bug report will be sent to the Free Software Foundation, not to your local site managers! Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your report will be posted to the bug-gnu-emacs@gnu.org mailing list and the gnu.emacs.bug news group, and at http://debbugs.gnu.org. Please describe exactly what actions triggered the bug and the precise symptoms of the bug. If you can, give a recipe starting from `emacs -Q': * How to reproduce the bug: Load a text file; Enable `flyspell-mode' Type a word not contained in the active Ispell dictionary, and place the point just behind the word; Run command `flyspell-correct-word-before-point', and choose the option `Accept (Buffer)'; * Symptom: Emacs signals an error: flyspell-do-correct: Wrong type argument: char-or-string-p, nil * Diagnosis: `ispell.el's function `ispell-add-per-file-word-list' cannot handle a `nil' value of the `comment-start' variable. * A possible fix: This is a fixed version of `ispell-add-per-file-word-list'. It ignores the comment-related stuff if `comment-begin' (or `comment-end') has value `nil'. (defun ispell-add-per-file-word-list (word) "Add WORD to the per-file word list (fixed version)." (or ispell-buffer-local-name (setq ispell-buffer-local-name (buffer-name))) (save-excursion (goto-char (point-min)) (let (line-okay search done found) (while (not done) (let ((case-fold-search nil)) (setq search (search-forward ispell-words-keyword nil 'move) found (or found search) line-okay (< (+ (length word) 1 ; 1 for space after word.. (progn (end-of-line) (current-column))) fill-column))) (if (or (and search line-okay) (null search)) (progn (setq done t) (if (null search) (progn (open-line 1) (unless found (newline)) (insert (if comment-start (progn (if (fboundp 'comment-padright) ;; Try and use the proper comment marker, ;; e.g. ";;" rather than ";". (comment-padright comment-start (comment-add nil)) comment-start) " ") "") ispell-words-keyword) (if (and comment-end (> (length comment-end) 0)) (save-excursion (newline) (insert comment-end))))) (insert (concat " " word)))))))) If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. For information about debugging Emacs, please read the file /usr/share/emacs/24.0.50/etc/DEBUG. In GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.4) of 2011-04-28 on red Windowing system distributor `The X.Org Foundation', version 11.0.11001000 configured using `configure '--prefix=/usr' '--sysconfdir=/etc' '--localstatedir=/var' '--libexecdir=/usr/lib' '--mandir=/usr/share/man' '--without-sound' '--with-x-toolkit=gtk' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe' 'LDFLAGS=-Wl,--hash-style=gnu -Wl,--as-needed'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: de_DE.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Text Minor modes in effect: flyspell-mode: t tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-x C-f f l / t f l C-x C-s M-x f l i s p - w ? ? ? ? e s s s s M-x f l y s m C-c $ M-x r e p o r Recent messages: Making completion list... [2 times] Starting new Ispell process [default] ... Checking spelling of GGG... You can run the command `ispell-word' with M-$ Making completion list... Flyspell mode enabled flyspell-do-correct: Wrong type argument: char-or-string-p, nil Auto-saving... Mark set Making completion list... Load-path shadows: /usr/share/emacs/site-lisp/coq-db hides /usr/share/emacs/site-lisp/ProofGeneral/coq/coq-db /usr/share/emacs/site-lisp/coq-syntax hides /usr/share/emacs/site-lisp/ProofGeneral/coq/coq-syntax /usr/share/emacs/site-lisp/coq hides /usr/share/emacs/site-lisp/ProofGeneral/coq/coq /usr/share/emacs/24.0.50/lisp/erc/erc-hecomplete hides /usr/share/emacs/24.0.50/lisp/obsolete/erc-hecomplete Features: (shadow sort mail-extr message idna sendmail format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev mail-utils gmm-utils mailheader emacsbug url-util url-parse auth-source eieio byte-opt bytecomp byte-compile cconv macroexp assoc gnus-util time-date password-cache url-vars mm-util mail-prsvr flyspell regexp-opt ispell help-mode easymenu view vc-git tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)