;; "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)
(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
(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)))
(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))
(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)
(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.
(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)
,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)
(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,...
(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)
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))
(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)
(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)
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))
(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
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).
(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))))
(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))))
((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
(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)
(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)
(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))
(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)))
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
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))
(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)
(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))
(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)
(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.
(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 <))
;; 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)
(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)
;; 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)))
(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.
(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)
;; 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
;; 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")))
(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))
(`(',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)
(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))))
(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)))
(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))))
(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))))
\f
(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.
(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)))))))
(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))))
\f
(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
(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))
)
(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)))
(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))
(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))
(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))
(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")
(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
(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))
;; 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)
(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)
(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)
;; 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)))
(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
(`((,(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
(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.
;; ((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
(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))
(symbolp (setq fileonly (nth 4 form))))
(setq alist (cons (list fnfile fn arglist fileonly) alist))
;; FIXME make this more noticeable.
- (if form (message "Malformed declaration for `%s'" (cadr form))))))
+ (if form (message "Malformed declaration for ‘%s’" (cadr form))))))
(message "%sdone" m)
alist))
entry))
(warning-fill-prefix " "))
(display-warning 'check-declare
- (format "said `%s' was defined in %s: %s"
+ (format "said ‘%s’ was defined in %s: %s"
fn (file-name-nondirectory fnfile) type)
nil check-declare-warning-buffer)))
See `check-declare-directory' for more information."
(interactive "fFile to check: ")
(or (file-exists-p file)
- (error "File `%s' not found" file))
+ (error "File ‘%s’ not found" file))
(let ((m (format "Checking %s..." file))
errlist)
(message "%s" m)
Returns non-nil if any false statements are found."
(interactive "DDirectory to check: ")
(or (file-directory-p (setq root (expand-file-name root)))
- (error "Directory `%s' not found" root))
- (let ((m "Checking `declare-function' statements...")
+ (error "Directory ‘%s’ not found" root))
+ (let ((m "Checking ‘declare-function’ statements...")
(m2 "Finding files with declarations...")
errlist files)
(message "%s" m)
;; (concat "\\<" (regexp-quote (car fp)) "\\>")
;; newname))
;; (checkdoc-create-error
- ;; "Flag variable names should normally end in `-flag'" s
+ ;; "Flag variable names should normally end in ‘-flag’" s
;; (marker-position e)))))
;; Done with variables
))
(if (checkdoc-autofix-ask-replace
(match-beginning 1) (match-end 1)
(format
- "If this is the argument `%s', it should appear as %s. Fix? "
+ "If this is the argument ‘%s’, it should appear as %s. Fix? "
(car args) (upcase (car args)))
(upcase (car args)) t)
(setq found (match-beginning 1))))))
nil)
(checkdoc-create-error
(format
- "Argument `%s' should appear (as %s) in the doc string"
+ "Argument ‘%s’ should appear (as %s) in the doc string"
(car args) (upcase (car args)))
s (marker-position e)))
(if (or (and order (eq order 'yes))
(setq found (intern-soft ms))
(or (boundp found) (fboundp found)))
(progn
- (setq msg (format "Add quotes around Lisp symbol `%s'? "
+ (setq msg (format "Add quotes around Lisp symbol ‘%s’? "
ms))
(if (checkdoc-autofix-ask-replace
(match-beginning 1) (+ (match-beginning 1)
msg (concat "‘" ms "’") t)
(setq msg nil)
(setq msg
- (format "Lisp symbol `%s' should appear in quotes"
+ (format "Lisp symbol ‘%s’ should appear in quotes"
ms))))))
(if msg
(checkdoc-create-error msg (match-beginning 1)
(match-string 2) t)
nil
(checkdoc-create-error
- "Symbols t and nil should not appear in `...' quotes"
+ "Symbols t and nil should not appear in ‘...’ quotes"
(match-beginning 1) (match-end 1)))))
;; Here is some basic sentence formatting
(checkdoc-sentencespace-region-engine (point) e)
;; If we see a ?, then replace with "? ".
(if (checkdoc-autofix-ask-replace
(match-beginning 0) (match-end 0)
- "`y-or-n-p' argument should end with \"? \". Fix? "
+ "‘y-or-n-p’ argument should end with \"? \". Fix? "
"? " t)
nil
(checkdoc-create-error
- "`y-or-n-p' argument should end with \"? \""
+ "‘y-or-n-p’ argument should end with \"? \""
(match-beginning 0) (match-end 0)))
(if (save-excursion (forward-sexp 1)
(forward-char -2)
(looking-at " "))
(if (checkdoc-autofix-ask-replace
(match-beginning 0) (match-end 0)
- "`y-or-n-p' argument should end with \"? \". Fix? "
+ "‘y-or-n-p’ argument should end with \"? \". Fix? "
"? " t)
nil
(checkdoc-create-error
- "`y-or-n-p' argument should end with \"? \""
+ "‘y-or-n-p’ argument should end with \"? \""
(match-beginning 0) (match-end 0)))
(if (and ;; if this isn't true, we have a problem.
(save-excursion (forward-sexp 1)
(looking-at "\""))
(checkdoc-autofix-ask-replace
(match-beginning 0) (match-end 0)
- "`y-or-n-p' argument should end with \"? \". Fix? "
+ "‘y-or-n-p’ argument should end with \"? \". Fix? "
"? \"" t))
nil
(checkdoc-create-error
- "`y-or-n-p' argument should end with \"? \""
+ "‘y-or-n-p’ argument should end with \"? \""
(match-beginning 0) (match-end 0)))))))
;; Now, let's just run the spell checker on this guy.
(checkdoc-ispell-docstring-engine (save-excursion (forward-sexp 1)
(cond ((and junk-allowed (null sum)) sum)
(junk-allowed (* sign sum))
((or (/= start end) (null sum))
- (error "Not an integer string: `%s'" string))
+ (error "Not an integer string: ‘%s’" string))
(t (* sign sum)))))))
(cond
((null cl--loop-args)
- (error "Malformed `cl-loop' macro"))
+ (error "Malformed ‘cl-loop’ macro"))
((eq word 'named)
(setq cl--loop-name (pop cl--loop-args)))
((eq word 'initially)
(if (memq (car cl--loop-args) '(do doing)) (pop cl--loop-args))
(or (consp (car cl--loop-args))
- (error "Syntax error on `initially' clause"))
+ (error "Syntax error on ‘initially’ clause"))
(while (consp (car cl--loop-args))
(push (pop cl--loop-args) cl--loop-initially)))
(or (cl--pop2 cl--loop-args) '(quote nil)))
(if (memq (car cl--loop-args) '(do doing)) (pop cl--loop-args))
(or (consp (car cl--loop-args))
- (error "Syntax error on `finally' clause"))
+ (error "Syntax error on ‘finally’ clause"))
(if (and (eq (caar cl--loop-args) 'return) (null cl--loop-name))
(setq cl--loop-result-explicit
(or (nth 1 (pop cl--loop-args)) '(quote nil)))
above below by))
(push word cl--loop-args)
(if (memq (car cl--loop-args) '(downto above))
- (error "Must specify `from' value for downward cl-loop"))
+ (error "Must specify ‘from’ value for downward cl-loop"))
(let* ((down (or (eq (car cl--loop-args) 'downfrom)
(memq (nth 2 cl--loop-args)
'(downto above))))
(step-var (and (not (macroexp-const-p step))
(make-symbol "--cl-var--"))))
(and step (numberp step) (<= step 0)
- (error "Loop `by' value is not positive: %s" step))
+ (error "Loop ‘by’ value is not positive: %s" step))
(push (list var (or start 0)) loop-for-bindings)
(if end-var (push (list end-var end) loop-for-bindings))
(if step-var (push (list step-var step)
((memq word '(element elements))
(let ((ref (or (memq (car cl--loop-args) '(in-ref of-ref))
(and (not (memq (car cl--loop-args) '(in of)))
- (error "Expected `of'"))))
+ (error "Expected ‘of’"))))
(seq (cl--pop2 cl--loop-args))
(temp-seq (make-symbol "--cl-seq--"))
(temp-idx
(if (and (= (length (cadr cl--loop-args)) 2)
(eq (cl-caadr cl--loop-args) 'index))
(cadr (cl--pop2 cl--loop-args))
- (error "Bad `using' clause"))
+ (error "Bad ‘using’ clause"))
(make-symbol "--cl-idx--"))))
(push (list temp-seq seq) loop-for-bindings)
(push (list temp-idx 0) loop-for-bindings)
((memq word hash-types)
(or (memq (car cl--loop-args) '(in of))
- (error "Expected `of'"))
+ (error "Expected ‘of’"))
(let* ((table (cl--pop2 cl--loop-args))
(other
(if (eq (car cl--loop-args) 'using)
(memq (cl-caadr cl--loop-args) hash-types)
(not (eq (cl-caadr cl--loop-args) word)))
(cadr (cl--pop2 cl--loop-args))
- (error "Bad `using' clause"))
+ (error "Bad ‘using’ clause"))
(make-symbol "--cl-var--"))))
(if (memq word '(hash-value hash-values))
(setq var (prog1 other (setq other var))))
((memq word key-types)
(or (memq (car cl--loop-args) '(in of))
- (error "Expected `of'"))
+ (error "Expected ‘of’"))
(let ((cl-map (cl--pop2 cl--loop-args))
(other
(if (eq (car cl--loop-args) 'using)
(memq (cl-caadr cl--loop-args) key-types)
(not (eq (cl-caadr cl--loop-args) word)))
(cadr (cl--pop2 cl--loop-args))
- (error "Bad `using' clause"))
+ (error "Bad ‘using’ clause"))
(make-symbol "--cl-var--"))))
(if (memq word '(key-binding key-bindings))
(setq var (prog1 other (setq other var))))
(get word 'cl-loop-for-handler))))
(if handler
(funcall handler var)
- (error "Expected a `for' preposition, found %s" word)))))
+ (error "Expected a ‘for’ preposition, found %s" word)))))
(eq (car cl--loop-args) 'and))
(setq ands t)
(pop cl--loop-args))
((memq word '(do doing))
(let ((body nil))
- (or (consp (car cl--loop-args)) (error "Syntax error on `do' clause"))
+ (or (consp (car cl--loop-args)) (error "Syntax error on ‘do’ clause"))
(while (consp (car cl--loop-args)) (push (pop cl--loop-args) body))
(push (cons 'progn (nreverse (cons t body))) cl--loop-body)))
`((go . ,(lambda (label)
(let ((catch-tag (cdr (assq label cl--tagbody-alist))))
(unless catch-tag
- (error "Unknown cl-tagbody go label `%S'" label))
+ (error "Unknown cl-tagbody go label ‘%S’" label))
`(throw ',catch-tag ',label))))
,@macroexpand-all-environment)))))
macroexpand-all-environment))))
(if (or (null (cdar bindings)) (cl-cddar bindings))
(macroexp--warn-and-return
- (format "Malformed `cl-symbol-macrolet' binding: %S"
+ (format "Malformed ‘cl-symbol-macrolet’ binding: %S"
(car bindings))
expansion)
expansion)))
(defun cl-unload-function ()
"Stop unloading of the Common Lisp extensions."
- (message "Cannot unload the feature `cl'")
+ (message "Cannot unload the feature ‘cl’")
;; Stop standard unloading!
t)
(if (or (and (fboundp (car x))
(eq (car-safe (symbol-function (car x))) 'macro))
(cdr (assq (car x) macroexpand-all-environment)))
- (error "Use `labels', not `flet', to rebind macro names"))
+ (error "Use ‘labels’, not ‘flet’, to rebind macro names"))
(let ((func `(cl-function
(lambda ,(cadr x)
(cl-block ,(car x) ,@(cddr x))))))
(when (cl--compiling-file)
;; Bug#411. It would be nice to fix this.
(and (get (car x) 'byte-compile)
- (error "Byte-compiling a redefinition of `%s' \
-will not work - use `labels' instead" (symbol-name (car x))))
+ (error "Byte-compiling a redefinition of ‘%s’ \
+will not work - use ‘labels’ instead" (symbol-name (car x))))
;; FIXME This affects the rest of the file, when it
;; should be restricted to the flet body.
(and (boundp 'byte-compile-function-environment)
(or (getenv "ORGANIZATION")
str)
'(if (copyright-offset-too-large-p)
- (message "Copyright extends beyond `copyright-limit' and won't be updated automatically."))
+ (message "Copyright extends beyond ‘copyright-limit’ and won't be updated automatically."))
comment-end \n)
;; TODO: recurse, exclude COPYING etc.
(interactive "DDirectory: \nMFilenames matching (regexp): ")
(dolist (file (directory-files directory t match nil))
(unless (file-directory-p file)
- (message "Updating file `%s'" file)
+ (message "Updating file ‘%s’" file)
;; FIXME we should not use find-file+save+kill.
(let ((enable-local-variables :safe)
(enable-local-eval nil))
(setq dotted-form (edebug-read-storing-offsets stream))
elements (nconc elements dotted-form)
(if (not (eq (edebug-next-token-class) 'rparen))
- (edebug-syntax-error "Expected `)'"))
+ (edebug-syntax-error "Expected ‘)’"))
(setq edebug-read-dotted-list (listp dotted-form))
))
elements)
`eieio-persistent-read' to load in subclasses of class instead of
being pedantic."
(unless class
- (message "Unsafe call to `eieio-persistent-read'."))
+ (message "Unsafe call to ‘eieio-persistent-read’."))
(when class (cl-check-type class class))
(let ((ret nil)
(buffstr nil))
(if (not (eq type t))
(if (not (equal type tp))
(error
- "Child slot type `%s' does not match inherited type `%s' for `%s'"
+ "Child slot type ‘%s’ does not match inherited type ‘%s’ for ‘%s’"
type tp a))
(setf (cl--slot-descriptor-type new) tp))
;; If we have a repeat, only update the initarg...
(let ((super-prot (alist-get :protection oprops))
(prot (alist-get :protection nprops)))
(if (not (eq prot super-prot))
- (error "Child slot protection `%s' does not match inherited protection `%s' for `%s'"
+ (error "Child slot protection ‘%s’ does not match inherited protection ‘%s’ for ‘%s’"
prot super-prot a)))
;; End original PLN
((and (or `',name (and name (pred keywordp)))
(guard (not (memq name eieio--known-slot-names))))
(macroexp--warn-and-return
- (format "Unknown slot `%S'" name) exp 'compile-only))
+ (format "Unknown slot ‘%S’" name) exp 'compile-only))
(_ exp)))))
(cl-check-type slot symbol)
(cl-check-type obj (or eieio-object class))
;; gnus/registry.el, so it might be used elsewhere as well, so let's
;; keep it for now.
;; FIXME: Generate a compile-time warning for it!
- ;; (error "Can't `oset-default' an instance-allocated slot: %S of %S"
+ ;; (error "Can't ‘oset-default’ an instance-allocated slot: %S of %S"
;; slot class)
(eieio--validate-slot-value class c value slot)
;; Set this into the storage for defaults.
(cl-defmethod eieio-speedbar-child-make-tag-lines ((object eieio-speedbar) _depth)
"Base method for creating tag lines for non-object children."
- (error "You must implement `eieio-speedbar-child-make-tag-lines' for %s"
+ (error "You must implement ‘eieio-speedbar-child-make-tag-lines’ for %s"
(eieio-object-name object)))
(cl-defmethod eieio-speedbar-expand ((object eieio-speedbar) depth)
(cl-defmethod eieio-speedbar-child-description ((obj eieio-speedbar))
"Return a description for a child of OBJ which is not an object."
- (error "You must implement `eieio-speedbar-child-description' for %s"
+ (error "You must implement ‘eieio-speedbar-child-description’ for %s"
(eieio-object-name obj)))
(defun eieio-speedbar-item-info ()
(cond ((and (stringp (car options-and-doc))
(/= 1 (% (length options-and-doc) 2)))
- (error "Too many arguments to `defclass'"))
+ (error "Too many arguments to ‘defclass’"))
((and (symbolp (car options-and-doc))
(/= 0 (% (length options-and-doc) 2)))
- (error "Too many arguments to `defclass'")))
+ (error "Too many arguments to ‘defclass’")))
(if (stringp (car options-and-doc))
(setq options-and-doc
"Change the class of OBJ to type CLASS.
This may create or delete slots, but does not affect the return value
of `eq'."
- (error "EIEIO: `change-class' is unimplemented"))
+ (error "EIEIO: ‘change-class’ is unimplemented"))
;; Hook ourselves into help system for describing classes and methods.
;; FIXME: This is not actually needed any more since we can click on the
(elint-set-mode-line t)
(with-current-buffer elint-log-buffer
(unless (string-equal default-directory dir)
- (elint-log-message (format "\f\nLeaving directory `%s'"
+ (elint-log-message (format "\f\nLeaving directory ‘%s’"
default-directory) t)
- (elint-log-message (format "Entering directory `%s'" dir) t)
+ (elint-log-message (format "Entering directory ‘%s’" dir) t)
(setq default-directory dir))))
(let ((str (format "Linting file %s" file)))
(message "%s..." str)
;; quoted check cannot be elsewhere, since quotes skipped.
(if (looking-back "'" (1- (point)))
;; Eg cust-print.el uses ' as a comment syntax.
- (elint-warning "Skipping quoted form `'%.20s...'"
+ (elint-warning "Skipping quoted form ‘'%.20s...’"
(read (current-buffer)))
(condition-case nil
(setq tops (cons
(cond
;; Eg nnmaildir seems to use [] as a form of comment syntax.
((not (listp form))
- (elint-warning "Skipping non-list form `%s'" form))
+ (elint-warning "Skipping non-list form ‘%s’" form))
;; Add defined variable
((memq (car form) '(defvar defconst defcustom))
(setq elint-env (elint-env-add-var elint-env (cadr form))))
(if (or (< (length form) 4)
(eq (nth 3 form) t)
(unless (stringp (nth 2 form))
- (elint-error "Malformed declaration for `%s'"
+ (elint-error "Malformed declaration for ‘%s’"
(cadr form))
t))
'unknown
(and (eq (car-safe alias) 'quote)
(eq (car-safe target) 'quote)
(eq (elint-get-args (cadr target) env) 'undefined)
- (elint-warning "Alias `%s' has unknown target `%s'"
+ (elint-warning "Alias ‘%s’ has unknown target ‘%s’"
(cadr alias) (cadr target))))
(elint-form form env t))
(setq newenv
(elint-env-add-var newenv (car s))))
(t (elint-error
- "Malformed `let' declaration: %s" s))))
+ "Malformed ‘let’ declaration: %s" s))))
varlist)
;; Lint the body forms
(defun ert-get-test (symbol)
"If SYMBOL names a test, return that. Signal an error otherwise."
- (unless (ert-test-boundp symbol) (error "No test named `%S'" symbol))
+ (unless (ert-test-boundp symbol) (error "No test named ‘%S’" symbol))
(get symbol 'ert--test))
(defun ert-set-test (symbol definition)
and it is interpreted via `find-function-regexp-alist'.
The search is done in the source for library LIBRARY."
(if (null library)
- (error "Don't know where `%s' is defined" symbol))
+ (error "Don't know where ‘%s’ is defined" symbol))
;; Some functions are defined as part of the construct
;; that defines something else.
(while (and (symbolp symbol) (get symbol 'definition-name))
(not verbose)
(setq aliases (if aliases
(concat aliases
- (format ", which is an alias for `%s'"
+ (format ", which is an alias for ‘%s’"
(symbol-name def)))
- (format "`%s' is an alias for `%s'"
+ (format "‘%s’ is an alias for ‘%s’"
function (symbol-name def)))))
(setq function (find-function-advised-original function)
def (find-function-advised-original function)))
`iter-next' resumes execution at the previous
`iter-yield' point."
(identity value)
- (error "`iter-yield' used outside a generator"))
+ (error "‘iter-yield’ used outside a generator"))
(defmacro iter-yield-from (value)
"When used inside a generator function, delegate to a sub-iterator.
so as to preserve the semantics of `setf'."
(declare (debug (sexp (&or symbolp lambda-expr) &optional sexp)))
(when (eq 'lambda (car-safe setter))
- (message "Use `gv-define-setter' or name %s's setter function" name))
+ (message "Use ‘gv-define-setter’ or name %s's setter function" name))
`(gv-define-setter ,name (val &rest args)
,(if fix-return
`(macroexp-let2 nil v val
((null name)
"Can't find package name")
((not (lm-authors))
- "`Author:' tag missing")
+ "‘Author:’ tag missing")
((not (lm-maintainer))
- "`Maintainer:' tag missing")
+ "‘Maintainer:’ tag missing")
((not (lm-summary))
"Can't find the one-line summary description")
((not (lm-keywords))
- "`Keywords:' tag missing")
+ "‘Keywords:’ tag missing")
((not (lm-keywords-finder-p))
- "`Keywords:' has no valid finder keywords (see `finder-known-keywords')")
+ "‘Keywords:’ has no valid finder keywords (see ‘finder-known-keywords’)")
((not (lm-commentary-mark))
"Can't find a 'Commentary' section marker")
((not (lm-history-mark))
((string-match "\\.tar\\'" file)
(tar-mode) (package-tar-file-info))
((string-match "\\.el\\'" file) (package-buffer-info))
- (t (error "Unrecognized extension `%s'"
+ (t (error "Unrecognized extension ‘%s’"
(file-name-extension file))))))
(package-upload-buffer-internal pkg-desc (file-name-extension file)))))
(push (int-to-string num) str-list)
(push "." str-list))
((< num -4)
- (error "Invalid version list `%s'" vlist))
+ (error "Invalid version list ‘%s’" vlist))
(t
;; pre, or beta, or alpha
(cond ((equal "." (car str-list))
(pop str-list))
((not (string-match "[0-9]+" (car str-list)))
- (error "Invalid version list `%s'" vlist)))
+ (error "Invalid version list ‘%s’" vlist)))
(push (cond ((= num -1) "pre")
((= num -2) "beta")
((= num -3) "alpha")
((stringp force) ; held
(unless (version-list-= version (version-to-list force))
force))
- (t (error "Invalid element in `package-load-list'")))))
+ (t (error "Invalid element in ‘package-load-list’")))))
(defun package-built-in-p (package &optional min-version)
"Return true if PACKAGE is built-in to Emacs.
(pkg-dir (package-desc-dir pkg-desc))
(pkg-dir-dir (file-name-as-directory pkg-dir)))
(unless pkg-dir
- (error "Internal error: unable to find directory for `%s'"
+ (error "Internal error: unable to find directory for ‘%s’"
(package-desc-full-name pkg-desc)))
;; Add to load path, add autoloads, and activate the package.
(let* ((old-lp load-path)
(unless (package-activate (car req))
(throw 'dep-failure req))))))
(if fail
- (warn "Unable to activate package `%s'.
-Required package `%s-%s' is unavailable"
+ (warn "Unable to activate package ‘%s’.
+Required package ‘%s-%s’ is unavailable"
package (car fail) (package-version-join (cadr fail)))
;; If all goes well, activate the package itself.
(package-activate-1 pkg-vec force)))))))
;; Even if the sig fails, this download is done, so
;; remove it from the in-progress list.
(package--update-downloads-in-progress archive)
- (error "Unsigned archive `%s'" name))
+ (error "Unsigned archive ‘%s’" name))
;; Write out the archives file.
(write-region content nil local-file nil 'silent)
;; Write out good signatures into archive-contents.signed file.
(when async
;; The t at the end means to propagate connection errors.
(lambda () (package--update-downloads-in-progress archive) t)))
- (error (message "Failed to download `%s' archive."
+ (error (message "Failed to download ‘%s’ archive."
(car archive))))))
;;;###autoload
(package-desc-full-name already))
(setq packages (delq already packages))
(setq already nil))
- (error "Need package `%s-%s', but only %s is being installed"
+ (error "Need package ‘%s-%s’, but only %s is being installed"
next-pkg (package-version-join next-version)
(package-version-join (package-desc-version already)))))
(cond
(unless problem
(setq problem
(if (stringp disabled)
- (format "Package `%s' held at version %s, but version %s required"
+ (format "Package ‘%s’ held at version %s, but version %s required"
next-pkg disabled
(package-version-join next-version))
- (format "Required package '%s' is disabled"
+ (format "Required package ‘%s’ is disabled"
next-pkg)))))
(t (setq found pkg-desc)))))
(unless found
(cond
(problem (error "%s" problem))
(found-something
- (error "Need package `%s-%s', but only %s is available"
+ (error "Need package ‘%s-%s’, but only %s is available"
next-pkg (package-version-join next-version)
found-something))
- (t (error "Package `%s-%s' is unavailable"
+ (t (error "Package ‘%s-%s’ is unavailable"
next-pkg (package-version-join next-version)))))
(setq packages
(package-compute-transaction (cons found packages)
(unless (or good-sigs (eq package-check-signature 'allow-unsigned))
;; Even if the sig fails, this download is done, so
;; remove it from the in-progress list.
- (error "Unsigned package: `%s'"
+ (error "Unsigned package: ‘%s’"
(package-desc-name pkg-desc)))
;; Signature checked, unpack now.
(with-temp-buffer (insert content)
(package-desc-reqs pkg)))
(package-compute-transaction () (list (list pkg))))))
(package-download-transaction transaction)
- (message "`%s' is already installed" (package-desc-full-name pkg))))
+ (message "‘%s’ is already installed" (package-desc-full-name pkg))))
(defun package-strip-rcs-id (str)
"Strip RCS version ID from the version string STR.
;; using here, because the outcome is the same either way (nothing
;; gets installed).
(if (not package-selected-packages)
- (message "`package-selected-packages' is empty, nothing to install")
+ (message "‘package-selected-packages’ is empty, nothing to install")
(cl-loop for p in package-selected-packages
unless (package-installed-p p)
collect p into lst
(expand-file-name package-user-dir))
(expand-file-name dir)))
;; Don't delete "system" packages.
- (error "Package `%s' is a system package, not deleting"
+ (error "Package ‘%s’ is a system package, not deleting"
(package-desc-full-name pkg-desc)))
((and (null force)
(setq pkg-used-elsewhere-by
(package--used-elsewhere-p pkg-desc)))
;; Don't delete packages used as dependency elsewhere.
- (error "Package `%s' is used by `%s' as dependency, not deleting"
+ (error "Package ‘%s’ is used by ‘%s’ as dependency, not deleting"
(package-desc-full-name pkg-desc)
(package-desc-name pkg-used-elsewhere-by)))
(t
(delete pkg-desc pkgs)
(unless (cdr pkgs)
(setq package-alist (delq pkgs package-alist))))
- (message "Package `%s' deleted." (package-desc-full-name pkg-desc))))))
+ (message "Package ‘%s’ deleted." (package-desc-full-name pkg-desc))))))
;;;###autoload
(defun package-reinstall (pkg)
;; do absolutely nothing.
(when (or package-selected-packages
(yes-or-no-p
- "`package-selected-packages' is empty! Really remove ALL packages? "))
+ "‘package-selected-packages’ is empty! Really remove ALL packages? "))
(let ((removable (package--removable-packages)))
(if removable
(when (y-or-n-p
(defun package-install-button-action (button)
(let ((pkg-desc (button-get button 'package-desc)))
- (when (y-or-n-p (format "Install package `%s'? "
+ (when (y-or-n-p (format "Install package ‘%s’? "
(package-desc-full-name pkg-desc)))
(package-install pkg-desc nil)
(revert-buffer nil t)
(defun package-delete-button-action (button)
(let ((pkg-desc (button-get button 'package-desc)))
- (when (y-or-n-p (format "Delete package `%s'? "
+ (when (y-or-n-p (format "Delete package ‘%s’? "
(package-desc-full-name pkg-desc)))
(package-delete pkg-desc)
(revert-buffer nil t)
(cl-remove-if-not (lambda (e) (string-match re (symbol-name (car e))))
package-archive-contents)))
(message (substitute-command-keys
- (concat "Hiding %s packages, type `\\[package-menu-toggle-hiding]'"
- " to toggle or `\\[customize-variable] RET package-hidden-regexps'"
+ (concat "Hiding %s packages, type ‘\\[package-menu-toggle-hiding]’"
+ " to toggle or ‘\\[customize-variable] RET package-hidden-regexps’"
" to customize it"))
(length hidden)))))
(length packages)
(mapconcat #'package-desc-full-name packages ", ")))
;; Exactly 1
- (t (format "package `%s'"
+ (t (format "package ‘%s’"
(package-desc-full-name (car packages))))))
(defun package-menu--prompt-transaction-p (delete install upgrade)
(condition-case-unless-debug err
(let ((inhibit-message package-menu-async))
(package-delete elt nil 'nosave))
- (error (message "Error trying to delete `%s': %S"
+ (error (message "Error trying to delete ‘%s’: %S"
(package-desc-full-name elt)
err))))))
(defun package-menu--find-and-notify-upgrades ()
"Notify the user of upgradable packages."
(when-let ((upgrades (package-menu--find-upgrades)))
- (message "%d package%s can be upgraded; type `%s' to mark %s for upgrading."
+ (message "%d package%s can be upgraded; type ‘%s’ to mark %s for upgrading."
(length upgrades)
(if (= (length upgrades) 1) "" "s")
(substitute-command-keys "\\[package-menu-mark-upgrades]")
(pcase--dontwarn-upats (cons x pcase--dontwarn-upats)))
(pcase--expand
;; FIXME: Could we add the FILE:LINE data in the error message?
- exp (append cases `((,x (error "No clause matching `%S'" ,x)))))))
+ exp (append cases `((,x (error "No clause matching ‘%S’" ,x)))))))
;;;###autoload
(defmacro pcase-lambda (lambda-list &rest body)
(let ((code (pcase--u1 matches code vars rest)))
(if (eq upat '_) code
(macroexp--warn-and-return
- "Pattern t is deprecated. Use `_' instead"
+ "Pattern t is deprecated. Use ‘_’ instead"
code))))
((eq upat 'pcase--dontcare) :pcase--dontcare)
((memq (car-safe upat) '(guard pred))
(pcase--u rest))
vars
(list `((and . ,matches) ,code . ,vars))))
- (t (error "Unknown pattern `%S'" upat)))))
+ (t (error "Unknown pattern ‘%S’" upat)))))
(t (error "Incorrect MATCH %S" (car matches)))))
(def-edebug-spec
(setq reb-subexp-mode t)
(reb-update-modestring)
(use-local-map reb-subexp-mode-map)
- (message "`0'-`9' to display subexpressions `q' to quit subexp mode"))
+ (message "‘0’-‘9’ to display subexpressions ‘q’ to quit subexp mode"))
(defun reb-show-subexp (subexp &optional pause)
"Visually show limit of subexpression SUBEXP of recent search.
"Return the next item in the RING, after ITEM.
Raise error if ITEM is not in the RING."
(let ((curr-index (ring-member ring item)))
- (unless curr-index (error "Item is not in the ring: `%s'" item))
+ (unless curr-index (error "Item is not in the ring: ‘%s’" item))
(ring-ref ring (ring-plus1 curr-index (ring-length ring)))))
(defun ring-previous (ring item)
"Return the previous item in the RING, before ITEM.
Raise error if ITEM is not in the RING."
(let ((curr-index (ring-member ring item)))
- (unless curr-index (error "Item is not in the ring: `%s'" item))
+ (unless curr-index (error "Item is not in the ring: ‘%s’" item))
(ring-ref ring (ring-minus1 curr-index (ring-length ring)))))
(defun ring-extend (ring x)
(defun rx-check (form)
"Check FORM according to its car's parsing info."
(unless (listp form)
- (error "rx `%s' needs argument(s)" form))
+ (error "rx ‘%s’ needs argument(s)" form))
(let* ((rx (rx-info (car form) 'head))
(nargs (1- (length form)))
(min-args (nth 1 rx))
(type-pred (nth 3 rx)))
(when (and (not (null min-args))
(< nargs min-args))
- (error "rx form `%s' requires at least %d args"
+ (error "rx form ‘%s’ requires at least %d args"
(car form) min-args))
(when (and (not (null max-args))
(> nargs max-args))
- (error "rx form `%s' accepts at most %d args"
+ (error "rx form ‘%s’ accepts at most %d args"
(car form) max-args))
(when (not (null type-pred))
(dolist (sub-form (cdr form))
(unless (funcall type-pred sub-form)
- (error "rx form `%s' requires args satisfying `%s'"
+ (error "rx form ‘%s’ requires args satisfying ‘%s’"
(car form) type-pred))))))
(defun rx-anything (form)
"Match any character."
(if (consp form)
- (error "rx `anything' syntax error: %s" form))
+ (error "rx ‘anything’ syntax error: %s" form))
(rx-or (list 'or 'not-newline ?\n)))
(let ((i 0)
c1 c2 l)
(if (= 0 (length str))
- (error "String arg for Rx `any' must not be empty"))
+ (error "String arg for Rx ‘any’ must not be empty"))
(while (string-match ".-." str i)
;; string before range: convert it to characters
(if (< i (match-beginning 0))
(error nil))))
(if (or (null translation)
(null (string-match "\\`\\[\\[:[-a-z]+:\\]\\]\\'" translation)))
- (error "Invalid char class `%s' in Rx `any'" arg))
+ (error "Invalid char class ‘%s’ in Rx ‘any’" arg))
(list (substring translation 1 -1)))) ; strip outer brackets
((and (integerp (car-safe arg)) (integerp (cdr-safe arg)))
(list arg))
((stringp arg) (rx-check-any-string arg))
((error
- "rx `any' requires string, character, char pair or char class args"))))
+ "rx ‘any’ requires string, character, char pair or char class args"))))
(defun rx-any (form)
(eq arg 'word-boundary)
(and (consp arg)
(memq (car arg) '(not any in syntax category))))
- (error "rx `not' syntax error: %s" arg))
+ (error "rx ‘not’ syntax error: %s" arg))
t)
(setq form (rx-trans-forms form 1))
(unless (and (integerp (nth 1 form))
(> (nth 1 form) 0))
- (error "rx `=' requires positive integer first arg"))
+ (error "rx ‘=’ requires positive integer first arg"))
(format "%s\\{%d\\}" (rx-form (nth 2 form) '*) (nth 1 form)))
(setq form (rx-trans-forms form 1))
(unless (and (integerp (nth 1 form))
(> (nth 1 form) 0))
- (error "rx `>=' requires positive integer first arg"))
+ (error "rx ‘>=’ requires positive integer first arg"))
(format "%s\\{%d,\\}" (rx-form (nth 2 form) '*) (nth 1 form)))
(cond ((= (length form) 3)
(unless (and (integerp (nth 1 form))
(> (nth 1 form) 0))
- (error "rx `repeat' requires positive integer first arg"))
+ (error "rx ‘repeat’ requires positive integer first arg"))
(format "%s\\{%d\\}" (rx-form (nth 2 form) '*) (nth 1 form)))
((or (not (integerp (nth 2 form)))
(< (nth 2 form) 0)
(not (integerp (nth 1 form)))
(< (nth 1 form) 0)
(< (nth 2 form) (nth 1 form)))
- (error "rx `repeat' range error"))
+ (error "rx ‘repeat’ range error"))
(t
(format "%s\\{%d,%d\\}" (rx-form (nth 3 form) '*)
(nth 1 form) (nth 2 form)))))
(defun rx-check-backref (arg)
"Check arg ARG for Rx `backref'."
(or (and (integerp arg) (>= arg 1) (<= arg 9))
- (error "rx `backref' requires numeric 1<=arg<=9: %s" arg)))
+ (error "rx ‘backref’ requires numeric 1<=arg<=9: %s" arg)))
(defun rx-kleene (form)
"Parse and produce code from FORM.
(if (= 1 (length name))
(setq syntax (aref name 0))))))
(unless syntax
- (error "Unknown rx syntax `%s'" sym)))
+ (error "Unknown rx syntax ‘%s’" sym)))
(format "\\s%c" syntax)))
"Check the argument FORM of a `(category FORM)'."
(unless (or (integerp form)
(cdr (assq form rx-categories)))
- (error "Unknown category `%s'" form))
+ (error "Unknown category ‘%s’" form))
t)
(cond ((stringp info)
info)
((null info)
- (error "Unknown rx form `%s'" form))
+ (error "Unknown rx form ‘%s’" form))
(t
(funcall (nth 0 info) form)))))
((consp form)
(let ((info (rx-info (car form) 'head)))
(unless (consp info)
- (error "Unknown rx form `%s'" (car form)))
+ (error "Unknown rx form ‘%s’" (car form)))
(funcall (nth 0 info) form)))
(t
- (error "rx syntax error at `%s'" form))))
+ (error "rx syntax error at ‘%s’" form))))
;;;###autoload
(let* ((existing (assq major-mode smie-config))
(config
(cond ((null existing)
- (message "Local rules saved in `smie-config'")
+ (message "Local rules saved in ‘smie-config’")
smie-config--buffer-local)
((y-or-n-p "Replace the existing mode's config? ")
- (message "Mode rules replaced in `smie-config'")
+ (message "Mode rules replaced in ‘smie-config’")
smie-config--buffer-local)
((y-or-n-p "Merge with existing mode's config? ")
- (message "Mode rules adjusted in `smie-config'")
+ (message "Mode rules adjusted in ‘smie-config’")
(append smie-config--buffer-local (cdr existing)))
(t (error "Abort")))))
(if existing
(when (> (length binding) 2)
(signal
'error
- (cons "`let' bindings can have only one value-form" binding)))
+ (cons "‘let’ bindings can have only one value-form" binding)))
binding)
(defsubst internal--build-binding-value-form (binding prev-var)
(aset testcover-vector idx (cons '1value val)))
((not (and (eq (car-safe (aref testcover-vector idx)) '1value)
(equal (cdr (aref testcover-vector idx)) val)))
- (error "Value of form marked with `1value' does vary: %s" val)))
+ (error "Value of form marked with ‘1value’ does vary: %s" val)))
val)