]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't warn about dos-* variables unless on MS-DOS,
authorEli Zaretskii <eliz@gnu.org>
Thu, 31 Dec 1998 13:04:54 +0000 (13:04 +0000)
committerEli Zaretskii <eliz@gnu.org>
Thu, 31 Dec 1998 13:04:54 +0000 (13:04 +0000)
and about w32-* variables unless on Windows/NT.

lisp/cus-start.el

index bd03b95230265ea05bf58872d9226c09b0999dc7..c8d140e6bc25a34216b897287d931bd4778efa2d 100644 (file)
             ;; xfns.c
             (x-bitmap-file-path installation
                                 (repeat (directory :format "%v")))))
-      this symbol group type
+      this symbol group type native-p
       ;; This function turns a value
       ;; into an expression which produces that value.
       (quoter (lambda (sexp)
          all (cdr all)
          symbol (nth 0 this)
          group (nth 1 this)
-         type (nth 2 this))
+         type (nth 2 this)
+         ;; Don't complain about missing variables which are
+         ;; irrelevant to this platform.
+         native-p (save-match-data
+                    (cond
+                     ((string-match "\\`dos-" (symbol-name symbol))
+                      (eq system-type 'ms-dos))
+                     ((string-match "\\`w32-" (symbol-name symbol))
+                      (eq system-type 'windows-nt))
+                     (t t))))
     (if (not (boundp symbol))
        ;; If variables are removed from C code, give an error here!
-       (message "Note, built-in variable `%S' not bound" symbol)
+       (and native-p
+            (message "Note, built-in variable `%S' not bound" symbol))
       ;; Save the standard value, unless we already did.
       (or (get symbol 'standard-value)
          (put symbol 'standard-value