diff options
| author | Eli Zaretskii | 2006-09-09 10:40:27 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2006-09-09 10:40:27 +0000 |
| commit | c98557ae615167cf93075d5c28dc18a281db1472 (patch) | |
| tree | 1321ff2dbba895499469271a9d8276b0d658417f | |
| parent | 7b26001712700bc0718a8c0ef8eaf0246be7bf39 (diff) | |
| download | emacs-c98557ae615167cf93075d5c28dc18a281db1472.tar.gz emacs-c98557ae615167cf93075d5c28dc18a281db1472.zip | |
(lpr-page-header-switches): Page title switch is one of them.
(print-region-1): Substitute `%s' with the page title.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/lpr.el | 9 |
2 files changed, 10 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7f7c3c747a0..a52ffebadfa 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2006-09-09 Micha,Ak(Bl Cadilhac <michael.cadilhac@lrde.org> | ||
| 2 | |||
| 3 | * lpr.el (lpr-page-header-switches): Page title switch is one of them. | ||
| 4 | (print-region-1): Substitute `%s' with the page title. | ||
| 5 | |||
| 1 | 2006-09-09 Matt Hodges <MPHodges@member.fsf.org> | 6 | 2006-09-09 Matt Hodges <MPHodges@member.fsf.org> |
| 2 | 7 | ||
| 3 | * locate.el (locate-current-search): New variable. | 8 | * locate.el (locate-current-search): New variable. |
diff --git a/lisp/lpr.el b/lisp/lpr.el index 14d1049f074..dd39eb24349 100644 --- a/lisp/lpr.el +++ b/lisp/lpr.el | |||
| @@ -140,8 +140,9 @@ See definition of `print-region-1' for calling conventions." | |||
| 140 | 140 | ||
| 141 | ;; Berkeley systems support -F, and GNU pr supports both -f and -F, | 141 | ;; Berkeley systems support -F, and GNU pr supports both -f and -F, |
| 142 | ;; So it looks like -F is a better default. | 142 | ;; So it looks like -F is a better default. |
| 143 | (defcustom lpr-page-header-switches '("-F") | 143 | (defcustom lpr-page-header-switches '("-h %s" "-F") |
| 144 | "*List of strings to use as options for the page-header-generating program. | 144 | "List of strings to use as options for the page-header-generating program. |
| 145 | If `%s' appears in one of the strings, it is substituted by the page title. | ||
| 145 | The variable `lpr-page-header-program' specifies the program to use." | 146 | The variable `lpr-page-header-program' specifies the program to use." |
| 146 | :type '(repeat string) | 147 | :type '(repeat string) |
| 147 | :group 'lpr) | 148 | :group 'lpr) |
| @@ -243,8 +244,8 @@ for further customization of the printer command." | |||
| 243 | (let ((new-coords (print-region-new-buffer start end))) | 244 | (let ((new-coords (print-region-new-buffer start end))) |
| 244 | (apply 'call-process-region (car new-coords) (cdr new-coords) | 245 | (apply 'call-process-region (car new-coords) (cdr new-coords) |
| 245 | lpr-page-header-program t t nil | 246 | lpr-page-header-program t t nil |
| 246 | (nconc (list "-h" title) | 247 | (mapcar (lambda (e) (format e title)) |
| 247 | lpr-page-header-switches))) | 248 | lpr-page-header-switches))) |
| 248 | (setq start (point-min) | 249 | (setq start (point-min) |
| 249 | end (point-max)))) | 250 | end (point-max)))) |
| 250 | (apply (or print-region-function 'call-process-region) | 251 | (apply (or print-region-function 'call-process-region) |