;;; lpr.el --- print Emacs buffer on line printer
-;; Copyright (C) 1985, 1988, 1992, 1994, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1988, 1992, 1994, 2001, 2003
+;; Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: unix
Otherwise, the switches in `lpr-headers-switches' are used
in the print command itself; we expect them to request pagination.
-
+
See the variables `lpr-switches' and `lpr-command'
for further customization of the printer command."
(interactive)
Otherwise, the switches in `lpr-headers-switches' are used
in the print command itself; we expect them to request pagination.
-
+
See the variables `lpr-switches' and `lpr-command'
for further customization of the printer command."
(interactive "r")
The characters tab, linefeed, space, return and formfeed are not affected."
(interactive "r")
(save-excursion
- (goto-char begin)
- (let (c)
- (while (re-search-forward "[\^@-\^h\^k\^n-\^_\177-\377]" end t)
- (setq c (preceding-char))
- (delete-backward-char 1)
- (insert (if (< c ?\ )
- (format "\\^%c" (+ c ?@))
- (format "\\%02x" c)))))))
+ (save-restriction
+ (narrow-to-region begin end)
+ (goto-char (point-min))
+ (let (c)
+ (while (re-search-forward "[\^@-\^h\^k\^n-\^_\177-\377]" nil t)
+ (setq c (preceding-char))
+ (delete-backward-char 1)
+ (insert (if (< c ?\ )
+ (format "\\^%c" (+ c ?@))
+ (format "\\%02x" c))))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Functions hacked from `ps-print' package.
(provide 'lpr)
+;;; arch-tag: 21c3f821-ebec-4ca9-ac67-a81e4b75c62a
;;; lpr.el ends here