Commit cb6b810d authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* lisp/jka-compr.el: Use lexical-binding

Prefer #' to quote function names.
parent 1d474ad6
Pipeline #10237 passed with stages
in 9 minutes and 12 seconds
;;; jka-compr.el --- reading/writing/loading compressed files ;;; jka-compr.el --- reading/writing/loading compressed files -*- lexical-binding: t; -*-
;; Copyright (C) 1993-1995, 1997, 1999-2021 Free Software Foundation, ;; Copyright (C) 1993-2021 Free Software Foundation, Inc.
;; Inc.
;; Author: Jay K. Adams <jka@ece.cmu.edu> ;; Author: Jay K. Adams <jka@ece.cmu.edu>
;; Maintainer: emacs-devel@gnu.org ;; Maintainer: emacs-devel@gnu.org
...@@ -120,7 +119,7 @@ data appears to be compressed already.") ...@@ -120,7 +119,7 @@ data appears to be compressed already.")
(widen) (erase-buffer) (widen) (erase-buffer)
(insert (format "Error while executing \"%s %s < %s\"\n\n" (insert (format "Error while executing \"%s %s < %s\"\n\n"
prog prog
(mapconcat 'identity args " ") (mapconcat #'identity args " ")
infile)) infile))
(and errfile (and errfile
...@@ -170,7 +169,7 @@ to keep: LEN chars starting BEG chars from the beginning." ...@@ -170,7 +169,7 @@ to keep: LEN chars starting BEG chars from the beginning."
(format (format
"%s %s 2> %s | \"%s\" bs=%d skip=%d %s 2> %s" "%s %s 2> %s | \"%s\" bs=%d skip=%d %s 2> %s"
prog prog
(mapconcat 'identity args " ") (mapconcat #'identity args " ")
err-file err-file
jka-compr-dd-program jka-compr-dd-program
jka-compr-dd-blocksize jka-compr-dd-blocksize
...@@ -218,7 +217,7 @@ to keep: LEN chars starting BEG chars from the beginning." ...@@ -218,7 +217,7 @@ to keep: LEN chars starting BEG chars from the beginning."
"-c" "-c"
(format "%s %s 2> %s %s" (format "%s %s 2> %s %s"
prog prog
(mapconcat 'identity args " ") (mapconcat #'identity args " ")
err-file err-file
(if (stringp output) (if (stringp output)
(concat "> " output) (concat "> " output)
...@@ -227,7 +226,7 @@ to keep: LEN chars starting BEG chars from the beginning." ...@@ -227,7 +226,7 @@ to keep: LEN chars starting BEG chars from the beginning."
(jka-compr-error prog args infile message err-file)) (jka-compr-error prog args infile message err-file))
(delete-file err-file))) (delete-file err-file)))
(or (eq 0 (or (eq 0
(apply 'call-process (apply #'call-process
prog infile (if (stringp output) temp output) prog infile (if (stringp output) temp output)
nil args)) nil args))
(jka-compr-error prog args infile message)) (jka-compr-error prog args infile message))
...@@ -622,12 +621,12 @@ There should be no more than seven characters after the final `/'." ...@@ -622,12 +621,12 @@ There should be no more than seven characters after the final `/'."
(substring file 0 (string-match (jka-compr-info-regexp info) file))) (substring file 0 (string-match (jka-compr-info-regexp info) file)))
file))) file)))
(put 'write-region 'jka-compr 'jka-compr-write-region) (put 'write-region 'jka-compr #'jka-compr-write-region)
(put 'insert-file-contents 'jka-compr 'jka-compr-insert-file-contents) (put 'insert-file-contents 'jka-compr #'jka-compr-insert-file-contents)
(put 'file-local-copy 'jka-compr 'jka-compr-file-local-copy) (put 'file-local-copy 'jka-compr #'jka-compr-file-local-copy)
(put 'load 'jka-compr 'jka-compr-load) (put 'load 'jka-compr #'jka-compr-load)
(put 'byte-compiler-base-file-name 'jka-compr (put 'byte-compiler-base-file-name 'jka-compr
'jka-compr-byte-compiler-base-file-name) #'jka-compr-byte-compiler-base-file-name)
;;;###autoload ;;;###autoload
(defvar jka-compr-inhibit nil (defvar jka-compr-inhibit nil
...@@ -649,7 +648,7 @@ It is not recommended to set this variable permanently to anything but nil.") ...@@ -649,7 +648,7 @@ It is not recommended to set this variable permanently to anything but nil.")
;; to prevent the primitive from calling our handler again. ;; to prevent the primitive from calling our handler again.
(defun jka-compr-run-real-handler (operation args) (defun jka-compr-run-real-handler (operation args)
(let ((inhibit-file-name-handlers (let ((inhibit-file-name-handlers
(cons 'jka-compr-handler (cons #'jka-compr-handler
(and (eq inhibit-file-name-operation operation) (and (eq inhibit-file-name-operation operation)
inhibit-file-name-handlers))) inhibit-file-name-handlers)))
(inhibit-file-name-operation operation)) (inhibit-file-name-operation operation))
...@@ -674,7 +673,7 @@ by `jka-compr-installed'." ...@@ -674,7 +673,7 @@ by `jka-compr-installed'."
(last fnha)) (last fnha))
(while (cdr last) (while (cdr last)
(if (eq (cdr (car (cdr last))) 'jka-compr-handler) (if (eq (cdr (car (cdr last))) #'jka-compr-handler)
(setcdr last (cdr (cdr last))) (setcdr last (cdr (cdr last)))
(setq last (cdr last)))) (setq last (cdr last))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment