comparison lisp/textmodes/flyspell.el @ 80653:3843bed9cf0e

(flyspell-word, flyspell-large-region, flyspell-region): Call ispell-maybe-find-aspell-dictionaries.
author Chong Yidong <cyd@stupidchicken.com>
date Mon, 28 Jul 2008 20:18:52 +0000
parents dc100f64b2b7
children 60803f3caac0
comparison
equal deleted inserted replaced
80652:3d0f5d74bca9 80653:3843bed9cf0e
1002 ;;* flyspell-word ... */ 1002 ;;* flyspell-word ... */
1003 ;;*---------------------------------------------------------------------*/ 1003 ;;*---------------------------------------------------------------------*/
1004 (defun flyspell-word (&optional following) 1004 (defun flyspell-word (&optional following)
1005 "Spell check a word." 1005 "Spell check a word."
1006 (interactive (list ispell-following-word)) 1006 (interactive (list ispell-following-word))
1007 (ispell-maybe-find-aspell-dictionaries)
1007 (save-excursion 1008 (save-excursion
1008 ;; use the correct dictionary 1009 ;; use the correct dictionary
1009 (flyspell-accept-buffer-local-defs) 1010 (flyspell-accept-buffer-local-defs)
1010 (let* ((cursor-location (point)) 1011 (let* ((cursor-location (point))
1011 (flyspell-word (flyspell-get-word following)) 1012 (flyspell-word (flyspell-get-word following))
1510 (set-buffer buffer) 1511 (set-buffer buffer)
1511 (erase-buffer) 1512 (erase-buffer)
1512 ;; this is done, we can start checking... 1513 ;; this is done, we can start checking...
1513 (if flyspell-issue-message-flag (message "Checking region...")) 1514 (if flyspell-issue-message-flag (message "Checking region..."))
1514 (set-buffer curbuf) 1515 (set-buffer curbuf)
1515 (ispell-check-version) 1516 (ispell-maybe-find-aspell-dictionaries)
1516 (let ((c (apply 'ispell-call-process-region beg 1517 (let ((c (apply 'ispell-call-process-region beg
1517 end 1518 end
1518 ispell-program-name 1519 ispell-program-name
1519 nil 1520 nil
1520 buffer 1521 buffer
1556 ;;*---------------------------------------------------------------------*/ 1557 ;;*---------------------------------------------------------------------*/
1557 ;;;###autoload 1558 ;;;###autoload
1558 (defun flyspell-region (beg end) 1559 (defun flyspell-region (beg end)
1559 "Flyspell text between BEG and END." 1560 "Flyspell text between BEG and END."
1560 (interactive "r") 1561 (interactive "r")
1562 (ispell-maybe-find-aspell-dictionaries)
1561 (if (= beg end) 1563 (if (= beg end)
1562 () 1564 ()
1563 (save-excursion 1565 (save-excursion
1564 (if (> beg end) 1566 (if (> beg end)
1565 (let ((old beg)) 1567 (let ((old beg))