]> code.delx.au - gnu-emacs/blobdiff - lisp/lpr.el
Fix race conditions with MS-Windows lock files by using _sopen.
[gnu-emacs] / lisp / lpr.el
index 76c69f3308c2796769ebe3bee971521c1d90e836..88567abd246b1dcce4962054acfdb1a1f1e6bb9b 100644 (file)
@@ -1,7 +1,7 @@
 ;;; lpr.el --- print Emacs buffer on line printer
 
-;; Copyright (C) 1985, 1988, 1992, 1994, 2001-2011
-;;   Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1988, 1992, 1994, 2001-2013 Free Software
+;; Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: unix
 
 ;;; Code:
 
-(eval-when-compile (require 'cl))
-
 ;;;###autoload
 (defvar lpr-windows-system
-  (memq system-type '(ms-dos windows-nt)))
+  (memq system-type '(ms-dos windows-nt))
+  "Non-nil if running on MS-DOS or MS Windows.")
 
 ;;;###autoload
 (defvar lpr-lp-system
-  (memq system-type '(usg-unix-v hpux irix)))
+  (memq system-type '(usg-unix-v hpux irix))
+  "Non-nil if running on a system type that uses the \"lp\" command.")
 
 
 (defgroup lpr nil
@@ -279,10 +279,10 @@ for further customization of the printer command."
           (if (markerp end)
               (set-marker end nil))
           (message "Spooling%s...done%s%s" switch-string
-                   (case (count-lines (point-min) (point-max))
+                   (pcase (count-lines (point-min) (point-max))
                      (0 "")
                      (1 ": ")
-                     (t ":\n"))
+                     (_ ":\n"))
                    (buffer-string)))))))
 
 ;; This function copies the text between start and end