diff options
author | Andrea Corallo <akrl@sdf.org> | 2021-03-09 10:03:47 +0100 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2021-03-09 10:03:47 +0100 |
commit | 43b0df62cd5922df5495b3f4aee5b7beca14384f (patch) | |
tree | 3c0bfa9526d08c9c85e646cd355467e3dfb439ac /lisp/vc/pcvs-util.el | |
parent | 380ba045c48bfbb160da288b1bd50f82d3f999f0 (diff) | |
parent | 9cbdf20316e1cec835a7dfe28877142e437976f4 (diff) | |
download | emacs-43b0df62cd5922df5495b3f4aee5b7beca14384f.tar.gz emacs-43b0df62cd5922df5495b3f4aee5b7beca14384f.tar.bz2 emacs-43b0df62cd5922df5495b3f4aee5b7beca14384f.zip |
Merge commit '9cbdf20316' into native-comp
Diffstat (limited to 'lisp/vc/pcvs-util.el')
-rw-r--r-- | lisp/vc/pcvs-util.el | 30 |
1 files changed, 6 insertions, 24 deletions
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 |