]> git.eshelyaron.com Git - emacs.git/commitdiff
(toplevel): Use byte-compiling-files-p
authorGerd Moellmann <gerd@gnu.org>
Thu, 9 Nov 2000 23:05:07 +0000 (23:05 +0000)
committerGerd Moellmann <gerd@gnu.org>
Thu, 9 Nov 2000 23:05:07 +0000 (23:05 +0000)
if it is there.

lisp/ChangeLog
lisp/textmodes/ispell.el

index 5ef8a4e941ce63bb9d182717adf5dca4b0a46f77..c505059bc7582424621645416b8fde2da8e7b50d 100644 (file)
@@ -1,5 +1,13 @@
 2000-11-09  Gerd Moellmann  <gerd@gnu.org>
 
+       * simple.el (byte-compiling-files-p): New function.
+
+       * textmodes/ispell.el (toplevel): Use byte-compiling-files-p
+       if it is there.
+
+       * emacs-lisp/bytecomp.el (byte-compile-current-file): Bind it to
+       nil again.
+
        * textmodes/ispell.el (ispell-library-path): Don't call
        check-ispell-version when byte-compiling because that starts
        an ispell process, and ispell might not be installed.
index fcb182c7842c464a417273debeb2a076c40d2df0..77c98d9cf4db05b165be2be95cd6c45fd163a106 100644 (file)
@@ -810,8 +810,9 @@ and added as a submenu of the \"Edit\" menu.")
        (not xemacsp)
        'reload))
 
-(defvar ispell-library-path (unless (boundp 'byte-compile-current-file)
-                             (check-ispell-version))
+(defvar ispell-library-path (if (or (not (fboundp 'byte-compiling-files-p))
+                                   (not (byte-compiling-files-p)))
+                               (check-ispell-version))
   "The directory where ispell dictionaries reside.")
 
 (defvar ispell-process nil
@@ -828,7 +829,8 @@ and added as a submenu of the \"Edit\" menu.")
 
 ;;;###autoload
 (if (and ispell-menu-map-needed
-        (not (boundp 'byte-compile-current-file)))
+        (or (not (fboundp 'byte-compiling-files-p))
+            (not (byte-compiling-files-p))))
     (let ((dicts (reverse (cons (cons "default" nil) ispell-dictionary-alist)))
          ;; `ispell-library-path' intentionally not defined in autoload
          (path (and (boundp 'ispell-library-path) ispell-library-path))
@@ -861,7 +863,8 @@ and added as a submenu of the \"Edit\" menu.")
 ;;; define commands in menu in opposite order you want them to appear.
 ;;;###autoload
 (if (and ispell-menu-map-needed
-        (not (boundp 'byte-compile-current-file)))
+        (or (not (fboundp 'byte-compiling-files-p))
+            (not (byte-compiling-files-p))))
     (progn
       (define-key ispell-menu-map [ispell-change-dictionary]
        '(menu-item "Change Dictionary..." ispell-change-dictionary
@@ -889,7 +892,8 @@ and added as a submenu of the \"Edit\" menu.")
 
 ;;;###autoload
 (if (and ispell-menu-map-needed
-        (not (boundp 'byte-compile-current-file)))
+        (or (not (fboundp 'byte-compiling-files-p))
+            (not (byte-compiling-files-p))))
     (progn
       (define-key ispell-menu-map [ispell-continue]
        '(menu-item "Continue Spell-Checking" ispell-continue
@@ -907,7 +911,8 @@ and added as a submenu of the \"Edit\" menu.")
 
 ;;;###autoload
 (if (and ispell-menu-map-needed
-        (not (boundp 'byte-compile-current-file)))
+        (or (not (fboundp 'byte-compiling-files-p))
+            (not (byte-compiling-files-p))))
     (progn
       (define-key ispell-menu-map [ispell-region]
        '(menu-item "Spell-Check Region" ispell-region