aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2019-06-13 03:12:03 +0200
committerLars Ingebrigtsen2019-06-13 03:12:03 +0200
commit4752de83493df806b8cce0ff430f62fdcda46db2 (patch)
tree792c3dcb496be665b21f76a493384b076107850b
parentc25e3754ed85b668f2a9b56db8eb5572cf973826 (diff)
downloademacs-4752de83493df806b8cce0ff430f62fdcda46db2.tar.gz
emacs-4752de83493df806b8cce0ff430f62fdcda46db2.zip
Avoid string-make-multibyte in ps-mode.el
* lisp/progmodes/ps-mode.el (ps-mode-octal-region): Avoid usage of string-make-multibyte, but work in both unibyte and multibyte buffers.
-rw-r--r--lisp/progmodes/ps-mode.el9
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/progmodes/ps-mode.el b/lisp/progmodes/ps-mode.el
index 0ea2bee0aa2..989a9941b44 100644
--- a/lisp/progmodes/ps-mode.el
+++ b/lisp/progmodes/ps-mode.el
@@ -737,11 +737,10 @@ Only one `%' is removed, and it has to be in the first column."
737 (setq i 0) 737 (setq i 0)
738 (while (re-search-forward "[\200-\377]" (marker-position endm) t) 738 (while (re-search-forward "[\200-\377]" (marker-position endm) t)
739 (setq i (1+ i)) 739 (setq i (1+ i))
740 (backward-char) 740 (replace-match (format "\\%03o"
741 (insert (format "\\%03o" (string-to-char 741 (multibyte-char-to-unibyte
742 (string-make-unibyte 742 (char-after (1- (point)))))
743 (buffer-substring (point) (1+ (point))))))) 743 t t))
744 (delete-char 1))
745 (message "%d change%s made" i (if (= i 1) "" "s")) 744 (message "%d change%s made" i (if (= i 1) "" "s"))
746 (set-marker endm nil))))) 745 (set-marker endm nil)))))
747 746