From 99340ad17a826c61895b3e1ed6928b36fbfeac60 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 26 Feb 2021 16:51:15 -0500 Subject: lisp/vc/*.el: Use lexical-bindings in all the files Also remove some redundant `:group` arguments. * lisp/vc/vc.el (vc-ignore): Autoload. * lisp/vc/pcvs-util.el (cvs-every, cvs-union, cvs-map): Delete functions. * lisp/vc/cvs-status.el: Require `cl-lib` at runtime. (cvs-tree-tags-insert): Use `cl-mapcar` and `cl-every` instead. * lisp/vc/pcvs.el: Require `cl-lib` at runtime. (cvs-do-removal): Use `cl-every` instead. * lisp/vc/ediff-init.el: Require `ediff-util` (for `ediff-cleanup-mess` and `ediff-default-suspend-function`). * lisp/vc/pcvs-info.el (cvs-fileinfo<): Remove unused vars `subtypea` and `subtypeb`. * lisp/vc/vc-git.el: * lisp/vc/vc-bzr.el: Require `vc-dispatcher` at runtime for `vc-do-async-command`. --- lisp/vc/pcvs-util.el | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) (limited to 'lisp/vc/pcvs-util.el') diff --git a/lisp/vc/pcvs-util.el b/lisp/vc/pcvs-util.el index 57da7bf730e..75d9fe9bee1 100644 --- a/lisp/vc/pcvs-util.el +++ b/lisp/vc/pcvs-util.el @@ -1,4 +1,4 @@ -;;; pcvs-util.el --- utility functions for PCL-CVS +;;; pcvs-util.el --- utility functions for PCL-CVS -*- lexical-binding: t; -*- ;; Copyright (C) 1991-2021 Free Software Foundation, Inc. @@ -33,27 +33,9 @@ ;;;; (defsubst cvs-car (x) (if (consp x) (car x) x)) -(defalias 'cvs-cdr 'cdr-safe) +(defalias 'cvs-cdr #'cdr-safe) (defsubst cvs-append (&rest xs) - (apply 'append (mapcar (lambda (x) (if (listp x) x (list x))) xs))) - -(defsubst cvs-every (-cvs-every-f -cvs-every-l) - (while (consp -cvs-every-l) - (unless (funcall -cvs-every-f (pop -cvs-every-l)) - (setq -cvs-every-l t))) - (not -cvs-every-l)) - -(defun cvs-union (xs ys) - (let ((zs ys)) - (dolist (x xs zs) - (unless (member x ys) (push x zs))))) - -(defun cvs-map (-cvs-map-f &rest -cvs-map-ls) - (let ((accum ())) - (while (not (cvs-every 'null -cvs-map-ls)) - (push (apply -cvs-map-f (mapcar 'car -cvs-map-ls)) accum) - (setq -cvs-map-ls (mapcar 'cdr -cvs-map-ls))) - (nreverse accum))) + (apply #'append (mapcar (lambda (x) (if (listp x) x (list x))) xs))) (defun cvs-first (l &optional n) (if (null n) (car l) @@ -146,7 +128,7 @@ If NOREUSE is non-nil, always return a new buffer." "Insert a list of STRINGS into the current buffer. Uses columns to keep the listing readable but compact." (when (consp strings) - (let* ((length (apply 'max (mapcar 'length strings))) + (let* ((length (apply #'max (mapcar #'length strings))) (wwidth (1- (window-width))) (columns (min ;; At least 2 columns; at least 2 spaces between columns. @@ -174,7 +156,7 @@ arguments. If ARGS is not a list, no argument will be passed." (condition-case nil (with-temp-buffer (if args - (apply 'call-process + (apply #'call-process file nil t nil (when (listp args) args)) (insert-file-contents file)) (goto-char (point-min)) @@ -182,7 +164,7 @@ arguments. If ARGS is not a list, no argument will be passed." (if oneline (line-end-position) (point-max)))) (file-error nil))) -(define-obsolete-function-alias 'cvs-string-prefix-p 'string-prefix-p "24.3") +(define-obsolete-function-alias 'cvs-string-prefix-p #'string-prefix-p "24.3") ;;;; ;;;; file names -- cgit v1.2.3