Skip to content

Commit e5c4345

Browse files
authored
Merge pull request quicklisp#218 from kilianmh/master
Fix various stylistic issues
2 parents 2bbf04e + ef36707 commit e5c4345

File tree

7 files changed

+41
-41
lines changed

7 files changed

+41
-41
lines changed

quicklisp/client-info.lisp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,11 @@
219219

220220
(defun local-client-info ()
221221
(let ((info-file (qmerge "client-info.sexp")))
222-
(if (probe-file info-file)
223-
(load-client-info info-file)
224-
(progn
225-
(warn "Missing client-info.sexp, using mock info")
226-
(mock-client-info)))))
222+
(cond ((probe-file info-file)
223+
(load-client-info info-file))
224+
(t
225+
(warn "Missing client-info.sexp, using mock info")
226+
(mock-client-info)))))
227227

228228
(defun newest-client-info (&optional (info (local-client-info)))
229229
(let ((latest (subscription-url info)))

quicklisp/client.lisp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
exclude-local-projects)
101101
"Write a list of system file pathnames to OUTPUT-FILE, one per line,
102102
in order of descending QL-DIST:PREFERENCE."
103-
(when (or (eql output-file nil)
103+
(when (or (null output-file)
104104
(eql output-file t))
105105
(setf output-file (qmerge "manifest.txt")))
106106
(with-open-file (stream output-file

quicklisp/http.lisp

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@
8383
,@(mapcar (lambda (case)
8484
(destructuring-bind (keys &rest body)
8585
case
86-
`(,(if (eql keys t)
87-
t
86+
`(,(or (eql keys t)
8887
(convert-case-keys keys))
8988
,@body)))
9089
cases))))
@@ -115,23 +114,23 @@
115114
(with-slots (pattern pos)
116115
matcher
117116
(loop
118-
(cond ((= pos match-end)
119-
(let ((match-start (- i pos)))
120-
(setf pos 0)
121-
(setf (matchedp matcher) t)
122-
(return (values match-start (+ match-start match-end)))))
123-
((= i end)
124-
(return nil))
125-
((= (aref pattern pos)
126-
(aref input i))
127-
(incf i)
128-
(incf pos))
129-
(t
130-
(if error
131-
(error 'match-failure)
132-
(if (zerop pos)
133-
(incf i)
134-
(setf pos 0)))))))))
117+
(cond ((= pos match-end)
118+
(let ((match-start (- i pos)))
119+
(setf pos 0)
120+
(setf (matchedp matcher) t)
121+
(return (values match-start (+ match-start match-end)))))
122+
((= i end)
123+
(return nil))
124+
((= (aref pattern pos)
125+
(aref input i))
126+
(incf i)
127+
(incf pos))
128+
(error
129+
(error 'match-failure))
130+
((zerop pos)
131+
(incf i))
132+
(t
133+
(setf pos 0)))))))
135134

136135
(defun ascii-matcher (string)
137136
(make-instance 'matcher
@@ -229,7 +228,8 @@
229228
(call-processor fun cbuf (start cbuf) (end cbuf))))
230229

231230
(defun multi-cmatch (matchers cbuf)
232-
(let (start end)
231+
(let ((start nil)
232+
(end nil))
233233
(dolist (matcher matchers (values start end))
234234
(multiple-value-bind (s e)
235235
(match matcher (data cbuf)
@@ -328,8 +328,8 @@
328328
(eql port 443)
329329
host
330330
(or (null port)
331-
(eql port 80)
332-
(eql port 443))
331+
(= port 80)
332+
(= port 443))
333333
port
334334
path))
335335

@@ -852,7 +852,7 @@ the indexes in the header accordingly."
852852
:status-code (status header))))
853853
(if (and follow-redirects (<= 300 (status header) 399))
854854
(let ((new-urlstring (ascii-header-value "location" header)))
855-
(when (not new-urlstring)
855+
(unless new-urlstring
856856
(error "Redirect code ~D received, but no Location: header"
857857
(status header)))
858858
(incf redirect-count)

quicklisp/impl-util.lisp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -337,12 +337,12 @@ quicklisp at CL startup."
337337
(ql-ccl:delete-directory pathname)))
338338

339339
(defimplementation (delete-directory-tree :qualifier :around) (pathname)
340-
(if (directoryp pathname)
341-
(call-next-method)
342-
(progn
343-
(warn "delete-directory-tree - not a directory, ~
344-
deleting anyway -- ~s" pathname)
345-
(delete-file pathname))))
340+
(cond ((directoryp pathname)
341+
(call-next-method))
342+
(t
343+
(warn "delete-directory-tree - not a directory, ~
344+
deleting anyway -- ~s" pathname)
345+
(delete-file pathname))))
346346

347347
(defun map-directory-tree (directory fun)
348348
"Call FUN for every file in directory and all its subdirectories,

quicklisp/local-projects.lisp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@
4949

5050
(defun local-project-system-files (pathname)
5151
"Return a list of system files under PATHNAME."
52-
(let* ((files (matching-directory-files pathname
53-
(lambda (file)
54-
(equalp (pathname-type file)
55-
"asd")))))
52+
(let ((files (matching-directory-files pathname
53+
(lambda (file)
54+
(equalp (pathname-type file)
55+
"asd")))))
5656
(setf files (sort files
5757
#'string<
5858
:key #'namestring))

quicklisp/network.lisp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
closes the connection afterwareds via CLOSE-CONNECTION in an
131131
unwind-protect. See also WITH-CONNECTION.")
132132
(:implementation t
133-
(let (connection)
133+
(let ((connection nil))
134134
(unwind-protect
135135
(progn
136136
(setf connection (open-connection host port))

quicklisp/setup.lisp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
(unless system
1919
(error "Unknown system ~S" name))
2020
(ensure-installed system)
21-
(mapcar #'recurse (required-systems system))
21+
(mapc #'recurse (required-systems system))
2222
name)))
2323
(with-consistent-dists
2424
(recurse name))))

0 commit comments

Comments
 (0)