From 3bcc60cfaf19840ad12a496a60aea6f0408c366e Mon Sep 17 00:00:00 2001 From: Vinicius Jose Latorre Date: Sun, 11 Nov 2007 14:18:17 +0000 Subject: [PATCH] Error if ps-lpr-switches is not a list. --- lisp/ChangeLog | 12 +++++++++--- lisp/ps-print.el | 6 +++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e7d1daf2096..d1f4f81e835 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,13 +1,19 @@ -2007-11-10 Jason Rumney +2007-11-11 Vinicius Jose Latorre - * w32-fns.el: Sync charset names with setup-default-fontset. - Append "-1" where second part missing. + * ps-print.el (ps-do-despool): Do not force ps-lpr-switches to be a + list. + (ps-begin-job): Error if ps-lpr-switches is not a list. 2007-11-11 YAMAMOTO Mitsuharu * faces.el (face-normalize-spec): Remove function. (frame-set-background-mode): Undo last change. +2007-11-10 Jason Rumney + + * w32-fns.el: Sync charset names with setup-default-fontset. + Append "-1" where second part missing. + 2007-11-10 Juri Linkov * isearch.el (isearch-mode-end-hook, isearch-mode-end-hook-quit): diff --git a/lisp/ps-print.el b/lisp/ps-print.el index ce92e4781ef..ba8075730d5 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el @@ -6002,6 +6002,8 @@ XSTART YSTART are the relative position for the first page in a sheet.") ;; initialize page dimensions (ps-get-page-dimensions) ;; final check + (unless (listp ps-lpr-switches) + (error "`ps-lpr-switches' value should be a list.")) (and ps-color-p (equal ps-default-background ps-default-foreground) (error @@ -6843,9 +6845,7 @@ If FACE is not a valid face name, use default face." (and (boundp 'printer-name) (symbol-value 'printer-name)))) (ps-lpr-switches - (append (if (listp ps-lpr-switches) - ps-lpr-switches - (list ps-lpr-switches)) + (append ps-lpr-switches (and (stringp ps-printer-name) (string< "" ps-printer-name) (list (concat -- 2.39.2