comparison lisp/textmodes/=ispell4.el @ 4889:8b896067d6fb

(ispell): If the buffer to spell has no associated file, or, the associated file has a special handler, use a temporary file with the buffer contents to pass to the local ispell process.
author Brian Fox <bfox@gnu.org>
date Mon, 25 Oct 1993 06:18:23 +0000
parents ef5f87232112
children 7c2d90ff5849
comparison
equal deleted inserted replaced
4888:a58a505c42d9 4889:8b896067d6fb
271 (set-buffer buf) 271 (set-buffer buf)
272 (let ((filename buffer-file-name) 272 (let ((filename buffer-file-name)
273 (delete-temp nil)) 273 (delete-temp nil))
274 (unwind-protect 274 (unwind-protect
275 (progn 275 (progn
276 (cond ((null filename) 276 (cond ((or (null filename)
277 (find-file-name-handler buffer-file-name))
277 (setq filename (make-temp-name "/usr/tmp/ispell")) 278 (setq filename (make-temp-name "/usr/tmp/ispell"))
278 (setq delete-temp t) 279 (setq delete-temp t)
279 (write-region (point-min) (point-max) filename)) 280 (write-region (point-min) (point-max) filename))
280 ((and (buffer-modified-p buf) 281 ((and (buffer-modified-p buf)
281 (y-or-n-p (format "Save file %s? " filename))) 282 (y-or-n-p (format "Save file %s? " filename)))