;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br>
;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br>
;; Keywords: wp, print, PostScript
-;; Version: 6.9
+;; Version: 6.9.1
;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre
-(defconst pr-version "6.9"
- "printing.el, v 6.9 <2007/02/11 vinicius>
+(defconst pr-version "6.9.1"
+ "printing.el, v 6.9.1 <2007/08/02 vinicius>
Please send all bug fixes and enhancements to
Vinicius Jose Latorre <viniciusjl@ig.com.br>
;; 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 2, or (at your option) any later
+;; Software Foundation; either version 3, or (at your option) any later
;; version.
;; GNU Emacs is distributed in the hope that it will be useful, but WITHOUT ANY
(defalias 'pr-f-read-string 'read-string)
;; GNU Emacs
- (defvar deactivate-mark nil)
+ (defvar deactivate-mark)
;; GNU Emacs
(defun pr-keep-region-active ()
;; GNU Emacs
;; Menu binding
- (require 'easymenu)
;; Replace existing "print" item by "Printing" item.
;; If you're changing this file, you'll load it a second,
;; third... time, but "print" item exists only in the first load.
;; GNU Emacs 20
((< emacs-major-version 21)
(defun pr-global-menubar (pr-menu-spec)
+ (require 'easymenu)
(easy-menu-change '("tools") "Printing" pr-menu-spec pr-menu-print-item)
(when pr-menu-print-item
(easy-menu-remove-item nil '("tools") pr-menu-print-item)
;; GNU Emacs 21 & 22
(t
(defun pr-global-menubar (pr-menu-spec)
+ (require 'easymenu)
(let ((menu-file (if (= emacs-major-version 21)
'("menu-bar" "files") ; GNU Emacs 21
'("menu-bar" "file")))) ; GNU Emacs 22 or higher
If FORCE is non-nil, update menus doesn't matter if `pr-ps-printer-alist',
`pr-txt-printer-alist' or `pr-ps-utility-alist' were modified or not;
-otherwise, update PostScript printer menu iff `pr-ps-printer-menu-modified' is
-non-nil, update text printer menu iff `pr-txt-printer-menu-modified' is
-non-nil, and update PostScript File menus iff `pr-ps-utility-menu-modified' is
+otherwise, update PostScript printer menu if `pr-ps-printer-menu-modified' is
+non-nil, update text printer menu if `pr-txt-printer-menu-modified' is
+non-nil, and update PostScript File menus if `pr-ps-utility-menu-modified' is
non-nil.
If menu binding was not done, calls `pr-menu-bind'."
(defun pr-eval-local-alist (alist)
(let (local-list)
- (mapcar #'(lambda (option)
- (let ((var-sym (car option))
- (value (cdr option)))
- (setq local-list
- (if (eq var-sym 'inherits-from:)
- (nconc (pr-eval-setting-alist value) local-list)
- (set (make-local-variable var-sym) (eval value))
- (cons var-sym local-list)))))
- alist)
+ (mapc #'(lambda (option)
+ (let ((var-sym (car option))
+ (value (cdr option)))
+ (setq local-list
+ (if (eq var-sym 'inherits-from:)
+ (nconc (pr-eval-setting-alist value) local-list)
+ (set (make-local-variable var-sym) (eval value))
+ (cons var-sym local-list)))))
+ alist)
local-list))
(setq local-list
(pr-eval-setting-alist inherits global
(cons inherits old)))))
- (mapcar
+ (mapc
(cond ((not local) ; global settings
#'(lambda (option)
(let ((var-sym (car option)))
;; Printing Interface (inspired on ps-print-interface.el)
-(require 'widget)
-(require 'wid-edit)
-(require 'cus-edit)
+(eval-when-compile
+ (require 'cus-edit)
+ (require 'wid-edit)
+ (require 'widget))
(defvar pr-i-window-configuration nil)