bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

printify-region


From: Keiichi Suzuki
Subject: printify-region
Date: 30 Jul 2003 11:25:26 +0900
User-agent: Nana-gnus/7.1.0.32 SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 Emacs/21.1 (i386-mingw-nt5.1.2600) MULE/5.0 (SAKAKI) Meadow/2.00-Beta2-dev (WOMINAHESHI)

`printify-region()' ends conversion before the expected
position.

A patch from the CVS HEAD is following.

-------- 8>< -------- 8>< -------- 8>< -------- 8>< --------
Index: lpr.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/lpr.el,v
retrieving revision 1.63
diff -u -u -r1.63 lpr.el
--- lpr.el      4 Feb 2003 11:34:44 -0000       1.63
+++ lpr.el      30 Jul 2003 02:14:56 -0000
@@ -283,14 +283,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 "address@hidden" 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 "address@hidden" 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.
-------- 8>< -------- 8>< -------- 8>< -------- 8>< --------
-- 
Keiichi Suzuki / address@hidden
PGP finger print (DH/DSS)
0B32 B37E 6DE9 3BC1 68A4  4089 7AAF 2B03 ECBD 614B




reply via email to

[Prev in Thread] Current Thread [Next in Thread]