From: Richard M. Stallman Date: Sat, 18 Apr 1998 02:01:12 +0000 (+0000) Subject: (ps-output-string-prim): Use skip-chars-forward. X-Git-Tag: emacs-20.3~1433 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b61e2c11a2dc5dedfb20982a64eb82d3ebf2e98f;p=emacs.git (ps-output-string-prim): Use skip-chars-forward. --- diff --git a/lisp/ps-print.el b/lisp/ps-print.el index 576746ce085..e0f292cd06c 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el @@ -2927,9 +2927,11 @@ page-height == bm + print-height + tm - ho - hh (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