aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinicius Jose Latorre2007-11-21 15:27:22 +0000
committerVinicius Jose Latorre2007-11-21 15:27:22 +0000
commit9b1d7c34454febbb02c879bd7caf7132da1e518f (patch)
treebbab56347fe05ebf08f35ed6185c31bfa4592f4f
parentb541ccb455955e7affe318779e403d3e677dd4be (diff)
downloademacs-9b1d7c34454febbb02c879bd7caf7132da1e518f.tar.gz
emacs-9b1d7c34454febbb02c879bd7caf7132da1e518f.zip
ps-lpr-switches docstring fix.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/ps-print.el40
2 files changed, 43 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 53a5eceafbb..581dfd8423a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12007-11-21 Vinicius Jose Latorre <viniciusjl@ig.com.br>
2
3 * ps-print.el (ps-lpr-switches): Docstring fix.
4 (ps-string-list): New fun.
5 (ps-do-despool): Code fix.
6
12007-11-21 Juanma Barranquero <lekktu@gmail.com> 72007-11-21 Juanma Barranquero <lekktu@gmail.com>
2 8
3 * w32-fns.el: Undo 2007-11-21 change by Dan Nicolaescu. 9 * w32-fns.el: Undo 2007-11-21 change by Dan Nicolaescu.
diff --git a/lisp/ps-print.el b/lisp/ps-print.el
index ba8075730d5..0c567729fbe 100644
--- a/lisp/ps-print.el
+++ b/lisp/ps-print.el
@@ -14,7 +14,7 @@
14;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre 14;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre
15 15
16(defconst ps-print-version "6.8.1" 16(defconst ps-print-version "6.8.1"
17 "ps-print.el, v 6.8.1 <2007/11/09 vinicius> 17 "ps-print.el, v 6.8.1 <2007/11/21 vinicius>
18 18
19Vinicius's last change version -- this file may have been edited as part of 19Vinicius's last change version -- this file may have been edited as part of
20Emacs without changes to the version number. When reporting bugs, please also 20Emacs without changes to the version number. When reporting bugs, please also
@@ -1788,7 +1788,28 @@ an explicit filename is given as the last argument."
1788 :group 'ps-print-printer) 1788 :group 'ps-print-printer)
1789 1789
1790(defcustom ps-lpr-switches lpr-switches 1790(defcustom ps-lpr-switches lpr-switches
1791 "*A list of extra switches to pass to `ps-lpr-command'." 1791 "*List of extra switches to pass to `ps-lpr-command'.
1792
1793The list element can be:
1794
1795 string it should be an option for `ps-lpr-command' (which see).
1796 For example: \"-o Duplex=DuplexNoTumble\"
1797
1798 symbol it can be a function or variable symbol. If it's a function
1799 symbol, it should be a function with no argument. The result
1800 of the function or the variable value should be a string or a
1801 list of strings.
1802
1803 list the header should be a symbol function and the tail is the
1804 arguments for this function. This function should return a
1805 string or a list of strings.
1806
1807Any other value is silently ignored.
1808
1809It is recommended to set `ps-printer-name' (which see) instead of including an
1810explicit switch on this list.
1811
1812See `ps-lpr-command'."
1792 :type '(repeat :tag "PostScript lpr Switches" 1813 :type '(repeat :tag "PostScript lpr Switches"
1793 (choice :menu-tag "PostScript lpr Switch" 1814 (choice :menu-tag "PostScript lpr Switch"
1794 :tag "PostScript lpr Switch" 1815 :tag "PostScript lpr Switch"
@@ -6859,10 +6880,23 @@ If FACE is not a valid face name, use default face."
6859 (and (fboundp 'start-process) 0) 6880 (and (fboundp 'start-process) 0)
6860 nil 6881 nil
6861 (ps-flatten-list ; dynamic evaluation 6882 (ps-flatten-list ; dynamic evaluation
6862 (mapcar 'ps-eval-switch ps-lpr-switches))))) 6883 (ps-string-list
6884 (mapcar 'ps-eval-switch ps-lpr-switches))))))
6863 (and ps-razzle-dazzle (message "Printing...done"))) 6885 (and ps-razzle-dazzle (message "Printing...done")))
6864 (kill-buffer ps-spool-buffer))) 6886 (kill-buffer ps-spool-buffer)))
6865 6887
6888(defun ps-string-list (arg)
6889 (let (lstr)
6890 (dolist (elm arg)
6891 (cond ((stringp elm)
6892 (setq lstr (cons elm lstr)))
6893 ((listp elm)
6894 (let ((s (ps-string-list elm)))
6895 (when s
6896 (setq lstr (cons s lstr)))))
6897 (t ))) ; ignore any other value
6898 (nreverse lstr)))
6899
6866;; Dynamic evaluation 6900;; Dynamic evaluation
6867(defun ps-eval-switch (arg) 6901(defun ps-eval-switch (arg)
6868 (cond ((stringp arg) arg) 6902 (cond ((stringp arg) arg)