diff options
| author | Vinicius Jose Latorre | 2007-11-21 15:16:55 +0000 |
|---|---|---|
| committer | Vinicius Jose Latorre | 2007-11-21 15:16:55 +0000 |
| commit | 7d5cb920d08d07a3e44c6893f1524352bc207ce3 (patch) | |
| tree | 2ff27c7877a1fa127573deaafd2b11b83c894f0c | |
| parent | 532729d52d6c62b11caf83b55d325587b05d6c15 (diff) | |
| download | emacs-7d5cb920d08d07a3e44c6893f1524352bc207ce3.tar.gz emacs-7d5cb920d08d07a3e44c6893f1524352bc207ce3.zip | |
ps-lpr-switches docstring fix.
| -rw-r--r-- | lisp/ChangeLog.unicode | 6 | ||||
| -rw-r--r-- | lisp/ps-print.el | 40 |
2 files changed, 43 insertions, 3 deletions
diff --git a/lisp/ChangeLog.unicode b/lisp/ChangeLog.unicode index 7816f099d9c..3427854cac7 100644 --- a/lisp/ChangeLog.unicode +++ b/lisp/ChangeLog.unicode | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2007-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 | |||
| 1 | 2007-11-19 Kenichi Handa <handa@ni.aist.go.jp> | 7 | 2007-11-19 Kenichi Handa <handa@ni.aist.go.jp> |
| 2 | 8 | ||
| 3 | * international/utf-7.el (utf-7-imap-post-read-conversion) | 9 | * international/utf-7.el (utf-7-imap-post-read-conversion) |
diff --git a/lisp/ps-print.el b/lisp/ps-print.el index c327c25bf6c..6be1f12d439 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 "7.3.1" | 16 | (defconst ps-print-version "7.3.1" |
| 17 | "ps-print.el, v 7.3.1 <2007/11/09 vinicius> | 17 | "ps-print.el, v 7.3.1 <2007/11/21 vinicius> |
| 18 | 18 | ||
| 19 | Vinicius's last change version -- this file may have been edited as part of | 19 | Vinicius's last change version -- this file may have been edited as part of |
| 20 | Emacs without changes to the version number. When reporting bugs, please also | 20 | Emacs without changes to the version number. When reporting bugs, please also |
| @@ -1752,7 +1752,28 @@ an explicit filename is given as the last argument." | |||
| 1752 | :group 'ps-print-printer) | 1752 | :group 'ps-print-printer) |
| 1753 | 1753 | ||
| 1754 | (defcustom ps-lpr-switches lpr-switches | 1754 | (defcustom ps-lpr-switches lpr-switches |
| 1755 | "*A list of extra switches to pass to `ps-lpr-command'." | 1755 | "*List of extra switches to pass to `ps-lpr-command'. |
| 1756 | |||
| 1757 | The list element can be: | ||
| 1758 | |||
| 1759 | string it should be an option for `ps-lpr-command' (which see). | ||
| 1760 | For example: \"-o Duplex=DuplexNoTumble\" | ||
| 1761 | |||
| 1762 | symbol it can be a function or variable symbol. If it's a function | ||
| 1763 | symbol, it should be a function with no argument. The result | ||
| 1764 | of the function or the variable value should be a string or a | ||
| 1765 | list of strings. | ||
| 1766 | |||
| 1767 | list the header should be a symbol function and the tail is the | ||
| 1768 | arguments for this function. This function should return a | ||
| 1769 | string or a list of strings. | ||
| 1770 | |||
| 1771 | Any other value is silently ignored. | ||
| 1772 | |||
| 1773 | It is recommended to set `ps-printer-name' (which see) instead of including an | ||
| 1774 | explicit switch on this list. | ||
| 1775 | |||
| 1776 | See `ps-lpr-command'." | ||
| 1756 | :type '(repeat :tag "PostScript lpr Switches" | 1777 | :type '(repeat :tag "PostScript lpr Switches" |
| 1757 | (choice :menu-tag "PostScript lpr Switch" | 1778 | (choice :menu-tag "PostScript lpr Switch" |
| 1758 | :tag "PostScript lpr Switch" | 1779 | :tag "PostScript lpr Switch" |
| @@ -6526,10 +6547,23 @@ If FACE is not a valid face name, use default face." | |||
| 6526 | (and (fboundp 'start-process) 0) | 6547 | (and (fboundp 'start-process) 0) |
| 6527 | nil | 6548 | nil |
| 6528 | (ps-flatten-list ; dynamic evaluation | 6549 | (ps-flatten-list ; dynamic evaluation |
| 6529 | (mapcar 'ps-eval-switch ps-lpr-switches))))) | 6550 | (ps-string-list |
| 6551 | (mapcar 'ps-eval-switch ps-lpr-switches)))))) | ||
| 6530 | (and ps-razzle-dazzle (message "Printing...done"))) | 6552 | (and ps-razzle-dazzle (message "Printing...done"))) |
| 6531 | (kill-buffer ps-spool-buffer))) | 6553 | (kill-buffer ps-spool-buffer))) |
| 6532 | 6554 | ||
| 6555 | (defun ps-string-list (arg) | ||
| 6556 | (let (lstr) | ||
| 6557 | (dolist (elm arg) | ||
| 6558 | (cond ((stringp elm) | ||
| 6559 | (setq lstr (cons elm lstr))) | ||
| 6560 | ((listp elm) | ||
| 6561 | (let ((s (ps-string-list elm))) | ||
| 6562 | (when s | ||
| 6563 | (setq lstr (cons s lstr))))) | ||
| 6564 | (t ))) ; ignore any other value | ||
| 6565 | (nreverse lstr))) | ||
| 6566 | |||
| 6533 | ;; Dynamic evaluation | 6567 | ;; Dynamic evaluation |
| 6534 | (defun ps-eval-switch (arg) | 6568 | (defun ps-eval-switch (arg) |
| 6535 | (cond ((stringp arg) arg) | 6569 | (cond ((stringp arg) arg) |