Commit c87523bd authored by Paul Eggert's avatar Paul Eggert

text-quoting-style in emacs-lisp diagnostics

* lisp/emacs-lisp/advice.el (ad-read-advised-function)
(ad-read-advice-class, ad-read-advice-name, ad-enable-advice)
(ad-disable-advice, ad-remove-advice, ad-set-argument)
(ad-set-arguments):
* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand)
(byte-compile-unfold-lambda, byte-optimize-form-code-walker)
(byte-optimize-while, byte-optimize-apply):
* lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode)
(byte-compile-log-file, byte-compile-format-warn)
(byte-compile-nogroup-warn, byte-compile-arglist-warn)
(byte-compile-cl-warn)
(byte-compile-warn-about-unresolved-functions)
(byte-compile-file, byte-compile-fix-header)
(byte-compile--declare-var, byte-compile-file-form-defmumble)
(byte-compile-form, byte-compile-normal-call)
(byte-compile-variable-ref, byte-compile-variable-set)
(byte-compile-subr-wrong-args, byte-compile-setq-default)
(byte-compile-negation-optimizer)
(byte-compile-condition-case--old)
(byte-compile-condition-case--new, byte-compile-save-excursion)
(byte-compile-defvar, byte-compile-autoload)
(byte-compile-lambda-form)
(byte-compile-make-variable-buffer-local, display-call-tree)
(batch-byte-compile):
* lisp/emacs-lisp/cconv.el (cconv-convert, cconv--analyze-use)
(cconv-analyze-form):
* lisp/emacs-lisp/chart.el (chart-space-usage):
* lisp/emacs-lisp/check-declare.el (check-declare-scan)
(check-declare-warn, check-declare-file)
(check-declare-directory):
* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine)
(checkdoc-message-text-engine):
* lisp/emacs-lisp/cl-extra.el (cl-parse-integer):
* lisp/emacs-lisp/cl-macs.el (cl--parse-loop-clause, cl-tagbody)
(cl-symbol-macrolet):
* lisp/emacs-lisp/cl.el (cl-unload-function, flet):
* lisp/emacs-lisp/copyright.el (copyright)
(copyright-update-directory):
* lisp/emacs-lisp/edebug.el (edebug-read-list):
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-read):
* lisp/emacs-lisp/eieio-core.el (eieio--slot-override)
(eieio-oref, eieio-oset-default):
* lisp/emacs-lisp/eieio-speedbar.el:
(eieio-speedbar-child-make-tag-lines)
(eieio-speedbar-child-description):
* lisp/emacs-lisp/eieio.el (defclass, change-class):
* lisp/emacs-lisp/elint.el (elint-file, elint-get-top-forms)
(elint-init-form, elint-check-defalias-form)
(elint-check-let-form):
* lisp/emacs-lisp/ert.el (ert-get-test):
* lisp/emacs-lisp/find-func.el (find-function-search-for-symbol)
(find-function-library):
* lisp/emacs-lisp/generator.el (iter-yield):
* lisp/emacs-lisp/gv.el (gv-define-simple-setter):
* lisp/emacs-lisp/lisp-mnt.el (lm-verify):
* lisp/emacs-lisp/package-x.el (package-upload-file):
* lisp/emacs-lisp/package.el (package-version-join)
(package-disabled-p, package-activate-1, package-activate)
(package--download-one-archive)
(package--download-and-read-archives)
(package-compute-transaction, package-install-from-archive)
(package-install, package-install-selected-packages)
(package-delete, package-autoremove)
(package-install-button-action, package-delete-button-action)
(package-menu-hide-package, package-menu--list-to-prompt)
(package-menu--perform-transaction)
(package-menu--find-and-notify-upgrades):
* lisp/emacs-lisp/pcase.el (pcase-exhaustive, pcase--u1):
* lisp/emacs-lisp/re-builder.el (reb-enter-subexp-mode):
* lisp/emacs-lisp/ring.el (ring-next, ring-previous):
* lisp/emacs-lisp/rx.el (rx-check, rx-anything):
* lisp/emacs-lisp/smie.el (smie-config-save):
* lisp/emacs-lisp/subr-x.el (internal--check-binding):
* lisp/emacs-lisp/testcover.el (testcover-1value):
Use curved quotes in diagnostic format strings.
parent 66081ad6
......@@ -168,7 +168,7 @@
;; "Switch to non-existing buffers only upon confirmation."
;; (interactive "BSwitch to buffer: ")
;; (if (or (get-buffer (ad-get-arg 0))
;; (y-or-n-p (format "`%s' does not exist, create? " (ad-get-arg 0))))
;; (y-or-n-p (format "‘%s’ does not exist, create? " (ad-get-arg 0))))
;; ad-do-it))
;;
;;(defadvice find-file (before existing-files-only activate)
......@@ -1870,7 +1870,7 @@ function at point for which PREDICATE returns non-nil)."
(if (equal function "")
(if (ad-is-advised default)
default
(error "ad-read-advised-function: `%s' is not advised" default))
(error "ad-read-advised-function: ‘%s’ is not advised" default))
(intern function))))
(defvar ad-advice-class-completion-table
......@@ -1887,7 +1887,7 @@ class of FUNCTION)."
(cl-dolist (class ad-advice-classes)
(if (ad-get-advice-info-field function class)
(cl-return class)))
(error "ad-read-advice-class: `%s' has no advices" function)))
(error "ad-read-advice-class: ‘%s’ has no advices" function)))
(let ((class (completing-read
(format "%s (default %s): " (or prompt "Class") default)
ad-advice-class-completion-table nil t)))
......@@ -1904,7 +1904,7 @@ An optional PROMPT is used to prompt for the name."
(ad-get-advice-info-field function class)))
(default
(if (null name-completion-table)
(error "ad-read-advice-name: `%s' has no %s advice"
(error "ad-read-advice-name: ‘%s’ has no %s advice"
function class)
(car (car name-completion-table))))
(prompt (format "%s (default %s): " (or prompt "Name") default))
......@@ -1995,9 +1995,9 @@ FUNCTION was not advised)."
(interactive (ad-read-advice-specification "Enable advice of"))
(if (ad-is-advised function)
(if (eq (ad-enable-advice-internal function class name t) 0)
(error "ad-enable-advice: `%s' has no %s advice matching `%s'"
(error "ad-enable-advice: ‘%s’ has no %s advice matching ‘%s’"
function class name))
(error "ad-enable-advice: `%s' is not advised" function)))
(error "ad-enable-advice: ‘%s’ is not advised" function)))
;;;###autoload
(defun ad-disable-advice (function class name)
......@@ -2005,9 +2005,9 @@ FUNCTION was not advised)."
(interactive (ad-read-advice-specification "Disable advice of"))
(if (ad-is-advised function)
(if (eq (ad-enable-advice-internal function class name nil) 0)
(error "ad-disable-advice: `%s' has no %s advice matching `%s'"
(error "ad-disable-advice: ‘%s’ has no %s advice matching ‘%s’"
function class name))
(error "ad-disable-advice: `%s' is not advised" function)))
(error "ad-disable-advice: ‘%s’ is not advised" function)))
(defun ad-enable-regexp-internal (regexp class flag)
"Set enable FLAGs of all CLASS advices whose name contains a REGEXP match.
......@@ -2053,9 +2053,9 @@ in that CLASS."
(ad-set-advice-info-field
function class
(delq advice-to-remove (ad-get-advice-info-field function class)))
(error "ad-remove-advice: `%s' has no %s advice `%s'"
(error "ad-remove-advice: ‘%s’ has no %s advice ‘%s’"
function class name)))
(error "ad-remove-advice: `%s' is not advised" function)))
(error "ad-remove-advice: ‘%s’ is not advised" function)))
;;;###autoload
(defun ad-add-advice (function advice class position)
......@@ -2319,7 +2319,7 @@ INDEX counts from zero."
,value-form))
(argument-access
`(setq ,argument-access ,value-form))
(t (error "ad-set-argument: No argument at position %d of `%s'"
(t (error "ad-set-argument: No argument at position %d of ‘%s’"
index arglist)))))
(defun ad-get-arguments (arglist index)
......@@ -2361,7 +2361,7 @@ The assignment starts at position INDEX."
(setq index (1+ index))
(setq values-index (1+ values-index)))
(if (null set-forms)
(error "ad-set-arguments: No argument at position %d of `%s'"
(error "ad-set-arguments: No argument at position %d of ‘%s’"
index arglist)
(if (= (length set-forms) 1)
;; For exactly one set-form we can use values-form directly,...
......@@ -2911,14 +2911,14 @@ the value of `ad-redefinition-action' and de/activate again."
(if (not (eq current-definition original-definition))
;; We have a redefinition:
(if (not (memq ad-redefinition-action '(accept discard warn)))
(error "ad-redefinition-action: `%s' %s"
(error "ad-redefinition-action: ‘%s’ %s"
function "invalidly redefined")
(if (eq ad-redefinition-action 'discard)
nil ;; Just drop it!
(funcall (or fsetfun #'fset) function newdef)
(ad-activate-internal function)
(if (eq ad-redefinition-action 'warn)
(message "ad-handle-definition: `%s' got redefined"
(message "ad-handle-definition: ‘%s’ got redefined"
function))))
;; either advised def or correct original is in place:
nil)
......@@ -2953,7 +2953,7 @@ definition will always be cached for later usage."
current-prefix-arg))
(cond
((not (ad-is-advised function))
(error "ad-activate: `%s' is not advised" function))
(error "ad-activate: ‘%s’ is not advised" function))
;; Just return for forward advised and not yet defined functions:
((not (ad-get-orig-definition function)) nil)
((not (ad-has-any-advice function)) (ad-unadvise function))
......@@ -2977,10 +2977,10 @@ a call to `ad-activate'."
(interactive
(list (ad-read-advised-function "Deactivate advice of" 'ad-is-active)))
(if (not (ad-is-advised function))
(error "ad-deactivate: `%s' is not advised" function)
(error "ad-deactivate: ‘%s’ is not advised" function)
(cond ((ad-is-active function)
(if (not (ad-get-orig-definition function))
(error "ad-deactivate: `%s' has no original definition"
(error "ad-deactivate: ‘%s’ has no original definition"
function)
(ad-clear-advicefunname-definition function)
(ad-set-advice-info-field function 'active nil)
......
......@@ -255,11 +255,11 @@
(cdr (assq name byte-compile-function-environment)))))
(pcase fn
(`nil
(byte-compile-warn "attempt to inline `%s' before it was defined"
(byte-compile-warn "attempt to inline ‘%s’ before it was defined"
name)
form)
(`(autoload . ,_)
(error "File `%s' didn't define `%s'" (nth 1 fn) name))
(error "File ‘%s’ didn't define ‘%s’" (nth 1 fn) name))
((and (pred symbolp) (guard (not (eq fn t)))) ;A function alias.
(byte-compile-inline-expand (cons fn (cdr form))))
((pred byte-code-function-p)
......@@ -336,7 +336,7 @@
bindings)
values nil))
((and (not optionalp) (null values))
(byte-compile-warn "attempt to open-code `%s' with too few arguments" name)
(byte-compile-warn "attempt to open-code ‘%s’ with too few arguments" name)
(setq arglist nil values 'too-few))
(t
(setq bindings (cons (list (car arglist) (car values))
......@@ -347,7 +347,7 @@
(progn
(or (eq values 'too-few)
(byte-compile-warn
"attempt to open-code `%s' with too many arguments" name))
"attempt to open-code ‘%s’ with too many arguments" name))
form)
;; The following leads to infinite recursion when loading a
......@@ -383,7 +383,7 @@
form))
((eq fn 'quote)
(if (cdr (cdr form))
(byte-compile-warn "malformed quote form: `%s'"
(byte-compile-warn "malformed quote form: ‘%s’"
(prin1-to-string form)))
;; map (quote nil) to nil to simplify optimizer logic.
;; map quoted constants to nil if for-effect (just because).
......@@ -407,7 +407,7 @@
(if (symbolp binding)
binding
(if (cdr (cdr binding))
(byte-compile-warn "malformed let binding: `%s'"
(byte-compile-warn "malformed let binding: ‘%s’"
(prin1-to-string binding)))
(list (car binding)
(byte-optimize-form (nth 1 binding) nil))))
......@@ -420,7 +420,7 @@
(cons
(byte-optimize-form (car clause) nil)
(byte-optimize-body (cdr clause) for-effect))
(byte-compile-warn "malformed cond form: `%s'"
(byte-compile-warn "malformed cond form: ‘%s’"
(prin1-to-string clause))
clause))
(cdr form))))
......@@ -457,7 +457,7 @@
((eq fn 'if)
(when (< (length form) 3)
(byte-compile-warn "too few arguments for `if'"))
(byte-compile-warn "too few arguments for ‘if’"))
(cons fn
(cons (byte-optimize-form (nth 1 form) nil)
(cons
......@@ -485,7 +485,7 @@
(cons fn (mapcar 'byte-optimize-form (cdr form)))))
((eq fn 'interactive)
(byte-compile-warn "misplaced interactive spec: `%s'"
(byte-compile-warn "misplaced interactive spec: ‘%s’"
(prin1-to-string form))
nil)
......@@ -539,7 +539,7 @@
(cons fn (mapcar #'byte-optimize-form (cdr form))))
((not (symbolp fn))
(byte-compile-warn "`%s' is a malformed function"
(byte-compile-warn "‘%s’ is a malformed function"
(prin1-to-string fn))
form)
......@@ -1054,7 +1054,7 @@
(defun byte-optimize-while (form)
(when (< (length form) 2)
(byte-compile-warn "too few arguments for `while'"))
(byte-compile-warn "too few arguments for ‘while’"))
(if (nth 1 form)
form))
......@@ -1090,7 +1090,7 @@
(nconc (list 'funcall fn) butlast
(mapcar (lambda (x) (list 'quote x)) (nth 1 last))))
(byte-compile-warn
"last arg to apply can't be a literal atom: `%s'"
"last arg to apply can't be a literal atom: ‘%s’"
(prin1-to-string last))
nil))
form)))
......
......@@ -814,7 +814,7 @@ CONST2 may be evaluated multiple times."
off (cdr lap-entry))
(cond
((not (symbolp op))
(error "Non-symbolic opcode `%s'" op))
(error "Non-symbolic opcode ‘%s’" op))
((eq op 'TAG)
(setcar off pc))
(t
......@@ -1120,7 +1120,7 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'."
pt)
(when dir
(unless was-same
(insert (format "Leaving directory `%s'\n" default-directory))))
(insert (format "Leaving directory ‘%s’\n" default-directory))))
(unless (bolp)
(insert "\n"))
(setq pt (point-marker))
......@@ -1135,7 +1135,7 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'."
(when dir
(setq default-directory dir)
(unless was-same
(insert (format "Entering directory `%s'\n"
(insert (format "Entering directory ‘%s’\n"
default-directory))))
(setq byte-compile-last-logged-file byte-compile-current-file
byte-compile-last-warned-form nil)
......@@ -1338,7 +1338,7 @@ extra args."
(nargs (- (length form) 2)))
(unless (= nargs nfields)
(byte-compile-warn
"`%s' called with %d args to fill %d format field(s)" (car form)
"‘%s’ called with %d args to fill %d format field(s)" (car form)
nargs nfields)))))
(dolist (elt '(format message error))
......@@ -1358,7 +1358,7 @@ extra args."
(plist-get keyword-args :group)
(not (and (consp name) (eq (car name) 'quote)))
(byte-compile-warn
"%s for `%s' fails to specify containing group"
"%s for ‘%s’ fails to specify containing group"
(cdr (assq (car form)
'((custom-declare-group . defgroup)
(custom-declare-face . defface)
......@@ -1377,7 +1377,7 @@ extra args."
(let ((calls (assq name byte-compile-unresolved-functions))
nums sig min max)
(when (and calls macrop)
(byte-compile-warn "macro `%s' defined too late" name))
(byte-compile-warn "macro ‘%s’ defined too late" name))
(setq byte-compile-unresolved-functions
(delq calls byte-compile-unresolved-functions))
(setq calls (delq t calls)) ;Ignore higher-order uses of the function.
......@@ -1385,7 +1385,7 @@ extra args."
(when (and (symbolp name)
(eq (function-get name 'byte-optimizer)
'byte-compile-inline-expand))
(byte-compile-warn "defsubst `%s' was used before it was defined"
(byte-compile-warn "defsubst ‘%s’ was used before it was defined"
name))
(setq sig (byte-compile-arglist-signature arglist)
nums (sort (copy-sequence (cdr calls)) (function <))
......@@ -1464,7 +1464,7 @@ extra args."
;; so don't warn about them.
macroexpand
cl--compiling-file))))
(byte-compile-warn "function `%s' from cl package called at runtime"
(byte-compile-warn "function ‘%s’ from cl package called at runtime"
func)))
form)
......@@ -1506,12 +1506,12 @@ extra args."
(if (fboundp f) (push f noruntime) (push f unresolved)))
;; Complain about the no-run-time functions
(byte-compile-print-syms
"the function `%s' might not be defined at runtime."
"the function ‘%s’ might not be defined at runtime."
"the following functions might not be defined at runtime:"
noruntime)
;; Complain about the unresolved functions
(byte-compile-print-syms
"the function `%s' is not known to be defined."
"the function ‘%s’ is not known to be defined."
"the following functions are not known to be defined:"
unresolved)))
nil)
......@@ -1813,11 +1813,11 @@ The value is non-nil if there were no errors, nil if errors."
;; compile this file.
(if (with-current-buffer input-buffer no-byte-compile)
(progn
;; (message "%s not compiled because of `no-byte-compile: %s'"
;; (message "%s not compiled because of ‘no-byte-compile: %s’"
;; (byte-compile-abbreviate-file filename)
;; (with-current-buffer input-buffer no-byte-compile))
(when (file-exists-p target-file)
(message "%s deleted because of `no-byte-compile: %s'"
(message "%s deleted because of ‘no-byte-compile: %s’"
(byte-compile-abbreviate-file target-file)
(buffer-local-value 'no-byte-compile input-buffer))
(condition-case nil (delete-file target-file) (error nil)))
......@@ -2014,7 +2014,7 @@ and will be removed soon. See (elisp)Backquote in the manual."))
(format " (string-lessp emacs-version \"%s\")\n" minimum-version)
;; Because the header must fit in a fixed width, we cannot
;; insert arbitrary-length file names (Bug#11585).
" (error \"`%s' was compiled for "
" (error \"'%s' was compiled for "
(format "Emacs %s or later\" #$))\n\n" minimum-version))
;; Now compensate for any change in size, to make sure all
;; positions in the file remain valid.
......@@ -2300,12 +2300,12 @@ list that represents a doc string reference.
(when (and (symbolp sym)
(not (string-match "[-*/:$]" (symbol-name sym)))
(byte-compile-warning-enabled-p 'lexical))
(byte-compile-warn "global/dynamic var `%s' lacks a prefix"
(byte-compile-warn "global/dynamic var ‘%s’ lacks a prefix"
sym))
(when (memq sym byte-compile-lexical-variables)
(setq byte-compile-lexical-variables
(delq sym byte-compile-lexical-variables))
(byte-compile-warn "Variable `%S' declared after its first use" sym))
(byte-compile-warn "Variable ‘%S’ declared after its first use" sym))
(push sym byte-compile-bound-variables))
(defun byte-compile-file-form-defvar (form)
......@@ -2422,7 +2422,7 @@ not to take responsibility for the actual compilation of the code."
;; Don't warn when compiling the stubs in byte-run...
(not (assq name byte-compile-initial-macro-environment)))
(byte-compile-warn
"`%s' defined multiple times, as both function and macro"
"‘%s’ defined multiple times, as both function and macro"
name))
(setcdr that-one nil))
(this-one
......@@ -2430,13 +2430,13 @@ not to take responsibility for the actual compilation of the code."
;; Hack: Don't warn when compiling the magic internal
;; byte-compiler macros in byte-run.el...
(not (assq name byte-compile-initial-macro-environment)))
(byte-compile-warn "%s `%s' defined multiple times in this file"
(byte-compile-warn "%s ‘%s’ defined multiple times in this file"
(if macro "macro" "function")
name)))
((eq (car-safe (symbol-function name))
(if macro 'lambda 'macro))
(when (byte-compile-warning-enabled-p 'redefine)
(byte-compile-warn "%s `%s' being redefined as a %s"
(byte-compile-warn "%s ‘%s’ being redefined as a %s"
(if macro "function" "macro")
name
(if macro "macro" "function")))
......@@ -2453,7 +2453,7 @@ not to take responsibility for the actual compilation of the code."
(stringp (car-safe (cdr-safe (cdr-safe body)))))
;; FIXME: We've done that already just above, so this looks wrong!
;;(byte-compile-set-symbol-position name)
(byte-compile-warn "probable `\"' without `\\' in doc string of %s"
(byte-compile-warn "probable ‘\"’ without ‘\\’ in doc string of %s"
name))
(if (not (listp body))
......@@ -2979,19 +2979,19 @@ for symbols generated by the byte compiler itself."
(`(',var . ,_)
(when (assq var byte-compile-lexical-variables)
(byte-compile-log-warning
(format "%s cannot use lexical var `%s'" fn var)
(format "%s cannot use lexical var ‘%s’" fn var)
nil :error)))))
(when (macroexp--const-symbol-p fn)
(byte-compile-warn "`%s' called as a function" fn))
(byte-compile-warn "‘%s’ called as a function" fn))
(when (and (byte-compile-warning-enabled-p 'interactive-only)
interactive-only)
(byte-compile-warn "`%s' is for interactive use only%s"
(byte-compile-warn "‘%s’ is for interactive use only%s"
fn
(cond ((stringp interactive-only)
(format "; %s" interactive-only))
((and (symbolp 'interactive-only)
(not (eq interactive-only t)))
(format "; use `%s' instead."
(format "; use ‘%s’ instead."
interactive-only))
(t "."))))
(if (eq (car-safe (symbol-function (car form))) 'macro)
......@@ -3036,7 +3036,7 @@ for symbols generated by the byte compiler itself."
(byte-compile-warning-enabled-p 'mapcar))
(byte-compile-set-symbol-position 'mapcar)
(byte-compile-warn
"`mapcar' called for effect; use `mapc' or `dolist' instead"))
"‘mapcar’ called for effect; use ‘mapc’ or ‘dolist’ instead"))
(byte-compile-push-constant (car form))
(mapc 'byte-compile-form (cdr form)) ; wasteful, but faster.
(byte-compile-out 'byte-call (length (cdr form))))
......@@ -3124,8 +3124,8 @@ for symbols generated by the byte compiler itself."
(cond ((or (not (symbolp var)) (macroexp--const-symbol-p var))
(when (byte-compile-warning-enabled-p 'constants)
(byte-compile-warn (if (eq access-type 'let-bind)
"attempt to let-bind %s `%s`"
"variable reference to %s `%s'")
"attempt to let-bind %s ‘%s’"
"variable reference to %s ‘%s’")
(if (symbolp var) "constant" "nonvariable")
(prin1-to-string var))))
((let ((od (get var 'byte-obsolete-variable)))
......@@ -3163,7 +3163,7 @@ for symbols generated by the byte compiler itself."
(boundp var)
(memq var byte-compile-bound-variables)
(memq var byte-compile-free-references))
(byte-compile-warn "reference to free variable `%S'" var)
(byte-compile-warn "reference to free variable ‘%S’" var)
(push var byte-compile-free-references))
(byte-compile-dynamic-variable-op 'byte-varref var))))
......@@ -3179,7 +3179,7 @@ for symbols generated by the byte compiler itself."
(boundp var)
(memq var byte-compile-bound-variables)
(memq var byte-compile-free-assignments))
(byte-compile-warn "assignment to free variable `%s'" var)
(byte-compile-warn "assignment to free variable ‘%s’" var)
(push var byte-compile-free-assignments))
(byte-compile-dynamic-variable-op 'byte-varset var))))
......@@ -3360,7 +3360,7 @@ If it is nil, then the handler is \"byte-compile-SYMBOL.\""
(defun byte-compile-subr-wrong-args (form n)
(byte-compile-set-symbol-position (car form))
(byte-compile-warn "`%s' called with %d arg%s, but requires %s"
(byte-compile-warn "‘%s’ called with %d arg%s, but requires %s"
(car form) (length (cdr form))
(if (= 1 (length (cdr form))) "" "s") n)
;; Get run-time wrong-number-of-args error.
......@@ -3728,7 +3728,7 @@ discarding."
(macroexp--const-symbol-p var t))
(byte-compile-warning-enabled-p 'constants)
(byte-compile-warn
"variable assignment to %s `%s'"
"variable assignment to %s ‘%s’"
(if (symbolp var) "constant" "nonvariable")
(prin1-to-string var)))
(byte-compile-normal-call `(set-default ',var ,@(cdr form)))))))
......@@ -4102,7 +4102,7 @@ binding slots have been popped."
(list 'not
(cons (or (get (car form) 'byte-compile-negated-op)
(error
"Compiler error: `%s' has no `byte-compile-negated-op' property"
"Compiler error: ‘%s’ has no ‘byte-compile-negated-op’ property"
(car form)))
(cdr form))))
......@@ -4165,7 +4165,7 @@ binding slots have been popped."
(byte-compile-set-symbol-position 'condition-case)
(unless (symbolp var)
(byte-compile-warn
"`%s' is not a variable-name or nil (in condition-case)" var))
"‘%s’ is not a variable-name or nil (in condition-case)" var))
(if fun-bodies (setq var (make-symbol "err")))
(byte-compile-push-constant var)
(if fun-bodies
......@@ -4184,14 +4184,14 @@ binding slots have been popped."
(setq ok nil)))
ok))))
(byte-compile-warn
"`%S' is not a condition name or list of such (in condition-case)"
"‘%S’ is not a condition name or list of such (in condition-case)"
condition))
;; (not (or (eq condition 't)
;; (and (stringp (get condition 'error-message))
;; (consp (get condition
;; 'error-conditions)))))
;; (byte-compile-warn
;; "`%s' is not a known condition name
;; "‘%s’ is not a known condition name
;; (in condition-case)"
;; condition))
)
......@@ -4217,7 +4217,7 @@ binding slots have been popped."
(byte-compile-set-symbol-position 'condition-case)
(unless (symbolp var)
(byte-compile-warn
"`%s' is not a variable-name or nil (in condition-case)" var))
"‘%s’ is not a variable-name or nil (in condition-case)" var))
(dolist (clause (reverse clauses))
(let ((condition (nth 1 clause)))
......@@ -4225,12 +4225,12 @@ binding slots have been popped."
(dolist (c condition)
(unless (and c (symbolp c))
(byte-compile-warn
"`%S' is not a condition name (in condition-case)" c))
"‘%S’ is not a condition name (in condition-case)" c))
;; In reality, the `error-conditions' property is only required
;; for the argument to `signal', not to `condition-case'.
;;(unless (consp (get c 'error-conditions))
;; (byte-compile-warn
;; "`%s' is not a known condition name (in condition-case)"
;; "‘%s’ is not a known condition name (in condition-case)"
;; c))
)
(byte-compile-push-constant condition))
......@@ -4267,7 +4267,7 @@ binding slots have been popped."
(if (and (eq 'set-buffer (car-safe (car-safe (cdr form))))
(byte-compile-warning-enabled-p 'suspicious))
(byte-compile-warn
"Use `with-current-buffer' rather than save-excursion+set-buffer"))
"Use ‘with-current-buffer’ rather than save-excursion+set-buffer"))
(byte-compile-out 'byte-save-excursion 0)
(byte-compile-body-do-effect (cdr form))
(byte-compile-out 'byte-unbind 1))
......@@ -4307,7 +4307,7 @@ binding slots have been popped."
(when (and (symbolp (nth 1 form))
(not (string-match "[-*/:$]" (symbol-name (nth 1 form))))
(byte-compile-warning-enabled-p 'lexical))
(byte-compile-warn "global/dynamic var `%s' lacks a prefix"
(byte-compile-warn "global/dynamic var ‘%s’ lacks a prefix"
(nth 1 form)))
(let ((fun (nth 0 form))
(var (nth 1 form))
......@@ -4318,7 +4318,7 @@ binding slots have been popped."
(and (eq fun 'defconst) (null (cddr form))))
(let ((ncall (length (cdr form))))
(byte-compile-warn
"`%s' called with %d argument%s, but %s %s"
"‘%s’ called with %d argument%s, but %s %s"
fun ncall
(if (= 1 ncall) "" "s")
(if (< ncall 2) "requires" "accepts only")
......@@ -4327,7 +4327,7 @@ binding slots have been popped."
(if (eq fun 'defconst)
(push var byte-compile-const-variables))
(when (and string (not (stringp string)))
(byte-compile-warn "third arg to `%s %s' is not a string: %s"
(byte-compile-warn "third arg to ‘%s %s’ is not a string: %s"
fun var string))
(byte-compile-form-do-effect
(if (cddr form) ; `value' provided
......@@ -4350,7 +4350,7 @@ binding slots have been popped."
(not (fboundp (eval (nth 1 form))))
(byte-compile-warn
"The compiler ignores `autoload' except at top level. You should
probably put the autoload of the macro `%s' at top-level."
probably put the autoload of the macro ‘%s’ at top-level."
(eval (nth 1 form))))
(byte-compile-normal-call form))
......@@ -4358,7 +4358,7 @@ binding slots have been popped."
;; The ones that remain are errors.
(defun byte-compile-lambda-form (_form)
(byte-compile-set-symbol-position 'lambda)
(error "`lambda' used as function name is invalid"))
(error "‘lambda’ used as function name is invalid"))
;; Compile normally, but deal with warnings for the function being defined.
(put 'defalias 'byte-hunk-handler 'byte-compile-file-form-defalias)
......@@ -4430,7 +4430,7 @@ binding slots have been popped."
(if (and (eq (car-safe (car-safe (cdr-safe form))) 'quote)
(byte-compile-warning-enabled-p 'make-local))
(byte-compile-warn
"`make-variable-buffer-local' not called at toplevel"))
"‘make-variable-buffer-local’ not called at toplevel"))
(byte-compile-normal-call form))
(put 'make-variable-buffer-local
'byte-hunk-handler 'byte-compile-form-make-variable-buffer-local)
......@@ -4562,7 +4562,7 @@ invoked interactively."
(length (nth 2 y))))))
(`name
(lambda (x y) (string< (car x) (car y))))
(_ (error "`byte-compile-call-tree-sort': `%s' - unknown sort mode"
(_ (error "‘byte-compile-call-tree-sort’: ‘%s’ - unknown sort mode"
byte-compile-call-tree-sort))))))
(message "Generating call tree...")
(let ((rest byte-compile-call-tree)
......@@ -4675,7 +4675,7 @@ already up-to-date."
;; startup.el.
(defvar command-line-args-left) ;Avoid 'free variable' warning
(if (not noninteractive)
(error "`batch-byte-compile' is to be used only with -batch"))
(error "‘batch-byte-compile’ is to be used only with -batch"))
(let ((error nil))
(while command-line-args-left
(if (file-directory-p (expand-file-name (car command-line-args-left)))
......
......@@ -300,7 +300,7 @@ places where they originally did not directly appear."
(prog1 binder (setq binder (list binder)))
(when (cddr binder)
(byte-compile-log-warning
(format "Malformed `%S' binding: %S" letsym binder)))
(format "Malformed ‘%S’ binding: %S" letsym binder)))
(setq value (cadr binder))
(car binder)))
(new-val
......@@ -545,7 +545,7 @@ FORM is the parent form that binds this var."
(`((,(and var (guard (eq ?_ (aref (symbol-name var) 0)))) . ,_)
,_ ,_ ,_ ,_)
(byte-compile-log-warning
(format "%s `%S' not left unused" varkind var))))
(format "%s ‘%S’ not left unused" varkind var))))
(pcase vardata
(`((,var . ,_) nil ,_ ,_ nil)
;; FIXME: This gives warnings in the wrong order, with imprecise line
......@@ -557,7 +557,7 @@ FORM is the parent form that binds this var."
(eq ?_ (aref (symbol-name var) 0))
;; As a special exception, ignore "ignore".
(eq var 'ignored))
(byte-compile-log-warning (format "Unused lexical %s `%S'"
(byte-compile-log-warning (format "Unused lexical %s ‘%S’"
varkind var))))
;; If it's unused, there's no point converting it into a cons-cell, even if
;; it's captured and mutated.
......@@ -678,7 +678,7 @@ and updates the data stored in ENV."
;; ((and `(quote ,v . ,_) (guard (assq v env)))
;; (byte-compile-log-warning
;; (format "Possible confusion variable/symbol for `%S'" v)))
;; (format "Possible confusion variable/symbol for ‘%S’" v)))
(`(quote . ,_) nil) ; quote form
(`(function . ,_) nil) ; same as quote
......
......@@ -652,7 +652,7 @@ SORT-PRED if desired."
(set-buffer b)
(erase-buffer)
(insert "cd " d ";du -sk * \n")
(message "Running `cd %s;du -sk *'..." d)
(message "Running ‘cd %s;du -sk *’..." d)
(call-process-region (point-min) (point-max) shell-file-name t
(current-buffer) nil)
(goto-char (point-min))
......
......@@ -106,7 +106,7 @@ don't know how to recognize (e.g. some macros)."
(symbolp (setq fileonly (nth 4 form))))