;;; printing.el --- printing utilities
;; Copyright (C) 2000, 2001, 2003, 2004, 2005,
-;; 2006, 2007 Free Software Foundation, Inc.
+;; 2006, 2007, 2008 Free Software Foundation, Inc.
;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br>
;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br>
;; Keywords: wp, print, PostScript
-;; Version: 6.9.2
+;; Version: 6.9.3
;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre
-(defconst pr-version "6.9.2"
- "printing.el, v 6.9.2 <2007/10/26 vinicius>
+(defconst pr-version "6.9.3"
+ "printing.el, v 6.9.3 <2007/12/09 vinicius>
Please send all bug fixes and enhancements to
Vinicius Jose Latorre <viniciusjl@ig.com.br>
;; This file is part of GNU Emacs.
-;; GNU Emacs is free software; you can redistribute it and/or modify it under
-;; the terms of the GNU General Public License as published by the Free
-;; Software Foundation; either version 3, or (at your option) any later
-;; version.
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
-;; GNU Emacs is distributed in the hope that it will be useful, but WITHOUT ANY
-;; WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-;; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
-;; details.
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
-;; You should have received a copy of the GNU General Public License along with
-;; GNU Emacs; see the file COPYING. If not, write to the Free Software
-;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; `http://www.emacswiki.org/cgi-bin/wiki/PsPrintPackage'.
;; Please, see README file for ps-print installation instructions.
;;
-;; `printing' was inspired on:
+;; `printing' was inspired by:
;;
;; print-nt.el Frederic Corne <frederic.corne@erli.fr>
;; Special printing functions for Windows NT
(defalias 'pr-region-active-p 'ignore)
(defalias 'pr-do-update-menus 'ignore)
(defalias 'pr-update-mode-line 'ignore)
- (defalias 'pr-f-read-string 'ignore)
- (defalias 'pr-f-set-keymap-parents 'ignore)
+ (defalias 'pr-read-string 'ignore)
+ (defalias 'pr-set-keymap-parents 'ignore)
(defalias 'pr-keep-region-active 'ignore))
(cond
((featurep 'xemacs) ; XEmacs
;; XEmacs
- (defalias 'pr-f-set-keymap-parents 'set-keymap-parents)
- (defalias 'pr-f-set-keymap-name 'set-keymap-name)
+ (defalias 'pr-set-keymap-parents 'set-keymap-parents)
+ (defalias 'pr-set-keymap-name 'set-keymap-name)
;; XEmacs
- (defun pr-f-read-string (prompt initial history default)
+ (defun pr-read-string (prompt initial history default)
(let ((str (read-string prompt initial)))
(if (and str (not (string= str "")))
str
)
(t ; GNU Emacs
;; GNU Emacs
- (defalias 'pr-f-set-keymap-parents 'set-keymap-parent)
- (defalias 'pr-f-set-keymap-name 'ignore)
- (defalias 'pr-f-read-string 'read-string)
+ (defalias 'pr-set-keymap-parents 'set-keymap-parent)
+ (defalias 'pr-set-keymap-name 'ignore)
+ (defalias 'pr-read-string 'read-string)
;; GNU Emacs
(defvar deactivate-mark)
)))
(defvar pr-menu-position nil)
- (defvar pr-menu-state nil)
+ (defvar pr-menu-state nil)
;; GNU Emacs
(defun pr-menu-lookup (path)
(save-match-data
(let* ((fmt-prompt "%s[%s] N-up printing (default 1): ")
(prompt "")
- (str (pr-f-read-string (format fmt-prompt prompt mess) "1" nil "1"))
+ (str (pr-read-string (format fmt-prompt prompt mess) "1" nil "1"))
int)
(while (if (string-match "^\\s *[0-9]+$" str)
(setq int (string-to-number str)
(setq prompt "Invalid integer syntax; "))
(ding)
(setq str
- (pr-f-read-string (format fmt-prompt prompt mess) str nil "1")))
+ (pr-read-string (format fmt-prompt prompt mess) str nil "1")))
int)))
(defun pr-interactive-regexp (mess)
- (pr-f-read-string (format "[%s] File regexp to print: " mess) "" nil ""))
+ (pr-read-string (format "[%s] File regexp to print: " mess) "" nil ""))
(defun pr-interactive-dir-args (mess)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Printing Interface (inspired on ps-print-interface.el)
+;; Printing Interface (inspired by ps-print-interface.el)
(eval-when-compile
"Keymap for pr-interface.")
(unless pr-interface-map
- (setq pr-interface-map (make-sparse-keymap))
- (cond ((featurep 'xemacs) ; XEmacs
- (pr-f-set-keymap-parents pr-interface-map (list widget-keymap))
- (pr-f-set-keymap-name pr-interface-map 'pr-interface-map))
- (t ; GNU Emacs
- (pr-f-set-keymap-parents pr-interface-map widget-keymap)))
- (define-key pr-interface-map "q" 'pr-interface-quit)
- (define-key pr-interface-map "?" 'pr-interface-help))
+ (let ((map (make-sparse-keymap)))
+ (cond ((featurep 'xemacs) ; XEmacs
+ (pr-set-keymap-parents map (list widget-keymap))
+ (pr-set-keymap-name map 'pr-interface-map))
+ (t ; GNU Emacs
+ (pr-set-keymap-parents map widget-keymap)))
+ (define-key map "q" 'pr-interface-quit)
+ (define-key map "?" 'pr-interface-help)
+ (setq pr-interface-map map)))
(defmacro pr-interface-save (&rest body)