diff options
| author | Stefan Monnier | 2002-05-31 18:43:28 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2002-05-31 18:43:28 +0000 |
| commit | 262d2cab9ea0e6dcd26fdc066510e5f81f08844b (patch) | |
| tree | d2404fba1a34ef3fdfbeab7704a68a40cf8838a4 | |
| parent | 43dc73f18fb590168face8211d9e434455e2df33 (diff) | |
| download | emacs-262d2cab9ea0e6dcd26fdc066510e5f81f08844b.tar.gz emacs-262d2cab9ea0e6dcd26fdc066510e5f81f08844b.zip | |
(autoloaded toplevel): Don't use ispell-library-directory without
checking that it's bound.
| -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 9ad083d6e53..d1547c87820 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -830,7 +830,7 @@ and added as a submenu of the \"Edit\" menu.") | |||
| 830 | ;;;###autoload | 830 | ;;;###autoload |
| 831 | (if ispell-menu-map-needed | 831 | (if ispell-menu-map-needed |
| 832 | (let ((dicts (reverse (cons (cons "default" nil) ispell-dictionary-alist))) | 832 | (let ((dicts (reverse (cons (cons "default" nil) ispell-dictionary-alist))) |
| 833 | (dir ispell-library-directory) | 833 | (dir (if (boundp 'ispell-library-directory) ispell-library-directory)) |
| 834 | name load-dict) | 834 | name load-dict) |
| 835 | (setq ispell-menu-map (make-sparse-keymap "Spell")) | 835 | (setq ispell-menu-map (make-sparse-keymap "Spell")) |
| 836 | ;; add the dictionaries to the bottom of the list. | 836 | ;; add the dictionaries to the bottom of the list. |
| @@ -839,12 +839,11 @@ and added as a submenu of the \"Edit\" menu.") | |||
| 839 | load-dict (car (cdr (member "-d" (nth 5 (car dicts))))) | 839 | load-dict (car (cdr (member "-d" (nth 5 (car dicts))))) |
| 840 | dicts (cdr dicts)) | 840 | dicts (cdr dicts)) |
| 841 | (cond ((not (stringp name)) | 841 | (cond ((not (stringp name)) |
| 842 | (define-key ispell-menu-map (vector 'default) | 842 | (define-key ispell-menu-map [default] |
| 843 | (cons "Select Default Dict" | 843 | '("Select Default Dict" |
| 844 | (cons "Dictionary for which Ispell was configured" | 844 | "Dictionary for which Ispell was configured" |
| 845 | (list 'lambda () '(interactive) | 845 | . (lambda () (interactive) |
| 846 | (list | 846 | (ispell-change-dictionary "default"))))) |
| 847 | 'ispell-change-dictionary "default")))))) | ||
| 848 | ((or (not dir) ; load all if library dir not defined | 847 | ((or (not dir) ; load all if library dir not defined |
| 849 | (file-exists-p (concat dir "/" name ".hash")) | 848 | (file-exists-p (concat dir "/" name ".hash")) |
| 850 | (file-exists-p (concat dir "/" name ".has")) | 849 | (file-exists-p (concat dir "/" name ".has")) |
| @@ -853,8 +852,8 @@ and added as a submenu of the \"Edit\" menu.") | |||
| 853 | (file-exists-p (concat dir "/" load-dict ".has"))))) | 852 | (file-exists-p (concat dir "/" load-dict ".has"))))) |
| 854 | (define-key ispell-menu-map (vector (intern name)) | 853 | (define-key ispell-menu-map (vector (intern name)) |
| 855 | (cons (concat "Select " (capitalize name) " Dict") | 854 | (cons (concat "Select " (capitalize name) " Dict") |
| 856 | (list 'lambda () '(interactive) | 855 | `(lambda () (interactive) |
| 857 | (list 'ispell-change-dictionary name))))))))) | 856 | (ispell-change-dictionary ,name))))))))) |
| 858 | 857 | ||
| 859 | 858 | ||
| 860 | ;;; define commands in menu in opposite order you want them to appear. | 859 | ;;; define commands in menu in opposite order you want them to appear. |