diff options
author | Stefan Monnier <[email protected]> | 2002-05-31 18:43:28 +0000 |
---|---|---|
committer | Stefan Monnier <[email protected]> | 2002-05-31 18:43:28 +0000 |
commit | 262d2cab9ea0e6dcd26fdc066510e5f81f08844b (patch) | |
tree | d2404fba1a34ef3fdfbeab7704a68a40cf8838a4 /lisp/textmodes | |
parent | 43dc73f18fb590168face8211d9e434455e2df33 (diff) |
(autoloaded toplevel): Don't use ispell-library-directory without
checking that it's bound.
Diffstat (limited to 'lisp/textmodes')
-rw-r--r-- | lisp/textmodes/ispell.el | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 9ad083d6e5..d1547c8782 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -830,7 +830,7 @@ and added as a submenu of the \"Edit\" menu.") ;;;###autoload (if ispell-menu-map-needed (let ((dicts (reverse (cons (cons "default" nil) ispell-dictionary-alist))) - (dir ispell-library-directory) + (dir (if (boundp 'ispell-library-directory) ispell-library-directory)) name load-dict) (setq ispell-menu-map (make-sparse-keymap "Spell")) ;; add the dictionaries to the bottom of the list. @@ -839,12 +839,11 @@ and added as a submenu of the \"Edit\" menu.") load-dict (car (cdr (member "-d" (nth 5 (car dicts))))) dicts (cdr dicts)) (cond ((not (stringp name)) - (define-key ispell-menu-map (vector 'default) - (cons "Select Default Dict" - (cons "Dictionary for which Ispell was configured" - (list 'lambda () '(interactive) - (list - 'ispell-change-dictionary "default")))))) + (define-key ispell-menu-map [default] + '("Select Default Dict" + "Dictionary for which Ispell was configured" + . (lambda () (interactive) + (ispell-change-dictionary "default"))))) ((or (not dir) ; load all if library dir not defined (file-exists-p (concat dir "/" name ".hash")) (file-exists-p (concat dir "/" name ".has")) @@ -853,8 +852,8 @@ and added as a submenu of the \"Edit\" menu.") (file-exists-p (concat dir "/" load-dict ".has"))))) (define-key ispell-menu-map (vector (intern name)) (cons (concat "Select " (capitalize name) " Dict") - (list 'lambda () '(interactive) - (list 'ispell-change-dictionary name))))))))) + `(lambda () (interactive) + (ispell-change-dictionary ,name))))))))) ;;; define commands in menu in opposite order you want them to appear. |