comparison lisp/dired-aux.el @ 1672:ecf43116a845

The find-file-name-handler function in ../src/fileio.c is now callable from lisp; use it instead of writing out its code. * dired-aux.el (dired-compress-file): Just that. * dired.el (dired-uncache): Just that. * files.el (file-local-copy, file-truename, file-name-sans-versions, make-directory, save-buffers-kill-emacs): Just that. * ls-lisp.el (insert-directory): Just that.
author Jim Blandy <jimb@redhat.com>
date Sat, 12 Dec 1992 15:21:45 +0000
parents 2d29bf379da3
children ffef0718ef6b
comparison
equal deleted inserted replaced
1671:b2a50ea75eea 1672:ecf43116a845
475 475
476 (defun dired-compress-file (file) 476 (defun dired-compress-file (file)
477 ;; Compress or uncompress FILE. 477 ;; Compress or uncompress FILE.
478 ;; Return the name of the compressed or uncompressed file. 478 ;; Return the name of the compressed or uncompressed file.
479 ;; Rerurn nil if no change in files. 479 ;; Rerurn nil if no change in files.
480 (let (handler (handlers file-name-handler-alist)) 480 (let ((handler (find-file-name-handler file)))
481 (save-match-data
482 (while (and (consp handlers) (null handler))
483 (if (and (consp (car handlers))
484 (stringp (car (car handlers)))
485 (string-match (car (car handlers)) file))
486 (setq handler (cdr (car handlers))))
487 (setq handlers (cdr handlers))))
488 (cond (handler 481 (cond (handler
489 (funcall handler 'dired-compress-file file)) 482 (funcall handler 'dired-compress-file file))
490 ((file-symlink-p file) 483 ((file-symlink-p file)
491 nil) 484 nil)
492 ((string-match "\\.Z$" file) 485 ((string-match "\\.Z$" file)