comparison lisp/textmodes/=ispell4.el @ 4927:24bb9fff22ce

Fix previous change.
author Richard M. Stallman <rms@gnu.org>
date Sun, 07 Nov 1993 22:50:36 +0000
parents c639a86ac9f1
children 2b5e416494d1
comparison
equal deleted inserted replaced
4926:c639a86ac9f1 4927:24bb9fff22ce
326 (defun ispell-next () 326 (defun ispell-next ()
327 "Resume command loop for most recent Ispell command. 327 "Resume command loop for most recent Ispell command.
328 Return value is t unless exit is due to typing `q'." 328 Return value is t unless exit is due to typing `q'."
329 (interactive) 329 (interactive)
330 (setq ispell-window-configuration nil) 330 (setq ispell-window-configuration nil)
331 (unwind-protect 331 (prog1
332 (catch 'ispell-quit 332 (unwind-protect
333 ;; There used to be a save-excursion here, 333 (catch 'ispell-quit
334 ;; but that was annoying: it's better if point doesn't move 334 ;; There used to be a save-excursion here,
335 ;; when you type q. 335 ;; but that was annoying: it's better if point doesn't move
336 (let (next) 336 ;; when you type q.
337 (while (markerp (setq next (car ispell-bad-words))) 337 (let (next)
338 (switch-to-buffer (marker-buffer next)) 338 (while (markerp (setq next (car ispell-bad-words)))
339 (push-mark) 339 (switch-to-buffer (marker-buffer next))
340 (ispell-point next "at saved position.") 340 (push-mark)
341 (setq ispell-bad-words (cdr ispell-bad-words)) 341 (ispell-point next "at saved position.")
342 (set-marker next nil))) 342 (setq ispell-bad-words (cdr ispell-bad-words))
343 t) 343 (set-marker next nil)))
344 (if ispell-window-configuration 344 t)
345 (set-window-configuration ispell-window-configuration)) 345 (if ispell-window-configuration
346 (cond ((null ispell-bad-words) 346 (set-window-configuration ispell-window-configuration))
347 (error "Ispell has not yet been run.")) 347 (cond ((null ispell-bad-words)
348 ((markerp (car ispell-bad-words)) 348 (error "Ispell has not yet been run."))
349 (message (substitute-command-keys 349 ((markerp (car ispell-bad-words))
350 "Type \\[ispell-next] to continue."))) 350 (message (substitute-command-keys
351 ((eq (car ispell-bad-words) nil) 351 "Type \\[ispell-next] to continue.")))
352 (setq ispell-bad-words nil) 352 ((eq (car ispell-bad-words) nil)
353 (message "No more misspellings (but checker was interrupted.)")) 353 (setq ispell-bad-words nil)
354 ((eq (car ispell-bad-words) t) 354 (message "No more misspellings (but checker was interrupted.)"))
355 (setq ispell-bad-words nil) 355 ((eq (car ispell-bad-words) t)
356 (message "Ispell done.")) 356 (setq ispell-bad-words nil)
357 (t 357 (message "Ispell done."))
358 (setq ispell-bad-words nil) 358 (t
359 (message "Bad ispell internal list")))) 359 (setq ispell-bad-words nil)
360 (ispell-dump)) 360 (message "Bad ispell internal list"))))
361 (ispell-dump)))
361 362
362 ;;;###autoload 363 ;;;###autoload
363 (defun ispell-word (&optional resume) 364 (defun ispell-word (&optional resume)
364 "Check the spelling of the word under the cursor. 365 "Check the spelling of the word under the cursor.
365 See the command `ispell' for more information. 366 See the command `ispell' for more information.
546 (setq replacement (nth (- c ?0) message))) 547 (setq replacement (nth (- c ?0) message)))
547 (ispell-replace start end replacement) 548 (ispell-replace start end replacement)
548 (setq flag nil)) 549 (setq flag nil))
549 ((= c ?q) 550 ((= c ?q)
550 (throw 'ispell-quit nil)) 551 (throw 'ispell-quit nil))
551 ((= c quit-char) 552 ((= c (nth 3 (current-input-mode)))
552 (keyboard-quit)) 553 (keyboard-quit))
553 ((= c ? ) 554 ((= c ? )
554 (setq flag nil)) 555 (setq flag nil))
555 ((= c ?r) 556 ((= c ?r)
556 (ispell-replace start end (read-string "Replacement: ")) 557 (ispell-replace start end (read-string "Replacement: "))