aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2006-09-09 10:40:27 +0000
committerEli Zaretskii2006-09-09 10:40:27 +0000
commitc98557ae615167cf93075d5c28dc18a281db1472 (patch)
tree1321ff2dbba895499469271a9d8276b0d658417f
parent7b26001712700bc0718a8c0ef8eaf0246be7bf39 (diff)
downloademacs-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/ChangeLog5
-rw-r--r--lisp/lpr.el9
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 @@
12006-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
12006-09-09 Matt Hodges <MPHodges@member.fsf.org> 62006-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.
145If `%s' appears in one of the strings, it is substituted by the page title.
145The variable `lpr-page-header-program' specifies the program to use." 146The 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)