(and tl
(progn
(bytecomp--cus-warn
- tl "misplaced %s keyword in `%s' type" (car tl) head)
+ tl "misplaced %S keyword in `%S' type" (car tl) head)
t))))))
((memq head '(choice radio))
(unless tail
- (bytecomp--cus-warn type "`%s' without any types inside" head))
+ (bytecomp--cus-warn type "`%S' without any types inside" head))
(let ((clauses tail)
(constants nil)
(tags nil))
(let* ((ty (car clauses))
(ty-head (car-safe ty)))
(when (and (eq ty-head 'other) (cdr clauses))
- (bytecomp--cus-warn ty "`other' not last in `%s'" head))
+ (bytecomp--cus-warn ty "`other' not last in `%S'" head))
(when (memq ty-head '(const other))
(let ((ty-tail (cdr ty))
(val nil))
(setq val (car ty-tail)))
(when (member val constants)
(bytecomp--cus-warn
- ty "duplicated value in `%s': `%S'" head val))
+ ty "duplicated value in `%S': `%S'" head val))
(push val constants)))
(let ((tag (and (consp ty) (plist-get (cdr ty) :tag))))
(when (stringp tag)
(when (member tag tags)
(bytecomp--cus-warn
- ty "duplicated :tag string in `%s': %S" head tag))
+ ty "duplicated :tag string in `%S': %S" head tag))
(push tag tags)))
(bytecomp--check-cus-type ty))
(setq clauses (cdr clauses)))))
(bytecomp--check-cus-type ty)))
((memq head '(list group vector set repeat))
(unless tail
- (bytecomp--cus-warn type "`%s' without type specs" head))
+ (bytecomp--cus-warn type "`%S' without type specs" head))
(dolist (ty tail)
(bytecomp--check-cus-type ty)))
((memq head '(alist plist))
(val (car tail)))
(cond
((or (> n 1) (and value-tag tail))
- (bytecomp--cus-warn type "`%s' with too many values" head))
+ (bytecomp--cus-warn type "`%S' with too many values" head))
(value-tag
(setq val (cadr value-tag)))
;; ;; This is a useful check but it results in perhaps
;; ;; a bit too many complaints.
;; ((null tail)
;; (bytecomp--cus-warn
- ;; type "`%s' without value is implicitly nil" head))
+ ;; type "`%S' without value is implicitly nil" head))
)
(when (memq (car-safe val) '(quote function))
- (bytecomp--cus-warn type "`%s' with quoted value: %S" head val))))
+ (bytecomp--cus-warn type "`%S' with quoted value: %S" head val))))
((eq head 'quote)
- (bytecomp--cus-warn type "type should not be quoted: %s" (cadr type)))
+ (bytecomp--cus-warn type "type should not be quoted: %S" (cadr type)))
((memq head invalid-types)
- (bytecomp--cus-warn type "`%s' is not a valid type" head))
+ (bytecomp--cus-warn type "`%S' is not a valid type" head))
((or (not (symbolp head)) (keywordp head))
(bytecomp--cus-warn type "irregular type `%S'" head))
)))
(bytecomp--cus-warn type "irregular type `%S'" type))
((memq type '( list cons group vector choice radio const other
function-item variable-item set repeat restricted-sexp))
- (bytecomp--cus-warn type "`%s' without arguments" type))
+ (bytecomp--cus-warn type "`%S' without arguments" type))
((memq type invalid-types)
- (bytecomp--cus-warn type "`%s' is not a valid type" type))
+ (bytecomp--cus-warn type "`%S' is not a valid type" type))
)))
(defun bytecomp--check-cus-face-spec (spec)
(let ((enable-local-variables (or (not find-file) enable-local-variables)))
;; FIXME this is less efficient than it could be, since both
;; s-a-m and h-l-v may parse the same regions, looking for "mode:".
- (with-demoted-errors "File mode specification error: %s"
+ (with-demoted-errors "File mode specification error: %S"
(set-auto-mode))
;; `delay-mode-hooks' being non-nil will have prevented the major
;; mode's call to `run-mode-hooks' from calling
;; `hack-local-variables'. In that case, call it now.
(when delay-mode-hooks
- (with-demoted-errors "File local-variables error: %s"
+ (with-demoted-errors "File local-variables error: %S"
(hack-local-variables 'no-mode))))
;; Turn font lock off and on, to make sure it takes account of
;; whatever file local variables are relevant to it.
alist name case-insensitive-p))
(when (and dir-local mode
(not (set-auto-mode--dir-local-valid-p mode)))
- (message "Ignoring invalid mode `%s'" mode)
+ (message "Ignoring invalid mode `%S'" mode)
(setq mode nil))
(when mode
(set-auto-mode-0 mode keep-mode-if-same)