[comp.emacs] fix to dired-compress

okrieg@godzilla.ele.toronto.edu ("Orran Y. Krieger") (07/10/88)

The function "dired-compress" was garbled in release 18.50.

The original version was
dired.el:    (message "Compressing %s..." from-fil)e

As is obvious my correction was
me:          (message "Compressing %s..." from-file)

So this is the correct function:

(defun dired-compress ()
  "Compress this file."
  (interactive)
  (let* ((buffer-read-only nil)
	 (from-file (dired-get-filename))
	 (to-file (concat from-file ".Z")))
    (if (string-match "\\.Z$" from-file)
	(error "%s is already compressed!" from-file))
    (message "Compressing %s..." from-file)
    (call-process "compress" nil nil nil "-f" from-file)
    (message "Compressing %s... done" from-file)
    (dired-redisplay to-file)))




-- 

  Orran Krieger
  University of Toronto -- Toronto, Canada

UUCP:	{decvax,ihnp4,linus,utzoo,uw-beaver}!utcsri!godzilla.ele!okrieg