Mercurial > emacs
comparison lisp/textmodes/ispell.el @ 33353:efc926d28bd3
(toplevel): Use byte-compiling-files-p
if it is there.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Thu, 09 Nov 2000 23:04:16 +0000 |
parents | b8015b527f27 |
children | 63a3259e1b50 |
comparison
equal
deleted
inserted
replaced
33352:bd48e8729dbb | 33353:efc926d28bd3 |
---|---|
808 (and (not ispell-menu-map) | 808 (and (not ispell-menu-map) |
809 (not version18p) | 809 (not version18p) |
810 (not xemacsp) | 810 (not xemacsp) |
811 'reload)) | 811 'reload)) |
812 | 812 |
813 (defvar ispell-library-path (unless (boundp 'byte-compile-current-file) | 813 (defvar ispell-library-path (if (or (not (fboundp 'byte-compiling-files-p)) |
814 (check-ispell-version)) | 814 (not (byte-compiling-files-p))) |
815 (check-ispell-version)) | |
815 "The directory where ispell dictionaries reside.") | 816 "The directory where ispell dictionaries reside.") |
816 | 817 |
817 (defvar ispell-process nil | 818 (defvar ispell-process nil |
818 "The process object for Ispell.") | 819 "The process object for Ispell.") |
819 | 820 |
826 ) | 827 ) |
827 "Non-nil means that the OS supports asynchronous processes.") | 828 "Non-nil means that the OS supports asynchronous processes.") |
828 | 829 |
829 ;;;###autoload | 830 ;;;###autoload |
830 (if (and ispell-menu-map-needed | 831 (if (and ispell-menu-map-needed |
831 (not (boundp 'byte-compile-current-file))) | 832 (or (not (fboundp 'byte-compiling-files-p)) |
833 (not (byte-compiling-files-p)))) | |
832 (let ((dicts (reverse (cons (cons "default" nil) ispell-dictionary-alist))) | 834 (let ((dicts (reverse (cons (cons "default" nil) ispell-dictionary-alist))) |
833 ;; `ispell-library-path' intentionally not defined in autoload | 835 ;; `ispell-library-path' intentionally not defined in autoload |
834 (path (and (boundp 'ispell-library-path) ispell-library-path)) | 836 (path (and (boundp 'ispell-library-path) ispell-library-path)) |
835 name load-dict) | 837 name load-dict) |
836 (setq ispell-menu-map (make-sparse-keymap "Spell")) | 838 (setq ispell-menu-map (make-sparse-keymap "Spell")) |
859 | 861 |
860 | 862 |
861 ;;; define commands in menu in opposite order you want them to appear. | 863 ;;; define commands in menu in opposite order you want them to appear. |
862 ;;;###autoload | 864 ;;;###autoload |
863 (if (and ispell-menu-map-needed | 865 (if (and ispell-menu-map-needed |
864 (not (boundp 'byte-compile-current-file))) | 866 (or (not (fboundp 'byte-compiling-files-p)) |
867 (not (byte-compiling-files-p)))) | |
865 (progn | 868 (progn |
866 (define-key ispell-menu-map [ispell-change-dictionary] | 869 (define-key ispell-menu-map [ispell-change-dictionary] |
867 '(menu-item "Change Dictionary..." ispell-change-dictionary | 870 '(menu-item "Change Dictionary..." ispell-change-dictionary |
868 :help "Supply explicit path to dictionary")) | 871 :help "Supply explicit path to dictionary")) |
869 (define-key ispell-menu-map [ispell-kill-ispell] | 872 (define-key ispell-menu-map [ispell-kill-ispell] |
887 '(menu-item "Complete Word Fragment" ispell-complete-word-interior-frag | 890 '(menu-item "Complete Word Fragment" ispell-complete-word-interior-frag |
888 :help "Complete word fragment at cursor")))) | 891 :help "Complete word fragment at cursor")))) |
889 | 892 |
890 ;;;###autoload | 893 ;;;###autoload |
891 (if (and ispell-menu-map-needed | 894 (if (and ispell-menu-map-needed |
892 (not (boundp 'byte-compile-current-file))) | 895 (or (not (fboundp 'byte-compiling-files-p)) |
896 (not (byte-compiling-files-p)))) | |
893 (progn | 897 (progn |
894 (define-key ispell-menu-map [ispell-continue] | 898 (define-key ispell-menu-map [ispell-continue] |
895 '(menu-item "Continue Spell-Checking" ispell-continue | 899 '(menu-item "Continue Spell-Checking" ispell-continue |
896 :enable (and (boundp 'ispell-region-end) | 900 :enable (and (boundp 'ispell-region-end) |
897 (marker-position ispell-region-end) | 901 (marker-position ispell-region-end) |
905 '(menu-item "Spell-Check Comments" ispell-comments-and-strings | 909 '(menu-item "Spell-Check Comments" ispell-comments-and-strings |
906 :help "Spell-check only comments and strings")))) | 910 :help "Spell-check only comments and strings")))) |
907 | 911 |
908 ;;;###autoload | 912 ;;;###autoload |
909 (if (and ispell-menu-map-needed | 913 (if (and ispell-menu-map-needed |
910 (not (boundp 'byte-compile-current-file))) | 914 (or (not (fboundp 'byte-compiling-files-p)) |
915 (not (byte-compiling-files-p)))) | |
911 (progn | 916 (progn |
912 (define-key ispell-menu-map [ispell-region] | 917 (define-key ispell-menu-map [ispell-region] |
913 '(menu-item "Spell-Check Region" ispell-region | 918 '(menu-item "Spell-Check Region" ispell-region |
914 :enable mark-active | 919 :enable mark-active |
915 :help "Spell-check text in marked region")) | 920 :help "Spell-check text in marked region")) |