Mercurial > emacs
changeset 52098:6e131215906b
printify-region fix
author | Vinicius Jose Latorre <viniciusjl@ig.com.br> |
---|---|
date | Fri, 01 Aug 2003 23:40:00 +0000 |
parents | bcffc07ec8d2 |
children | 7c42865bf87c |
files | lisp/ChangeLog lisp/lpr.el |
diffstat | 2 files changed, 17 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Fri Aug 01 00:32:34 2003 +0000 +++ b/lisp/ChangeLog Fri Aug 01 23:40:00 2003 +0000 @@ -1,3 +1,8 @@ +2003-08-01 Vinicius Jose Latorre <viniciusjl@ig.com.br> + + * lpr.el (printify-region): It was ending conversion before the + expected position. Reported by Keiichi Suzuki <keiichi@nanap.org>. + 2003-07-31 John Paul Wallington <jpw@gnu.org> * net/browse-url.el (browse-url-epiphany): Doc fix.
--- a/lisp/lpr.el Fri Aug 01 00:32:34 2003 +0000 +++ b/lisp/lpr.el Fri Aug 01 23:40:00 2003 +0000 @@ -1,6 +1,7 @@ ;;; 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 @@ -283,14 +284,16 @@ 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.