Mercurial > hg > xemacs-beta
comparison lisp/packages/ps-print.el @ 74:54cc21c15cbb r20-0b32
Import from CVS: tag r20-0b32
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:04:33 +0200 |
parents | 131b0175ea99 |
children | 6a378aca36af |
comparison
equal
deleted
inserted
replaced
73:e2d7a37b7c8d | 74:54cc21c15cbb |
---|---|
1897 (delete-region (marker-position safe-marker) (point-max)))))) | 1897 (delete-region (marker-position safe-marker) (point-max)))))) |
1898 | 1898 |
1899 (if ps-razzle-dazzle | 1899 (if ps-razzle-dazzle |
1900 (message "Formatting...done"))))) | 1900 (message "Formatting...done"))))) |
1901 | 1901 |
1902 ;; XEmacs change | |
1903 (require 'message) ; Until We can get some sensible autoloads, or | |
1904 ; message-flatten-list gets put somewhere decent. | |
1905 ;; Permit dynamic evaluation at print time of ps-lpr-switches | |
1902 (defun ps-do-despool (filename) | 1906 (defun ps-do-despool (filename) |
1903 (if (or (not (boundp 'ps-spool-buffer)) | 1907 (if (or (not (boundp 'ps-spool-buffer)) |
1904 (not ps-spool-buffer)) | 1908 (not ps-spool-buffer)) |
1905 (message "No spooled PostScript to print") | 1909 (message "No spooled PostScript to print") |
1906 (ps-end-file) | 1910 (ps-end-file) |
1919 (message "Printing...")) | 1923 (message "Printing...")) |
1920 (save-excursion | 1924 (save-excursion |
1921 (set-buffer ps-spool-buffer) | 1925 (set-buffer ps-spool-buffer) |
1922 (if (and (eq system-type 'ms-dos) (stringp dos-ps-printer)) | 1926 (if (and (eq system-type 'ms-dos) (stringp dos-ps-printer)) |
1923 (write-region (point-min) (point-max) dos-ps-printer t 0) | 1927 (write-region (point-min) (point-max) dos-ps-printer t 0) |
1924 (let ((binary-process-input t)) ; for MS-DOS | 1928 (let ((binary-process-input t) ; for MS-DOS |
1929 (ps-lpr-sw (message-flatten-list ; XEmacs | |
1930 (mapcar '(lambda (arg) ; Dynamic evaluation | |
1931 (cond ((stringp arg) arg) | |
1932 ((functionp arg) (apply arg nil)) | |
1933 ((symbolp arg) (eval arg)) | |
1934 ((consp arg) (apply (car arg) | |
1935 (cdr arg))) | |
1936 (t nil))) | |
1937 ps-lpr-switches)))) | |
1925 (apply 'call-process-region | 1938 (apply 'call-process-region |
1926 (point-min) (point-max) ps-lpr-command nil | 1939 (point-min) (point-max) ps-lpr-command nil |
1927 (if (fboundp 'start-process) 0 nil) | 1940 (if (fboundp 'start-process) 0 nil) |
1928 nil | 1941 nil |
1929 ps-lpr-switches)))) | 1942 ps-lpr-sw)))) |
1930 (if ps-razzle-dazzle | 1943 (if ps-razzle-dazzle |
1931 (message "Printing...done"))) | 1944 (message "Printing...done"))) |
1932 (kill-buffer ps-spool-buffer))) | 1945 (kill-buffer ps-spool-buffer))) |
1933 | 1946 |
1934 (defun ps-kill-emacs-check () | 1947 (defun ps-kill-emacs-check () |
2027 ;; Every now and then I forget to switch from the *Summary* buffer to | 2040 ;; Every now and then I forget to switch from the *Summary* buffer to |
2028 ;; the *Article* before hitting prsc, and a nicely formatted list of | 2041 ;; the *Article* before hitting prsc, and a nicely formatted list of |
2029 ;; article subjects shows up at the printer. This function, bound to | 2042 ;; article subjects shows up at the printer. This function, bound to |
2030 ;; prsc for the gnus *Summary* buffer means I don't have to switch | 2043 ;; prsc for the gnus *Summary* buffer means I don't have to switch |
2031 ;; buffers first. | 2044 ;; buffers first. |
2045 ;; sb: Updated for Gnus 5. | |
2032 (defun ps-gnus-print-article-from-summary () | 2046 (defun ps-gnus-print-article-from-summary () |
2033 (interactive) | 2047 (interactive) |
2034 (if (get-buffer "*Article*") | 2048 (let ((ps-buf (if (boundp 'gnus-article-buffer) |
2035 (save-excursion | 2049 gnus-article-buffer |
2036 (set-buffer "*Article*") | 2050 "*Article*"))) |
2037 (ps-spool-buffer-with-faces)))) | 2051 (if (get-buffer ps-buf) |
2052 (save-excursion | |
2053 (set-buffer ps-buf) | |
2054 (ps-spool-buffer-with-faces))))) | |
2038 | 2055 |
2039 ;; See ps-gnus-print-article-from-summary. This function does the | 2056 ;; See ps-gnus-print-article-from-summary. This function does the |
2040 ;; same thing for vm. | 2057 ;; same thing for vm. |
2041 (defun ps-vm-print-message-from-summary () | 2058 (defun ps-vm-print-message-from-summary () |
2042 (interactive) | 2059 (interactive) |