comparison lisp/format.el @ 24347:eb03024d18fc

(format-encode-run-method, format-decode-run-method): Fix previous change.
author Dave Love <fx@gnu.org>
date Thu, 18 Feb 1999 15:46:31 +0000
parents 382a7de604b6
children 583275537b14
comparison
equal deleted inserted replaced
24346:68d26067bb74 24347:eb03024d18fc
147 If METHOD is a string, it is a shell command; 147 If METHOD is a string, it is a shell command;
148 otherwise, it should be a Lisp function. 148 otherwise, it should be a Lisp function.
149 BUFFER should be the buffer that the output originally came from." 149 BUFFER should be the buffer that the output originally came from."
150 (if (stringp method) 150 (if (stringp method)
151 (let ((error-buff (get-buffer-create "*Format Errors*")) 151 (let ((error-buff (get-buffer-create "*Format Errors*"))
152 (coding-system-for-write 'no-conversion) 152 (coding-system-for-read 'no-conversion)
153 format-alist) 153 format-alist)
154 (with-current-buffer error-buff 154 (with-current-buffer error-buff
155 (widen) 155 (widen)
156 (erase-buffer)) 156 (erase-buffer))
157 (if (and (zerop (shell-command-on-region from to method t t 157 (if (and (zerop (shell-command-on-region from to method t t
168 "Decode using function or shell script METHOD the text from FROM to TO. 168 "Decode using function or shell script METHOD the text from FROM to TO.
169 If METHOD is a string, it is a shell command; otherwise, it should be 169 If METHOD is a string, it is a shell command; otherwise, it should be
170 a Lisp function. Decoding is done for the given BUFFER." 170 a Lisp function. Decoding is done for the given BUFFER."
171 (if (stringp method) 171 (if (stringp method)
172 (let ((error-buff (get-buffer-create "*Format Errors*")) 172 (let ((error-buff (get-buffer-create "*Format Errors*"))
173 (coding-system-for-read 'no-conversion) ; like jka-compr 173 (coding-system-for-write 'no-conversion)
174 format-alist) 174 format-alist)
175 (with-current-buffer error-buff 175 (with-current-buffer error-buff
176 (widen) 176 (widen)
177 (erase-buffer)) 177 (erase-buffer))
178 ;; We should perhaps go via a temporary buffer and copy it 178 ;; We should perhaps go via a temporary buffer and copy it