+2001-07-13 Karl Eichwalder <ke@suse.de>
+
+ * po-mode.el (po-validate): Check for 'null-device; if not available
+ use "NUL" for windows-nt and windows-95 and /dev/null as fallback.
+ From Eli Zaretskii and François Pinard.
+
2000-01-03 François Pinard <pinard@iro.umontreal.ca>
* po-mode.el (po-preset-string-functions): New function.
(defun po-validate ()
"Use `msgfmt' for validating the current PO file contents."
(interactive)
- (let ((compilation-buffer-name-function
- (function (lambda (mode) (progn "*PO validation*"))))
- (compile-command (concat po-msgfmt-program
- " --statistics -c -v -o " null-device " "
+ (let* ((dev-null
+ (cond ((boundp 'null-device) null-device) ; since Emacs 20.3
+ ((memq system-type '(windows-nt windows-95)) "NUL")
+ (t "/dev/null")))
+ (compilation-buffer-name-function
+ (function (lambda (mode) (progn "*PO validation*"))))
+ (compile-command (concat po-msgfmt-program
+ " --statistics -c -v -o " dev-null " "
buffer-file-name)))
-
(po-msgfmt-version-check)
-
(compile compile-command)))
(defvar po-msgfmt-version-checked nil)