From: Dirk Ullrich <dirk.ullrich@googlemail.com>
To: 8579@debbugs.gnu.org
Subject: bug#8579: 24.0.50; ispell bug in `ispell-add-per-file-word-list'
Date: Thu, 28 Apr 2011 18:08:26 +0200 [thread overview]
Message-ID: <BANLkTiktJxwjYJ92jX6ZM6qGez0Bzk4Gkg@mail.gmail.com> (raw)
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 <tab> <backspace> <backspace> <backspace>
<backspace> / t <tab> f l <tab> <return> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <S-down>
<S-down> <delete> <backspace> <up> <up> <right> <right>
<right> <right> <right> <left> <S-down> <S-down> <insert>
<delete> <backspace> <up> <up> <up> <up> <up> <up>
<down> <down> <down> <down> <down> <down> <insert>
C-x C-s M-x f l <backspace> <backspace> i s <tab> p
<tab> - <tab> w <tab> <return> ? ? ? ? e <backspace>
<backspace> <backspace> s s s s M-x <up> <down> f l
y <tab> s <tab> m <tab> <return> C-c $ <down-mouse-1>
<mouse-1> <up> <up> <up> <up> <up> <S-down> <S-down>
<S-down> <S-down> <S-down> <delete> <delete> <right>
<right> <right> <right> <right> M-x r e p o <tab> r
<tab> <return>
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)
next reply other threads:[~2011-04-28 16:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-28 16:08 Dirk Ullrich [this message]
2011-05-03 11:12 ` bug#8579: 24.0.50; ispell bug in `ispell-add-per-file-word-list' Agustin Martin
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BANLkTiktJxwjYJ92jX6ZM6qGez0Bzk4Gkg@mail.gmail.com \
--to=dirk.ullrich@googlemail.com \
--cc=8579@debbugs.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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).