aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-04-24 08:02:11 +0000
committerRichard M. Stallman1994-04-24 08:02:11 +0000
commit99bee6a4a42b9cc24d3527956ac5be21eaa6d855 (patch)
tree8e21d80e638ef20dde44e24d904a5769b6603fa4
parent57ad77fab17e26c294351cddba7eb056bce6ce6f (diff)
downloademacs-99bee6a4a42b9cc24d3527956ac5be21eaa6d855.tar.gz
emacs-99bee6a4a42b9cc24d3527956ac5be21eaa6d855.zip
Doc fixes.
(jka-compr-run-real-handler): New function. jka-compr-handler): Call it, to reinvoke the Emacs primitive using the new inhibit protocol.
-rw-r--r--lisp/jka-compr.el30
1 files changed, 21 insertions, 9 deletions
diff --git a/lisp/jka-compr.el b/lisp/jka-compr.el
index bf55827c321..7419d086b61 100644
--- a/lisp/jka-compr.el
+++ b/lisp/jka-compr.el
@@ -115,7 +115,7 @@
115 "*Shell to be used for calling compression programs. 115 "*Shell to be used for calling compression programs.
116The value of this variable only matters if you want to discard the 116The value of this variable only matters if you want to discard the
117stderr of a compression/decompression program (see the documentation 117stderr of a compression/decompression program (see the documentation
118for jka-compr-compression-info-list).") 118for `jka-compr-compression-info-list').")
119 119
120 120
121(defvar jka-compr-use-shell t) 121(defvar jka-compr-use-shell t)
@@ -184,7 +184,7 @@ invoked.")
184(defun jka-compr-get-compression-info (filename) 184(defun jka-compr-get-compression-info (filename)
185 "Return information about the compression scheme of FILENAME. 185 "Return information about the compression scheme of FILENAME.
186The determination as to which compression scheme, if any, to use is 186The determination as to which compression scheme, if any, to use is
187based on the filename itself and jka-compr-compression-info-list." 187based on the filename itself and `jka-compr-compression-info-list'."
188 (catch 'compression-info 188 (catch 'compression-info
189 (let ((case-fold-search nil)) 189 (let ((case-fold-search nil))
190 (mapcar 190 (mapcar
@@ -316,7 +316,7 @@ the BEGth char."
316(defvar jka-compr-temp-name-template 316(defvar jka-compr-temp-name-template
317 "/tmp/jka-com" 317 "/tmp/jka-com"
318 "Prefix added to all temp files created by jka-compr. 318 "Prefix added to all temp files created by jka-compr.
319There should be no more than seven characters after the final '/'") 319There should be no more than seven characters after the final `/'")
320 320
321(defvar jka-compr-temp-name-table (make-vector 31 nil)) 321(defvar jka-compr-temp-name-table (make-vector 31 nil))
322 322
@@ -656,7 +656,7 @@ There should be no more than seven characters after the final '/'")
656 656
657(defvar jka-compr-file-name-handler-entry 657(defvar jka-compr-file-name-handler-entry
658 nil 658 nil
659 "The entry in file-name-handler-alist used by the jka-compr I/O functions.") 659 "The entry in `file-name-handler-alist' used by the jka-compr I/O functions.")
660 660
661 661
662(defun jka-compr-handler (operation &rest args) 662(defun jka-compr-handler (operation &rest args)
@@ -671,13 +671,25 @@ There should be no more than seven characters after the final '/'")
671 file-name-handler-alist)) 671 file-name-handler-alist))
672 (if jka-op 672 (if jka-op
673 (apply jka-op args) 673 (apply jka-op args)
674 (apply operation args))) 674 (jka-compr-run-real-handler operation args)))
675 675
676 (setq file-name-handler-alist 676 (setq file-name-handler-alist
677 (cons jka-compr-file-name-handler-entry 677 (cons jka-compr-file-name-handler-entry
678 file-name-handler-alist)) 678 file-name-handler-alist))
679 (store-match-data match-data)))) 679 (store-match-data match-data))))
680 680
681;; If we are given an operation that we don't handle,
682;; call the Emacs primitive for that operation,
683;; and manipulate the inhibit variables
684;; to prevent the primitive from calling our handler again.
685(defun jka-compr-run-real-handler (operation args)
686 (let ((inhibit-file-name-handlers
687 (cons 'jka-compr-handler
688 (and (eq inhibit-file-name-operation operation)
689 inhibit-file-name-handlers)))
690 (inhibit-file-name-operation operation))
691 (apply operation args)))
692
681 693
682(defvar jka-compr-op-table 694(defvar jka-compr-op-table
683 (make-vector 127 0) 695 (make-vector 127 0)
@@ -749,7 +761,7 @@ Returns the new status of auto compression (non-nil means on)."
749 761
750(defun jka-compr-install () 762(defun jka-compr-install ()
751 "Install jka-compr. 763 "Install jka-compr.
752Appropriate entries are added to file-name-handler-alist and auto-mode-alist." 764This adds entries to `file-name-handler-alist' and `auto-mode-alist'."
753 765
754 (setq jka-compr-file-name-handler-entry 766 (setq jka-compr-file-name-handler-entry
755 (cons (jka-compr-build-file-regexp) 'jka-compr-handler)) 767 (cons (jka-compr-build-file-regexp) 'jka-compr-handler))
@@ -770,8 +782,8 @@ Appropriate entries are added to file-name-handler-alist and auto-mode-alist."
770 782
771(defun jka-compr-uninstall () 783(defun jka-compr-uninstall ()
772 "Uninstall jka-compr. 784 "Uninstall jka-compr.
773Entries in file-name-handler-alist and auto-mode-alist that were created by 785This removes the entries in `file-name-handler-alist' and `auto-mode-alist'
774jka-compr-installed are removed." 786that were created by `jka-compr-installed'."
775 787
776 (let* ((fnha (cons nil file-name-handler-alist)) 788 (let* ((fnha (cons nil file-name-handler-alist))
777 (last fnha)) 789 (last fnha))
@@ -799,7 +811,7 @@ jka-compr-installed are removed."
799 811
800(defun jka-compr-installed-p () 812(defun jka-compr-installed-p ()
801 "Return non-nil if jka-compr is installed. 813 "Return non-nil if jka-compr is installed.
802The return value is the entry in file-name-handler-alist for jka-compr." 814The return value is the entry in `file-name-handler-alist' for jka-compr."
803 815
804 (let ((fnha file-name-handler-alist) 816 (let ((fnha file-name-handler-alist)
805 (installed nil)) 817 (installed nil))