From 7702b7bc88a97c15f955f62e8afbc40521ceec7b Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sat, 27 Jul 2019 00:50:49 +0100 Subject: [PATCH] src/: Improve formatting of big lambda-lists. --- src/c-types-parse.lisp | 6 ++---- src/optparse.lisp | 7 ++----- src/parser/floc-proto.lisp | 10 +++++----- src/parser/scanner-charbuf-impl.lisp | 5 +++-- src/parser/scanner-impl.lisp | 3 ++- src/pset-proto.lisp | 6 +++--- 6 files changed, 17 insertions(+), 20 deletions(-) diff --git a/src/c-types-parse.lisp b/src/c-types-parse.lisp index 3a5a536..9c33672 100644 --- a/src/c-types-parse.lisp +++ b/src/c-types-parse.lisp @@ -102,10 +102,8 @@ (if (consp spec) spec (list spec))) (dolist (spec (cdr item)) (destructuring-bind (label - &key - (name (string-downcase label)) - compat - (taggedp taggedp)) + &key (name (string-downcase label)) + compat (taggedp taggedp)) (if (consp spec) spec (list spec)) (let ((ds (make-instance 'declspec :label label diff --git a/src/optparse.lisp b/src/optparse.lisp index 367fc50..7e444e0 100644 --- a/src/optparse.lisp +++ b/src/optparse.lisp @@ -896,11 +896,8 @@ ;;; Support stuff for help and usage messages. (defun print-text (string - &optional - (stream *standard-output*) - &key - (start 0) - (end nil)) + &optional (stream *standard-output*) + &key (start 0) (end nil)) "Prints STRING to a pretty-printed STREAM, breaking it at whitespace and newlines in the obvious way. Stuff between square brackets is not broken: this makes usage messages work better." diff --git a/src/parser/floc-proto.lisp b/src/parser/floc-proto.lisp index c4d0804..9acbfae 100644 --- a/src/parser/floc-proto.lisp +++ b/src/parser/floc-proto.lisp @@ -32,11 +32,11 @@ file-location-filename file-location-line file-location-column)) (defstruct (file-location (:constructor make-file-location - (%filename &optional line column - &aux (filename - (etypecase %filename - ((or string null) %filename) - (pathname (namestring %filename))))))) + (%filename + &optional line column + &aux (filename (etypecase %filename + ((or string null) %filename) + (pathname (namestring %filename))))))) "A simple structure containing file location information. Construct using `make-file-location'; the main useful function is diff --git a/src/parser/scanner-charbuf-impl.lisp b/src/parser/scanner-charbuf-impl.lisp index 773a9a1..92ba83c 100644 --- a/src/parser/scanner-charbuf-impl.lisp +++ b/src/parser/scanner-charbuf-impl.lisp @@ -354,8 +354,9 @@ (defstruct (charbuf-slice (:constructor make-charbuf-slice - (buf &optional (start 0) %end - &aux (end (or %end (length buf)))))) + (buf + &optional (start 0) %end + &aux (end (or %end (length buf)))))) (buf nil :type (or charbuf (eql :eof)) :read-only t) (start 0 :type (and fixnum unsigned-byte) :read-only t) (end 0 :type (and fixnum unsigned-byte) :read-only t)) diff --git a/src/parser/scanner-impl.lisp b/src/parser/scanner-impl.lisp index d856ba9..411cbc1 100644 --- a/src/parser/scanner-impl.lisp +++ b/src/parser/scanner-impl.lisp @@ -61,7 +61,8 @@ (export '(string-scanner make-string-scanner string-scanner-p)) (defstruct (string-scanner (:constructor make-string-scanner - (string &key (start 0) end filename + (string + &key (start 0) end filename &aux (%string string) (index start) (limit (or end (length string)))))) diff --git a/src/pset-proto.lisp b/src/pset-proto.lisp index 2620585..764350a 100644 --- a/src/pset-proto.lisp +++ b/src/pset-proto.lisp @@ -43,9 +43,9 @@ (:predicate propertyp) (:conc-name p-) (:constructor %make-property - (name value - &key type location seenp - &aux (key (property-key name)) (%type type)))) + (name value + &key type location seenp + &aux (key (property-key name)) (%type type)))) "A simple structure for holding a property in a property set. The main useful feature is the ability to tick off properties which have -- 2.11.0