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

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

Re: flyspell-auto-correct-word many wrong-type-argument


From: Kevin Rodgers
Subject: Re: flyspell-auto-correct-word many wrong-type-argument
Date: Mon, 22 Sep 2003 09:39:03 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2

Dan Jacobson wrote:

Sometimes flyspell-auto-correct-word does its job when esc tab is hit, but
complains in the minibuffer "Wrong type argument: vectorp: nil".


"K" == Kevin Rodgers <address@hidden> writes:


K> What is the value of flyspell-use-global-abbrev-table-p ?

nil

K> What was the buffer's major mode?

Message mode.

8 lines matching " minor mode" in buffer *Help*.
      2:For minor modes, see following pages.
    157:Mml minor mode (indicator MML):
    159:MML is the MIME Meta Language, a minor mode for composing MIME articles.
    201:Mc-Write minor mode (indicator MC-w):
    215:Flyspell minor mode (indicator Fly):
    220:With a prefix argument ARG, turn Flyspell minor mode on iff ARG is 
positive.
    244:Abbrev minor mode (indicator Abbrev):
    250:auto-fill-function minor mode (indicator Fill):

in fact it happens as I compose this message too, so add SC minor mode
(supercite) to the above.

Wait, if I (setq flyspell-use-global-abbrev-table-p t) the problem
goes away.

I see, I will do this in .emacs to hush up the problem, while the
elves will please fix it behind the scenes.

The problem is here:


(defun flyspell-abbrev-table ()
  (if flyspell-use-global-abbrev-table-p
      global-abbrev-table
    local-abbrev-table))


Since local-abbrev-table can be nil, flyspell-abbrev-table can return nil.
Should its callers check for that, or should it be changed to return an
abbrev table:

(defun flyspell-abbrev-table ()
  (cond (flyspell-use-global-abbrev-table-p global-abbrev-table)
        (local-abbrev-table)
        (t (setq local-abbrev-table (make-abbrev-table)))))

--
Kevin Rodgers





reply via email to

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