HideIfDef mode bug fixes and enhancements. This is #2 of 3 patches based
[bpt/emacs.git] / lisp / dired-aux.el
index 28bfb28..b1d5f4e 100644 (file)
@@ -1,10 +1,10 @@
 ;;; dired-aux.el --- less commonly used parts of dired
 
-;; Copyright (C) 1985-1986, 1992, 1994, 1998, 2000-2013 Free Software
+;; Copyright (C) 1985-1986, 1992, 1994, 1998, 2000-2014 Free Software
 ;; Foundation, Inc.
 
 ;; Author: Sebastian Kremer <sk@thp.uni-koeln.de>.
-;; Maintainer: FSF
+;; Maintainer: emacs-devel@gnu.org
 ;; Keywords: files
 ;; Package: emacs
 
@@ -415,6 +415,12 @@ Uses the shell command coming from variables `lpr-command' and
 `lpr-switches' as default."
   (interactive "P")
   (let* ((file-list (dired-get-marked-files t arg))
+        (lpr-switches
+         (if (and (stringp printer-name)
+                  (string< "" printer-name))
+             (cons (concat lpr-printer-switch printer-name)
+                   lpr-switches)
+           lpr-switches))
         (command (dired-mark-read-string
                   "Print %s with: "
                   (mapconcat 'identity
@@ -881,7 +887,7 @@ Otherwise, the rule is a compression rule, and compression is done with gzip.")
     ;; See if any suffix rule matches this file name.
     (while suffixes
       (let (case-fold-search)
-       (if (string-match-p (car (car suffixes)) file)
+       (if (string-match (car (car suffixes)) file)
            (setq suffix (car suffixes) suffixes nil))
        (setq suffixes (cdr suffixes))))
     ;; If so, compute desired new name.
@@ -1337,9 +1343,7 @@ Special value `always' suppresses confirmation."
             (eq t (car attrs))
             (or (eq recursive 'always)
                 (yes-or-no-p (format "Recursive copies of %s? " from))))
-       ;; This is a directory.
        (copy-directory from to preserve-time)
-      ;; Not a directory.
       (or top (dired-handle-overwrite to))
       (condition-case err
          (if (stringp (car attrs))