diff options
author | Ludovic Courtès | 2020-08-02 10:06:05 +0200 |
---|---|---|
committer | Ludovic Courtès | 2020-08-02 10:08:13 +0200 |
commit | 18eee9ec031ccdbb4f7ea1b7fb540b372787fa12 (patch) | |
tree | cf9ee2d306f4a60cd494fb62101c22af6a1752a7 /src | |
parent | 60f1a4cfc168ef903e1eb0a4a81a302261431a31 (diff) | |
download | skribilo-18eee9ec031ccdbb4f7ea1b7fb540b372787fa12.tar.gz skribilo-18eee9ec031ccdbb4f7ea1b7fb540b372787fa12.tar.lz skribilo-18eee9ec031ccdbb4f7ea1b7fb540b372787fa12.zip |
Use '_' as the 'match' wildcard.
This addresses '-Wunused-variable' warnings.
* doc/modules/skribilo/documentation/api.scm (define-markup?)
(make-engine?, make-engine-custom)
(define-markup-formals, define-markup-options)
(define-markup-rest, exp->skribe): Use '_' instead of 'else' as the
'match' wildcard.
* src/guile/skribilo/package/slide/latex.scm (%slide-advi-setup!):
Likewise.
* src/guile/skribilo/source/lisp.scm (lisp-extractor)
(scheme-extractor, stklos-extractor, skribe-extractor)
(bigloo-extractor): Likewise.
* src/guile/skribilo/sui.scm (load-sui): Likewise.
(sui-title, sui-key, sui-find-ref, sui-filter): Likewise.
Diffstat (limited to 'src')
-rw-r--r-- | src/guile/skribilo/package/slide/latex.scm | 4 | ||||
-rw-r--r-- | src/guile/skribilo/source/lisp.scm | 11 | ||||
-rw-r--r-- | src/guile/skribilo/sui.scm | 20 |
3 files changed, 17 insertions, 18 deletions
diff --git a/src/guile/skribilo/package/slide/latex.scm b/src/guile/skribilo/package/slide/latex.scm index 3bbcd76..b1562e7 100644 --- a/src/guile/skribilo/package/slide/latex.scm +++ b/src/guile/skribilo/package/slide/latex.scm @@ -1,6 +1,6 @@ ;;; latex.scm -- LaTeX implementation of the `slide' package. ;;; -;;; Copyright 2007 Ludovic Courtès <ludo@chbouib.org> +;;; Copyright 2007, 2020 Ludovic Courtès <ludo@chbouib.org> ;;; Copyright 2003, 2004 Manuel Serrano ;;; ;;; @@ -279,7 +279,7 @@ (display (string-append "}]{" id "}")) (evaluate-document (slide-pause) e) (loop (cdr lbls) id)) - (else + (_ (display "\\adviplay[[rgb]{") (display c) (format #t "}]{~a}" lbl) diff --git a/src/guile/skribilo/source/lisp.scm b/src/guile/skribilo/source/lisp.scm index f949582..1a8b995 100644 --- a/src/guile/skribilo/source/lisp.scm +++ b/src/guile/skribilo/source/lisp.scm @@ -78,7 +78,7 @@ (and (eq? def fun) exp)) (('defvar var . _) (and (eq? var def) exp)) - (else #f))))) + (_ #f))))) (define (init-lisp-keys) (unless %lisp-keys @@ -120,7 +120,7 @@ (and (eq? def fun) exp)) (('define (? symbol? var) . _) (and (eq? var def) exp)) - (else #f))))) + (_ #f))))) (define (init-scheme-keys) @@ -165,8 +165,7 @@ (and (eq? def fun) exp)) (((or 'define 'define-module) (? symbol? var) . _) (and (eq? var def) exp)) - (else - #f))))) + (_ #f))))) (define (init-stklos-keys) @@ -221,7 +220,7 @@ (and (eq? var def) exp)) (('markup-output mk . _) (and (eq? mk def) exp)) - (else #f))))) + (_ #f))))) (define (init-skribe-keys) @@ -283,7 +282,7 @@ (((or 'define 'define-struct 'define-library) (? symbol? var) . _) (and (eq? var def) exp)) - (else #f))))) + (_ #f))))) (define bigloo (new language diff --git a/src/guile/skribilo/sui.scm b/src/guile/skribilo/sui.scm index eb7f8cb..790e2d4 100644 --- a/src/guile/skribilo/sui.scm +++ b/src/guile/skribilo/sui.scm @@ -1,7 +1,7 @@ ;;; sui.scm -- Skribe URL Indices ;;; ;;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2012, -;;; 2015, 2018 Ludovic Courtès <ludo@gnu.org> +;;; 2015, 2018, 2020 Ludovic Courtès <ludo@gnu.org> ;;; Copyright (C) 2003, 2004 Manuel Serrano ;;; ;;; @@ -120,11 +120,11 @@ (unwind-protect (let ((sexp (read p))) (match sexp - (('sui (? string?) . _) - (hash-set! *sui-table* path sexp)) - (else - (raise (condition (&invalid-sui-error - (sexp sexp)))))) + (('sui (? string?) . _) + (hash-set! *sui-table* path sexp)) + (_ + (raise (condition (&invalid-sui-error + (sexp sexp)))))) sexp) (close-input-port p))))))))) @@ -146,7 +146,7 @@ (match sexp (('sui (and title (? string?)) . _) title) - (else + (_ (raise (condition (&invalid-sui-error (sexp sexp))))))) @@ -168,7 +168,7 @@ (and (pair? (cdr rest)) (cadr rest)) (loop (cdr rest)))))) - (else + (_ (raise (condition (&invalid-sui-error (sexp sexp))))))) @@ -194,7 +194,7 @@ (subsubsection (sui-search-ref 'subsubsections refs (cadr subsubsection) class)) (ident (sui-search-all-refs refs (cadr ident) class)) (else '()))) - (else + (_ (raise (condition (&invalid-sui-error (sexp sui)))))))) @@ -266,7 +266,7 @@ (cons (filter pred2 (cdar refs)) res)) (loop (cdr refs) res)) (reverse! res)))) - (else + (_ (raise (condition (&invalid-sui-error (sexp sui))))))) |