emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ispell.el doesn't find all of aspell's dictionaries


From: Juri Linkov
Subject: Re: ispell.el doesn't find all of aspell's dictionaries
Date: Sun, 03 Jul 2005 03:08:15 +0300
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

> Rechecking the dictionary list is needed also after changing the
> program name in `ispell-program-name'.

BTW, after changing the default value of `ispell-program-name' to
`aspell' in preference to `ispell', it may come as a (possible unpleasant)
surprise to users.  To reduce the likelihood of users being uninformed
about the really used program, I propose to display the program name
as well as the current dictionary name in visible places: in the
modeline and in the echo area:

Index: lisp/textmodes/ispell.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/textmodes/ispell.el,v
retrieving revision 1.167
diff -c -r1.167 ispell.el
*** lisp/textmodes/ispell.el    28 Jun 2005 22:02:13 -0000      1.167
--- lisp/textmodes/ispell.el    3 Jul 2005 00:01:32 -0000
***************
*** 1659,1665 ****
      ;; setup the *Choices* buffer with valid data.
      (save-excursion
        (set-buffer (get-buffer-create ispell-choices-buffer))
!       (setq mode-line-format (concat "--  %b  --  word: " word))
        ;; XEmacs: no need for horizontal scrollbar in choices window
        (with-no-warnings
         (and (fboundp 'set-specifier)
--- 1664,1673 ----
      ;; setup the *Choices* buffer with valid data.
      (save-excursion
        (set-buffer (get-buffer-create ispell-choices-buffer))
!       (setq mode-line-format
!           (concat "--  %b  --  word: " word
!                   "  --  dict: " (or ispell-current-dictionary "default")
!                   "  --  prog: " (file-name-nondirectory 
ispell-program-name)))
        ;; XEmacs: no need for horizontal scrollbar in choices window
        (with-no-warnings
         (and (fboundp 'set-specifier)
***************
*** 1819,1831 ****
                              (erase-buffer)
                              (setq count ?0
                                    skipped 0
!                                   mode-line-format (concat
!                                                     "--  %b  --  word: "
!                                                     new-word)
                                    miss (lookup-words new-word)
                                    choices miss
                                    line ispell-choices-win-default-height)
                              (while (and choices ; adjust choices window.
                                          (< (if (> (+ 7 (current-column)
                                                       (length (car choices))
                                                       (if (> count ?~) 3 0))
--- 1827,1841 ----
                              (erase-buffer)
                              (setq count ?0
                                    skipped 0
!                                   mode-line-format
!                                   (concat "--  %b  --  word: " new-word
!                                           "  --  dict: "
!                                           ispell-alternate-dictionary)
                                    miss (lookup-words new-word)
                                    choices miss
                                    line ispell-choices-win-default-height)
***************
*** 2512,2520 ****
        (rstart (make-marker)))
    (unwind-protect
        (save-excursion
!       (message "Spell checking %s using %s dictionary..."
                 (if (and (= reg-start (point-min)) (= reg-end (point-max)))
                     (buffer-name) "region")
                 (or ispell-current-dictionary "default"))
        ;; Returns cursor to original location.
        (save-window-excursion
--- 2522,2531 ----
        (rstart (make-marker)))
    (unwind-protect
        (save-excursion
!       (message "Spell checking %s using %s with %s dictionary..."
                 (if (and (= reg-start (point-min)) (= reg-end (point-max)))
                     (buffer-name) "region")
+                (file-name-nondirectory ispell-program-name)
                 (or ispell-current-dictionary "default"))
        ;; Returns cursor to original location.
        (save-window-excursion
***************
*** 2532,2538 ****
                  (set-marker skip-region-start (- (point) (length key)))
                  (goto-char reg-start)))
            (let (message-log-max)
!             (message "Continuing spelling check using %s dictionary..."
                       (or ispell-current-dictionary "default")))
            (set-marker rstart reg-start)
            (set-marker ispell-region-end reg-end)
--- 2543,2550 ----
                  (set-marker skip-region-start (- (point) (length key)))
                  (goto-char reg-start)))
            (let (message-log-max)
!             (message "Continuing spelling check using %s with %s 
dictionary..."
!                      (file-name-nondirectory ispell-program-name)
                       (or ispell-current-dictionary "default")))
            (set-marker rstart reg-start)
            (set-marker ispell-region-end reg-end)
***************
*** 2609,2615 ****
        (if (not recheckp) (set-marker ispell-region-end nil))
        ;; Only save if successful exit.
        (ispell-pdict-save ispell-silently-savep)
!       (message "Spell-checking done")))))
  
  
  (defun ispell-begin-skip-region-regexp ()
--- 2621,2629 ----
        (if (not recheckp) (set-marker ispell-region-end nil))
        ;; Only save if successful exit.
        (ispell-pdict-save ispell-silently-savep)
!       (message "Spell-checking using %s with %s dictionary done"
!              (file-name-nondirectory ispell-program-name)
!              (or ispell-current-dictionary "default"))))))
  
  
  (defun ispell-begin-skip-region-regexp ()

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]