changeset 21642:d33cd398d663

(ps-output-string-prim): Use skip-chars-forward.
author Richard M. Stallman <rms@gnu.org>
date Sat, 18 Apr 1998 02:01:12 +0000
parents 1174b1d6cbf6
children 475d7e2df534
files lisp/ps-print.el
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ps-print.el	Sat Apr 18 01:57:45 1998 +0000
+++ b/lisp/ps-print.el	Sat Apr 18 02:01:12 1998 +0000
@@ -2927,9 +2927,11 @@
   (save-excursion			;insert string
     (insert string))
   ;; Find and quote special characters as necessary for PS
-  (while (re-search-forward "[\000-\037\177-\377()\\]" nil t)
-    (let ((special (preceding-char)))
-      (delete-char -1)
+  ;; This skips everything except control chars, nonascii chars,
+  ;; (, ) and \.
+  (while (progn (skip-chars-forward " -'*-[]-~") (not (eobp)))
+    (let ((special (following-char)))
+      (delete-char 1)
       (insert (aref ps-string-escape-codes special))))
   (goto-char (point-max))
   (insert ")"))				;insert end-string delimiter