================================================================
Dear Bug Team!
ispell.el 3.3 as packaged with xemacs doesn't fully like
aspell. Namely, the first time ispell process (which is actually
aspell) is started, check-ispell-version is called to verify the tool
version. Yet aspell doesn't include LIBDIR= line, that
check-ispell-version depends on, into its output. So, we end up with a
stack trace at the bottom of this message.
I propose the followin patch to fix the problem. I simply check the
result of re-search-forward and don't try to do call match-beginning
when there was no match in the first place.
--- xemacs-packages/lisp/ispell/ispell.el~ 2003-02-19 16:13:25.000000000 -0800
+++ xemacs-packages/lisp/ispell/ispell.el 2003-04-09 11:15:36.000000000 -0700
@@ -697,9 +697,10 @@
ispell-version))
(message result))
;; return library path.
- (re-search-forward "LIBDIR = \\\"\\([^ \t\n]*\\)\\\"" nil t)
- (if (match-beginning 0)
- (setq result (buffer-substring (match-beginning 1) (match-end 1)))))
+
+ (if (and (re-search-forward "LIBDIR = \\\"\\([^
\t\n]*\\)\\\"" nil t)
+ (match-beginning 0))
+ (setq result (buffer-substring (match-beginning 1) (match-end 1)))))
(goto-char (point-min))
(if (not (memq status '(0 nil)))
(error "%s exited with %s %s" ispell-program-name
Signaling: (args-out-of-range 0 0)
match-beginning(0)
(if (match-beginning 0) (setq result (buffer-substring ... ...)))
(if interactivep (progn (end-of-line) (setq result ...) (message result))
(re-search-forward "LIBDIR = \\\"\\([^ \n]*\\)\\\"" nil t) (if
(match-beginning 0) (setq result ...)))
(save-excursion (set-buffer (get-buffer-create " *ispell-tmp*"))
(erase-buffer) (setq status (call-process ispell-program-name nil t nil "-vv"))
(goto-char (point-min)) (if interactivep (progn ... ... ...) (re-search-forward
"LIBDIR = \\\"\\([^ \n]*\\)\\\"" nil t) (if ... ...)) (goto-char
(point-min)) (if (not ...) (error "%s exited with %s %s" ispell-program-name ...
status)) (setq case-fold-search t status (re-search-forward ... nil t) case-fold-search
case-fold-search-val) (if (or ... ...) (error "%s version 3 release %d.%d.%d or
greater is required" ispell-program-name ... ... ...) (if ... ...)) (kill-buffer
(current-buffer)))
(let ((case-fold-search-val case-fold-search) (default-major-mode ...) result status)
(save-excursion (set-buffer ...) (erase-buffer) (setq status ...) (goto-char ...) (if
interactivep ... ... ...) (goto-char ...) (if ... ...) (setq case-fold-search t status ...
case-fold-search case-fold-search-val) (if ... ... ...) (kill-buffer ...)) result)
check-ispell-version()
(setq ispell-library-path (check-ispell-version))
(if (and ispell-process (eq ... ...) (or ... ...)) (setq ispell-filter nil
ispell-filter-continue nil) (ispell-kill-ispell t) (message "Starting new Ispell
process...") (sit-for 0) (setq ispell-library-path (check-ispell-version)) (setq
ispell-process (let ... ...) ispell-filter nil ispell-filter-continue nil
ispell-process-directory default-directory) (set-process-filter ispell-process (quote
ispell-filter)) (if (and ... ...) (set-process-coding-system ispell-process ... ...)) (if
(not version18p) (accept-process-output ispell-process 3) (accept-process-output
ispell-process)) (if (null ispell-filter) (accept-process-output ispell-process 3)) (cond
(... ...) (... nil) (t ... ... ...)) (setq ispell-filter nil) (let (...) (if
extended-char-mode ...)) (process-kill-without-query ispell-process))
ispell-init-process()
ispell-buffer-local-words()
ispell-accept-buffer-local-defs()
(if (not recheckp) (ispell-accept-buffer-local-defs))
ispell-region(1 121938)
(lambda nil "Check the current buffer for spelling errors interactively."
(interactive) (ispell-region (point-min) (point-max)))()
call-interactively(ispell-buffer)
command-execute(ispell-buffer t)
execute-extended-command(nil)
call-interactively(execute-extended-command)
================================================================
Show replies by date