+2007-10-26 Vinicius Jose Latorre <viniciusjl@ig.com.br>
+
+ * printing.el: Pacify byte compiler, that is, no compiler warnings.
+ Move (again) some variable definitions before use, define some fun
+ aliases, no code change.
+ (pr-version): New version 6.9.2.
+ (pr-path-style, pr-auto-region, pr-menu-char-height)
+ (pr-menu-char-width, pr-menu-lock, pr-ps-printer-alist)
+ (pr-txt-printer-alist, pr-ps-utility-alist): Options declaration
+ via (defvar VAR).
+ (pr-menu-lookup, pr-menu-lock, pr-menu-alist, pr-even-or-odd-pages)
+ (pr-menu-get-item, pr-menu-set-item-name, pr-menu-set-utility-title)
+ (pr-menu-set-ps-title, pr-menu-set-txt-title, pr-region-active-p)
+ (pr-do-update-menus, pr-update-mode-line, pr-f-read-string)
+ (pr-f-set-keymap-parents, pr-keep-region-active): Fun aliases.
+ (defvar pr-menu-print-item, pr-ps-printer-menu-modified)
+ (pr-txt-printer-menu-modified, pr-ps-utility-menu-modified)
+ (pr-even-or-odd-alist): Vars definition moved.
+
2007-10-19 Juanma Barranquero <lekktu@gmail.com>
* bs.el (bs--track-window-changes): Don't refresh the whole list.
;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br>
;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br>
;; Keywords: wp, print, PostScript
-;; Version: 6.9.1
+;; Version: 6.9.2
;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre
-(defconst pr-version "6.9.1"
- "printing.el, v 6.9.1 <2007/08/02 vinicius>
+(defconst pr-version "6.9.2"
+ "printing.el, v 6.9.2 <2007/10/26 vinicius>
Please send all bug fixes and enhancements to
Vinicius Jose Latorre <viniciusjl@ig.com.br>
(set-default-file-modes umask)))))
+(eval-when-compile
+ ;; User Interface --- declared here to avoid compiler warnings
+ (defvar pr-path-style)
+ (defvar pr-auto-region)
+ (defvar pr-menu-char-height)
+ (defvar pr-menu-char-width)
+ (defvar pr-menu-lock)
+ (defvar pr-ps-printer-alist)
+ (defvar pr-txt-printer-alist)
+ (defvar pr-ps-utility-alist)
+
+
+ ;; Internal fun alias to avoid compilation gripes
+ (defalias 'pr-menu-lookup 'ignore)
+ (defalias 'pr-menu-lock 'ignore)
+ (defalias 'pr-menu-alist 'ignore)
+ (defalias 'pr-even-or-odd-pages 'ignore)
+ (defalias 'pr-menu-get-item 'ignore)
+ (defalias 'pr-menu-set-item-name 'ignore)
+ (defalias 'pr-menu-set-utility-title 'ignore)
+ (defalias 'pr-menu-set-ps-title 'ignore)
+ (defalias 'pr-menu-set-txt-title 'ignore)
+ (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-keep-region-active 'ignore))
+
+
+;; Internal Vars --- defined here to avoid compiler warnings
+(defvar pr-menu-print-item "print"
+ "Non-nil means that menu binding was not done.
+
+Used by `pr-menu-bind' and `pr-update-menus'.")
+
+(defvar pr-ps-printer-menu-modified t
+ "Non-nil means `pr-ps-printer-alist' was modified and we need to update menu.")
+
+(defvar pr-txt-printer-menu-modified t
+ "Non-nil means `pr-txt-printer-alist' was modified and we need to update menu.")
+
+(defvar pr-ps-utility-menu-modified t
+ "Non-nil means `pr-ps-utility-alist' was modified and we need to update menu.")
+
+(defconst pr-even-or-odd-alist
+ '((nil . "Print All Pages")
+ (even-page . "Print Even Pages")
+ (odd-page . "Print Odd Pages")
+ (even-sheet . "Print Even Sheets")
+ (odd-sheet . "Print Odd Sheets")))
+
\f
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun pr-menu-char-width ()
(frame-char-width))
+ (defvar pr-menu-bar nil
+ "Specify Printing menu-bar entry.")
+
;; GNU Emacs
;; Menu binding
;; 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.
+ (eval-when-compile
+ (require 'easymenu)) ; to avoid compilation gripes
+
(eval-and-compile
(cond
;; GNU Emacs 20
)) ; end cond featurep
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Internal Functions (I)
+
+
+(defun pr-dosify-file-name (path)
+ "Replace unix-style directory separator character with dos/windows one."
+ (interactive "sPath: ")
+ (if (eq pr-path-style 'windows)
+ (subst-char-in-string ?/ ?\\ path)
+ path))
+
+
+(defun pr-unixify-file-name (path)
+ "Replace dos/windows-style directory separator character with unix one."
+ (interactive "sPath: ")
+ (if (eq pr-path-style 'windows)
+ (subst-char-in-string ?\\ ?/ path)
+ path))
+
+
+(defun pr-standard-file-name (path)
+ "Ensure the proper directory separator depending on the OS.
+That is, if Emacs is running on DOS/Windows, ensure dos/windows-style directory
+separator; otherwise, ensure unix-style directory separator."
+ (if (or pr-cygwin-system ps-windows-system)
+ (subst-char-in-string ?/ ?\\ path)
+ (subst-char-in-string ?\\ ?/ path)))
+
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Customization Functions
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; User Interface (I)
+;; User Interface
(defgroup printing nil
:group 'printing)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Internal Functions (I)
-
-
-(defun pr-dosify-file-name (path)
- "Replace unix-style directory separator character with dos/windows one."
- (interactive "sPath: ")
- (if (eq pr-path-style 'windows)
- (subst-char-in-string ?/ ?\\ path)
- path))
-
-
-(defun pr-unixify-file-name (path)
- "Replace dos/windows-style directory separator character with unix one."
- (interactive "sPath: ")
- (if (eq pr-path-style 'windows)
- (subst-char-in-string ?\\ ?/ path)
- path))
-
-
-(defun pr-standard-file-name (path)
- "Ensure the proper directory separator depending on the OS.
-That is, if Emacs is running on DOS/Windows, ensure dos/windows-style directory
-separator; otherwise, ensure unix-style directory separator."
- (if (or pr-cygwin-system ps-windows-system)
- (subst-char-in-string ?/ ?\\ path)
- (subst-char-in-string ?\\ ?/ path)))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; User Interface (II)
-
-
(defcustom pr-path-alist
'((unix PATH)
(cygwin PATH)
See `pr-ps-printer-alist'.")
-(defvar pr-menu-bar nil
- "Specify Printing menu-bar entry.")
-
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Macros
)))
-(defvar pr-menu-print-item "print"
- "Non-nil means that menu binding was not done.
-
-Used by `pr-menu-bind' and `pr-update-menus'.")
-
-
(defun pr-menu-bind ()
"Install `printing' menu in the menubar.
(pr-do-update-menus force)))
-(defvar pr-ps-printer-menu-modified t
- "Non-nil means `pr-ps-printer-alist' was modified and we need to update menu.")
-(defvar pr-txt-printer-menu-modified t
- "Non-nil means `pr-txt-printer-alist' was modified and we need to update menu.")
-(defvar pr-ps-utility-menu-modified t
- "Non-nil means `pr-ps-utility-alist' was modified and we need to update menu.")
-
-
-(defconst pr-even-or-odd-alist
- '((nil . "Print All Pages")
- (even-page . "Print Even Pages")
- (odd-page . "Print Odd Pages")
- (even-sheet . "Print Even Sheets")
- (odd-sheet . "Print Odd Sheets")))
-
-
(defun pr-menu-create (name alist var-sym fun entry index)
(cons name
(mapcar