Commit 9ce1d388 authored by Paul Eggert's avatar Paul Eggert

Use curved quotes in core elisp diagnostics

In the core elisp files, use curved quotes in diagnostic formats,
so that they follow user preference as per ‘text-quoting-style’
rather than being hard-coded to quote `like this'.
* lisp/abbrev.el (expand-region-abbrevs):
* lisp/button.el (button-category-symbol, button-put)
(make-text-button):
* lisp/cus-start.el:
* lisp/custom.el (custom-add-dependencies, custom-check-theme)
(custom--sort-vars-1, load-theme):
* lisp/emacs-lisp/byte-run.el (defun, defsubst):
* lisp/emacs-lisp/cl-generic.el (cl-defgeneric)
(cl-generic-generalizers):
* lisp/emacs-lisp/macroexp.el (macroexp--obsolete-warning):
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p):
* lisp/emacs-lisp/nadvice.el (advice--make-docstring)
(advice--make, define-advice):
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-put-tag):
* lisp/emacs-lisp/timer.el (timer-event-handler):
* lisp/env.el (setenv):
* lisp/facemenu.el (facemenu-add-new-face)
(facemenu-add-new-color):
* lisp/faces.el (face-documentation, read-face-name)
(face-read-string, read-face-font, face-spec-set-match-display)
(read-color, x-resolve-font-name):
* lisp/files.el (locate-user-emacs-file, find-alternate-file)
(set-auto-mode, hack-local-variables)
(hack-one-local-variable--obsolete)
(dir-locals-set-directory-class, write-file)
(basic-save-buffer, delete-directory, copy-directory)
(recover-session, recover-session-finish, insert-directory)
(file-modes-char-to-who, file-modes-symbolic-to-number)
(move-file-to-trash):
* lisp/font-lock.el (font-lock-fontify-buffer):
* lisp/format.el (format-write-file, format-find-file)
(format-insert-file):
* lisp/frame.el (get-device-terminal, select-frame-by-name):
* lisp/fringe.el (fringe--check-style):
* lisp/help.el (describe-minor-mode-from-indicator):
* lisp/image.el (image-type):
* lisp/international/fontset.el (x-must-resolve-font-name):
* lisp/international/mule-cmds.el (prefer-coding-system)
(select-safe-coding-system-interactively)
(select-safe-coding-system, activate-input-method)
(toggle-input-method, describe-current-input-method):
* lisp/international/mule-conf.el (code-offset):
* lisp/mouse.el (minor-mode-menu-from-indicator):
* lisp/replace.el (query-replace-read-from)
(occur-after-change-function, occur-1):
* lisp/scroll-bar.el (scroll-bar-columns):
* lisp/simple.el (execute-extended-command)
(undo-outer-limit-truncate, compose-mail, set-variable)
(choose-completion-string, define-alternatives):
* lisp/startup.el (site-run-file, tty-handle-args, )
(command-line, command-line-1):
* lisp/subr.el (noreturn, define-error, add-to-list)
(read-char-choice):
* lisp/term/common-win.el (x-handle-xrm-switch)
(x-handle-name-switch, x-handle-args):
* lisp/term/x-win.el (x-handle-parent-id, x-handle-smid):
Use curved quotes in diagnostics.
* lisp/international/mule.el (find-auto-coding):
Use " to quote in a diagnostic, to be consistent with the rest of
this file.
parent 3a91d153
......@@ -399,7 +399,7 @@ A prefix argument means don't query; expand all abbrevs."
(buffer-substring-no-properties
(save-excursion (forward-word -1) (point))
pnt)))
(if (or noquery (y-or-n-p (format "Expand `%s'? " string)))
(if (or noquery (y-or-n-p (format "Expand ‘%s’? " string)))
(expand-abbrev)))))))
;;; Abbrev properties.
......
......@@ -114,7 +114,7 @@ Mode-specific keymaps may want to use this as their parent keymap.")
"Return the symbol used by button-type TYPE to store properties.
Buttons inherit them by setting their `category' property to that symbol."
(or (get type 'button-category-symbol)
(error "Unknown button type `%s'" type)))
(error "Unknown button type ‘%s’" type)))
(defun define-button-type (name &rest properties)
"Define a `button type' called NAME (a symbol).
......@@ -208,7 +208,7 @@ changes to a supertype are not reflected in its subtypes)."
(setq val (button-category-symbol val)))
((eq prop 'category)
;; Disallow updating the `category' property directly.
(error "Button `category' property may not be set directly")))
(error "Button ‘category’ property may not be set directly")))
;; Add the property.
(cond ((overlayp button)
(overlay-put button prop val))
......@@ -333,7 +333,7 @@ Also see `insert-text-button'."
(setq object beg beg 0 end (length object)))
;; Disallow setting the `category' property directly.
(when (plist-get properties 'category)
(error "Button `category' property may not be set directly"))
(error "Button ‘category’ property may not be set directly"))
(if (null type-entry)
;; The user didn't specify a `type' property, use the default.
(setq properties (cons 'category (cons 'default-button properties)))
......
......@@ -637,7 +637,7 @@ since it could result in memory overflow and make Emacs crash."
(if (not (boundp symbol))
;; If variables are removed from C code, give an error here!
(and native-p
(message "Note, built-in variable `%S' not bound" symbol))
(message "Note, built-in variable %S not bound" symbol))
;; Save the standard value, unless we already did.
(or (get symbol 'standard-value)
(put symbol 'standard-value (list standard)))
......
......@@ -548,13 +548,13 @@ VALUE should be a list of symbols. For each symbol in that list,
this specifies that SYMBOL should be set after the specified symbol,
if both appear in constructs like `custom-set-variables'."
(unless (listp value)
(error "Invalid custom dependency `%s'" value))
(error "Invalid custom dependency ‘%s’" value))
(let* ((deps (get symbol 'custom-dependencies))
(new-deps deps))
(while value
(let ((dep (car value)))
(unless (symbolp dep)
(error "Invalid custom dependency `%s'" dep))
(error "Invalid custom dependency ‘%s’" dep))
(unless (memq dep new-deps)
(setq new-deps (cons dep new-deps)))
(setq value (cdr value))))
......@@ -830,7 +830,7 @@ to the front of this list.")
(defsubst custom-check-theme (theme)
"Check whether THEME is valid, and signal an error if it is not."
(unless (custom-theme-p theme)
(error "Unknown theme `%s'" theme)))
(error "Unknown theme ‘%s’" theme)))
(defun custom-push-theme (prop symbol theme mode &optional value)
"Record VALUE for face or variable SYMBOL in custom theme THEME.
......@@ -1043,7 +1043,7 @@ list, in which A occurs before B if B was defined with a
(when elt
(cond
((eq (car elt) 'dependant)
(error "Circular custom dependency on `%s'" sym))
(error "Circular custom dependency on ‘%s’" sym))
((car elt)
(setcar elt 'dependant)
(dolist (dep (get sym 'custom-dependencies))
......@@ -1201,7 +1201,7 @@ Return t if THEME was successfully loaded, nil otherwise."
(custom-available-themes))))
nil nil))
(unless (custom-theme-name-valid-p theme)
(error "Invalid theme name `%s'" theme))
(error "Invalid theme name ‘%s’" theme))
;; If THEME is already enabled, re-enable it after loading, even if
;; NO-ENABLE is t.
(if no-enable
......@@ -1217,7 +1217,7 @@ Return t if THEME was successfully loaded, nil otherwise."
'("" "c")))
hash)
(unless fn
(error "Unable to find theme file for `%s'" theme))
(error "Unable to find theme file for ‘%s’" theme))
(with-temp-buffer
(insert-file-contents fn)
(setq hash (secure-hash 'sha256 (current-buffer)))
......
......@@ -267,7 +267,7 @@ The return value is undefined.
(cdr body)
body)))
nil)
(t (message "Warning: Unknown defun property `%S' in %S"
(t (message "Warning: Unknown defun property ‘%S’ in %S"
(car x) name)))))
decls))
(def (list 'defalias
......@@ -317,7 +317,7 @@ The return value is undefined.
(declare (debug defun) (doc-string 3))
(or (memq (get name 'byte-optimizer)
'(nil byte-compile-inline-expand))
(error "`%s' is a primitive" name))
(error "‘%s’ is a primitive" name))
`(prog1
(defun ,name ,arglist ,@body)
(eval-and-compile
......
......@@ -192,7 +192,7 @@ BODY, if present, is used as the body of a default method.
(when doc (error "Multiple doc strings for %S" name))
(setq doc (cadr (pop options-and-methods))))
(`declare
(when declarations (error "Multiple `declare' for %S" name))
(when declarations (error "Multiple ‘declare’ for %S" name))
(setq declarations (pop options-and-methods)))
(`:method (push (cdr (pop options-and-methods)) methods))
(_ (push (pop options-and-methods) options))))
......@@ -208,7 +208,7 @@ BODY, if present, is used as the body of a default method.
defun-declarations-alist))))
(cond
(f (apply (car f) name args (cdr declaration)))
(t (message "Warning: Unknown defun property `%S' in %S"
(t (message "Warning: Unknown defun property ‘%S’ in %S"
(car declaration) name)
nil))))
(cdr declarations))
......@@ -1070,7 +1070,7 @@ The value returned is a list of elements of the form
(and (assq type cl--generic-typeof-types)
(progn
(if (memq type '(vector array sequence))
(message "`%S' also matches CL structs and EIEIO classes" type))
(message "‘%S’ also matches CL structs and EIEIO classes" type))
(list cl--generic-typeof-generalizer)))
(cl-call-next-method)))
......
......@@ -146,10 +146,10 @@ and also to avoid outputting the warning during normal execution."
(defun macroexp--obsolete-warning (fun obsolescence-data type)
(let ((instead (car obsolescence-data))
(asof (nth 2 obsolescence-data)))
(format "`%s' is an obsolete %s%s%s" fun type
(format "‘%s’ is an obsolete %s%s%s" fun type
(if asof (concat " (as of " asof ")") "")
(cond ((stringp instead) (concat "; " instead))
(instead (format "; use `%s' instead." instead))
(instead (format "; use ‘%s’ instead." instead))
(t ".")))))
(defun macroexpand-1 (form &optional environment)
......
......@@ -198,9 +198,9 @@ Returns the number of actions taken."
(objects (if help (nth 1 help) "objects"))
(action (if help (nth 2 help) "act on")))
(concat
(format "Type SPC or `y' to %s the current %s;
DEL or `n' to skip the current %s;
RET or `q' to give up on the %s (skip all remaining %s);
(format "Type SPC or ‘y’ to %s the current %s;
DEL or ‘n’ to skip the current %s;
RET or ‘q’ to give up on the %s (skip all remaining %s);
C-g to quit (cancel the whole command);
! to %s all remaining %s;\n"
action object object action objects action
......
......@@ -95,7 +95,7 @@ Each element has the form (WHERE BYTECODE STACK) where:
(propertize (format "%s advice: " where)
'face 'warning)
(let ((fun (advice--car flist)))
(if (symbolp fun) (format "`%S'" fun)
(if (symbolp fun) (format "‘%S’" fun)
(let* ((name (cdr (assq 'name (advice--props flist))))
(doc (documentation fun t))
(usage (help-split-fundoc doc function)))
......@@ -176,7 +176,7 @@ WHERE is a symbol to select an entry in `advice--where-alist'."
(advice--make-1 (aref main 1) (aref main 3)
(advice--car main) rest (advice--props main)))
(let ((desc (assq where advice--where-alist)))
(unless desc (error "Unknown add-function location `%S'" where))
(unless desc (error "Unknown add-function location ‘%S’" where))
(advice--make-1 (nth 1 desc) (nth 2 desc)
function main props)))))
......@@ -461,7 +461,7 @@ otherwise it is named `SYMBOL@NAME'.
(advice (cond ((null name) `(lambda ,lambda-list ,@body))
((or (stringp name) (symbolp name))
(intern (format "%s@%s" symbol name)))
(t (error "Unrecognized name spec `%S'" name)))))
(t (error "Unrecognized name spec ‘%S’" name)))))
`(prog1 ,@(and (symbolp advice) `((defun ,advice ,lambda-list ,@body)))
(advice-add ',symbol ,where #',advice ,@(and props `(',props))))))
......
......@@ -129,7 +129,7 @@ no entry at POS. POS, if omitted or nil, defaults to point."
TAG should be a string, with length <= `tabulated-list-padding'.
If ADVANCE is non-nil, move forward by one line afterwards."
(unless (stringp tag)
(error "Invalid argument to `tabulated-list-put-tag'"))
(error "Invalid argument to ‘tabulated-list-put-tag’"))
(unless (> tabulated-list-padding 0)
(error "Unable to tag the current line"))
(save-excursion
......
......@@ -324,7 +324,7 @@ This function is called, by name, directly by the C code."
(apply (timer--function timer) (timer--args timer)))
(error (message "Error running timer%s: %S"
(if (symbolp (timer--function timer))
(format " `%s'" (timer--function timer)) "")
(format " ‘%s’" (timer--function timer)) "")
err)))
(when (and retrigger
;; If the timer's been canceled, don't "retrigger" it
......
......@@ -175,7 +175,7 @@ a side-effect."
(let ((codings (find-coding-systems-string (concat variable value))))
(unless (or (eq 'undecided (car codings))
(memq (coding-system-base locale-coding-system) codings))
(error "Can't encode `%s=%s' with `locale-coding-system'"
(error "Can't encode ‘%s=%s’ with ‘locale-coding-system’"
variable (or value "")))))
(and value
substitute-env-vars
......@@ -185,7 +185,7 @@ a side-effect."
(if (and value (multibyte-string-p value))
(setq value (encode-coding-string value locale-coding-system)))
(if (string-match "=" variable)
(error "Environment variable name `%s' contains `='" variable))
(error "Environment variable name ‘%s’ contains ‘=’" variable))
(if (string-equal "TZ" variable)
(set-time-zone-rule value))
(setq process-environment (setenv-internal process-environment
......
......@@ -797,10 +797,10 @@ This is called whenever you create a new face, and at other times."
symbol (intern name)))
(setq menu 'facemenu-face-menu)
(setq docstring
(purecopy (format "Select face `%s' for subsequent insertion.
(purecopy (format "Select face ‘%s’ for subsequent insertion.
If the mark is active and there is no prefix argument,
apply face `%s' to the region instead.
This command was defined by `facemenu-add-new-face'."
apply face ‘%s’ to the region instead.
This command was defined by ‘facemenu-add-new-face’."
name name)))
(cond ((facemenu-iterate ; check if equivalent face is already in the menu
(lambda (m) (and (listp m)
......@@ -846,12 +846,12 @@ Return the event type (a symbol) of the added menu entry.
This is called whenever you use a new color."
(let (symbol)
(unless (color-defined-p color)
(error "Color `%s' undefined" color))
(error "Color ‘%s’ undefined" color))
(cond ((eq menu 'facemenu-foreground-menu)
(setq symbol (intern (concat "fg:" color))))
((eq menu 'facemenu-background-menu)
(setq symbol (intern (concat "bg:" color))))
(t (error "MENU should be `facemenu-foreground-menu' or `facemenu-background-menu'")))
(t (error "MENU should be ‘facemenu-foreground-menu’ or ‘facemenu-background-menu’")))
(unless (facemenu-iterate ; Check if color is already in the menu.
(lambda (m) (and (listp m)
(eq (car m) symbol)))
......
......@@ -574,7 +574,7 @@ If FACE is a face-alias, get the documentation for the target face."
(let ((alias (get face 'face-alias)))
(if alias
(let ((doc (get alias 'face-documentation)))
(format "%s is an alias for the face `%s'.%s" face alias
(format "%s is an alias for the face ‘%s’.%s" face alias
(if doc (format "\n%s" doc)
"")))
(get face 'face-documentation))))
......@@ -1005,7 +1005,7 @@ a single face name."
(setq default (car (split-string default crm-separator t))))
(let ((prompt (if default
(format "%s (default `%s'): " prompt default)
(format "%s (default ‘%s’): " prompt default)
(format "%s: " prompt)))
aliasfaces nonaliasfaces faces)
;; Build up the completion tables.
......@@ -1137,9 +1137,9 @@ Value is the new attribute value."
(let* ((completion-ignore-case t)
(value (completing-read
(if default
(format "%s for face `%s' (default %s): "
(format "%s for face ‘%s’ (default %s): "
name face default)
(format "%s for face `%s': " name face))
(format "%s for face ‘%s’: " name face))
completion-alist nil nil nil nil default)))
(if (equal value "") default value)))
......@@ -1224,7 +1224,8 @@ of a global face. Value is the new attribute value."
"Read the name of a font for FACE on FRAME.
If optional argument FRAME is nil or omitted, use the selected frame."
(let ((completion-ignore-case t))
(completing-read (format "Set font attributes of face `%s' from font: " face)
(completing-read (format "Set font attributes of face ‘%s’ from font: "
face)
(append (fontset-list) (x-list-fonts "*" nil frame)))))
......@@ -1547,7 +1548,7 @@ If FRAME is nil, the current FRAME is used."
options))
((eq req 'supports)
(display-supports-face-attributes-p options frame))
(t (error "Unknown req `%S' with options `%S'"
(t (error "Unknown req ‘%S’ with options ‘%S’"
req options)))))
match))
......@@ -1920,7 +1921,7 @@ resulting color name in the echo area."
(logand 65535 (nth 0 components))
(logand 65535 (nth 1 components))
(logand 65535 (nth 2 components))))))))
(when msg (message "Color: `%s'" color))
(when msg (message "Color: ‘%s’" color))
color))
(defun face-at-point (&optional thing multiple)
......@@ -2773,13 +2774,13 @@ also the same size as FACE on FRAME, or fail."
(if (string-match-p "\\*" pattern)
(if (null (face-font face))
(error "No matching fonts are the same height as the frame default font")
(error "No matching fonts are the same height as face `%s'" face))
(error "No matching fonts are the same height as face ‘%s’" face))
(if (null (face-font face))
(error "Height of font `%s' doesn't match the frame default font"
(error "Height of font ‘%s’ doesn't match the frame default font"
pattern)
(error "Height of font `%s' doesn't match face `%s'"
(error "Height of font ‘%s’ doesn't match face ‘%s’"
pattern face)))
(error "No fonts match `%s'" pattern)))
(error "No fonts match ‘%s’" pattern)))
(car fonts))
(cdr (assq 'font (frame-parameters (selected-frame))))))
......
......@@ -995,10 +995,10 @@ directory if it does not exist."
(put 'user-emacs-directory-warning 'this-session t)
(display-warning 'initialization
(format "\
Unable to %s `user-emacs-directory' (%s).
Unable to %s user-emacs-directory (%s).
Any data that would normally be written there may be lost!
If you never want to see this message again,
customize the variable `user-emacs-directory-warning'."
customize the variable user-emacs-directory-warning."
errtype user-emacs-directory)))))
bestname))))
......@@ -1641,7 +1641,7 @@ killed."
(user-error "Aborted"))
(and (buffer-modified-p) buffer-file-name
(not (yes-or-no-p
(format "Kill and replace buffer `%s' without saving it? "
(format "Kill and replace buffer %s without saving it? "
(buffer-name))))
(user-error "Aborted"))
(let ((obuf (current-buffer))
......@@ -2789,7 +2789,7 @@ we don't actually set it to the same mode the buffer already has."
(catch 'nop
(dolist (mode (nreverse modes))
(if (not (functionp mode))
(message "Ignoring unknown mode `%s'" mode)
(message "Ignoring unknown mode ‘%s’" mode)
(setq done t)
(or (set-auto-mode-0 mode keep-mode-if-same)
;; continuing would call minor modes again, toggling them off
......@@ -2803,7 +2803,7 @@ we don't actually set it to the same mode the buffer already has."
(setq mode (hack-local-variables t))
(not (memq mode modes)) ; already tried and failed
(if (not (functionp mode))
(message "Ignoring unknown mode `%s'" mode)
(message "Ignoring unknown mode ‘%s’" mode)
(setq done t)
(set-auto-mode-0 mode keep-mode-if-same)))
;; If we didn't, look for an interpreter specified in the first line.
......@@ -3419,7 +3419,7 @@ local variables, but directory-local variables may still be applied."
(setq hack-local-variables--warned-lexical t)
(display-warning
:warning
(format "%s: `lexical-binding' at end of file unreliable"
(format "%s: ‘lexical-binding’ at end of file unreliable"
(file-name-nondirectory
(or buffer-file-name ""))))))
(t
......@@ -3556,7 +3556,7 @@ It is dangerous if either of these conditions are met:
var (if since (format " (since %s)" since))
(if (stringp instead)
(substitute-command-keys instead)
(format "use `%s' instead" instead)))))))
(format "use ‘%s’ instead" instead)))))))
(defun hack-one-local-variable (var val)
"Set local variable VAR with value VAL.
......@@ -3673,7 +3673,7 @@ variables from CLASS are applied to the buffer. The variables
for a class are defined using `dir-locals-set-class-variables'."
(setq directory (file-name-as-directory (expand-file-name directory)))
(unless (assq class dir-locals-class-alist)
(error "No such class `%s'" (symbol-name class)))
(error "No such class ‘%s’" (symbol-name class)))
(push (list directory class mtime) dir-locals-directory-cache))
(defun dir-locals-set-class-variables (class variables)
......@@ -4028,7 +4028,7 @@ Interactively, confirmation is required unless you supply a prefix argument."
(not (and (eq (framep-on-display) 'ns)
(listp last-nonmenu-event)
use-dialog-box))
(or (y-or-n-p (format "File `%s' exists; overwrite? " filename))
(or (y-or-n-p (format "File ‘%s’ exists; overwrite? " filename))
(user-error "Canceled")))
(set-visited-file-name filename (not confirm))))
(set-buffer-modified-p t)
......@@ -4733,7 +4733,7 @@ Before and after saving the buffer, this function runs
;; Signal an error if the user specified the name of an
;; existing directory.
(error "%s is a directory" filename)
(unless (y-or-n-p (format "File `%s' exists; overwrite? "
(unless (y-or-n-p (format "File ‘%s’ exists; overwrite? "
filename))
(error "Canceled"))))
(set-visited-file-name filename)))
......@@ -4774,7 +4774,7 @@ Before and after saving the buffer, this function runs
(expand-file-name buffer-file-name))))
(unless (file-exists-p dir)
(if (y-or-n-p
(format "Directory `%s' does not exist; create? " dir))
(format "Directory ‘%s’ does not exist; create? " dir))
(make-directory dir t)
(error "Canceled")))
(setq setmodes (basic-save-buffer-1))))
......@@ -5217,7 +5217,7 @@ given. With a prefix argument, TRASH is nil."
(list dir
(if (directory-files dir nil directory-files-no-dot-files-regexp)
(y-or-n-p
(format "Directory `%s' is not empty, really %s? "
(format "Directory ‘%s’ is not empty, really %s? "
dir (if trashing "trash" "delete")))
nil)
(null current-prefix-arg))))
......@@ -5323,7 +5323,7 @@ directly into NEWNAME instead."
default-directory default-directory nil nil)
current-prefix-arg t nil)))
(when (file-in-directory-p newname directory)
(error "Cannot copy `%s' into its subdirectory `%s'"
(error "Cannot copy ‘%s’ into its subdirectory ‘%s’"
directory newname))
;; If default-directory is a remote directory, make sure we find its
;; copy-directory handler.
......@@ -5695,7 +5695,7 @@ To choose one, move point to the proper line and then type C-c C-c.
Then you'll be asked about a number of files to recover."
(interactive)
(if (null auto-save-list-file-prefix)
(error "You set `auto-save-list-file-prefix' to disable making session files"))
(error "You set ‘auto-save-list-file-prefix’ to disable making session files"))
(let ((dir (file-name-directory auto-save-list-file-prefix))
(nd (file-name-nondirectory auto-save-list-file-prefix)))
(unless (file-directory-p dir)
......@@ -5789,7 +5789,7 @@ This command is used in the special Dired buffer created by
(condition-case nil
(save-excursion (recover-file file))
(error
"Failed to recover `%s'" file)))
"Failed to recover %s" file)))
files
'("file" "files" "recover"))
(message "No files can be recovered from this session now")))
......@@ -6474,7 +6474,7 @@ normally equivalent short `-D' option is just passed on to
file result)
;; Unix. Access the file to get a suitable error.
(access-file file "Reading directory")
(error "Listing directory failed but `access-file' worked")))
(error "Listing directory failed but ‘access-file’ worked")))
(when (if (stringp switches)
(string-match "--dired\\>" switches)
......@@ -6767,7 +6767,7 @@ for the specified category of users."
((= char ?g) #o2070)
((= char ?o) #o1007)
((= char ?a) #o7777)
(t (error "%c: bad `who' character" char))))
(t (error "%c: bad ‘who’ character" char))))
(defun file-modes-char-to-right (char &optional from)
"Convert CHAR to a numeric value of mode bits.
......@@ -6839,7 +6839,7 @@ as in \"og+rX-w\"."
(file-modes-rights-to-number (substring modes (match-end 1))
num-who num-modes)
modes (substring modes (match-end 3))))
(error "Parse error in modes near `%s'" (substring modes 0))))
(error "Parse error in modes near ‘%s’" (substring modes 0))))
num-modes)))
(defun read-file-modes (&optional prompt orig-file)
......@@ -6908,7 +6908,7 @@ Otherwise, trash FILENAME using the freedesktop.org conventions,
trash-dir)))
;; We can't trash a parent directory of trash-directory.
(if (string-prefix-p fn trash-dir)
(error "Trash directory `%s' is a subdirectory of `%s'"
(error "Trash directory ‘%s’ is a subdirectory of ‘%s’"
trash-dir filename))
(unless (file-directory-p trash-dir)
(make-directory trash-dir t))
......
......@@ -1051,7 +1051,7 @@ The region it returns may start or end in the middle of a line.")
;; Of course, this function doesn't do all of the above in all situations
;; (e.g. depending on whether jit-lock is in use) and it can't guess what
;; the caller wants.
(interactive-only "use `font-lock-ensure' or `font-lock-flush' instead."))
(interactive-only "use ‘font-lock-ensure’ or ‘font-lock-flush’ instead."))
(interactive "p")
(font-lock-set-defaults)
(let ((font-lock-verbose (or font-lock-verbose interactively)))
......
......@@ -395,7 +395,7 @@ unless you supply a prefix argument."
(cdr (assq 'default-directory
(buffer-local-variables)))
nil nil (buffer-name))))
(fmt (format-read (format "Write file `%s' in format: "
(fmt (format-read (format "Write file ‘%s’ in format: "
(file-name-nondirectory file)))))
(list file fmt (not current-prefix-arg))))
(let ((old-formats buffer-file-format)
......@@ -416,7 +416,7 @@ If FORMAT is nil then do not do any format conversion."
(interactive
;; Same interactive spec as write-file, plus format question.
(let* ((file (read-file-name "Find file: "))
(fmt (format-read (format "Read file `%s' in format: "
(fmt (format-read (format "Read file ‘%s’ in format: "
(file-name-nondirectory file)))))
(list file fmt)))
(let ((format-alist nil))
......@@ -435,7 +435,7 @@ a list (ABSOLUTE-FILE-NAME SIZE)."
(interactive
;; Same interactive spec as write-file, plus format question.
(let* ((file (read-file-name "Find file: "))
(fmt (format-read (format "Read file `%s' in format: "
(fmt (format-read (format "Read file ‘%s’ in format: "
(file-name-nondirectory file)))))
(list file fmt)))
(let (value size old-undo)
......
......@@ -743,7 +743,7 @@ the name of an X display device (HOST.SERVER.SCREEN) or a tty device file."
(frame-terminal f)))
((terminal-live-p device) device)
(t
(error "Invalid argument %s in `get-device-terminal'" device))))
(error "Invalid argument %s in ‘get-device-terminal’" device))))
(defun frames-on-display-list (&optional device)
"Return a list of all frames on DEVICE.
......@@ -894,7 +894,7 @@ If there is no frame by that name, signal an error."
(frame (cdr (assoc name frame-names-alist))))
(if frame
(select-frame-set-input-focus frame)
(error "There is no frame named `%s'" name))))
(error "There is no frame named ‘%s’" name))))
;;;; Background mode.
......
......@@ -122,7 +122,7 @@ See `fringe-mode' for possible values and their effect."
(and (consp style)
(or (null (car style)) (integerp (car style)))
(or (null (cdr style)) (integerp (cdr style))))
(error "Invalid fringe style `%s'" style)))
(error "Invalid fringe style ‘%s’" style)))
;; For initialization of fringe-mode, take account of changes
;; made explicitly to default-frame-alist.
......
......@@ -1040,7 +1040,7 @@ is currently activated with completion."
(let ((minor-mode (lookup-minor-mode-from-indicator indicator)))
(if minor-mode
(describe-minor-mode-from-symbol minor-mode)
(error "Cannot find minor mode for `%s'" indicator))))
(error "Cannot find minor mode for ‘%s’" indicator))))
(defun lookup-minor-mode-from-indicator (indicator)
"Return a minor mode symbol from its indicator on the mode line."
......
......@@ -343,7 +343,7 @@ of image data. If that doesn't work, and SOURCE is a file name,
use its file extension as image type.
Optional DATA-P non-nil means SOURCE is a string containing image data."
(when (and (not data-p) (not (stringp source)))
(error "Invalid image file name `%s'" source))
(error "Invalid image file name %s" source))
(unless type
(setq type (if data-p
(image-type-from-data source)
......@@ -351,7 +351,7 @@ Optional DATA-P non-nil means SOURCE is a string containing image data."
(image-type-from-file-name source))))
(or type (error "Cannot determine image type")))
(or (memq type (and (boundp 'image-types) image-types))
(error "Invalid image type `%s'" type))
(error "Invalid image type %s" type))
type)
......
......@@ -1055,7 +1055,7 @@ Value is name of that font."
(condition-case nil
(setq ascii-font (x-resolve-font-name pattern))
(error
(message "Warning: no fonts matching `%s' available" pattern)
(message "Warning: no fonts matching %s available" pattern)
(aset xlfd-fields index "*")
(setq index (1+ index))))))
(unless ascii-font
......
......@@ -400,9 +400,9 @@ To prefer, for instance, utf-8, say the following:
\(prefer-coding-system 'utf-8)"
(interactive "zPrefer coding system: ")
(if (not (and coding-system (coding-system-p coding-system)))
(error "Invalid coding system `%s'" coding-system))
(error "Invalid coding system ‘%s’" coding-system))
(if (memq (coding-system-type coding-system) '(raw-text undecided))
(error "Can't prefer the coding system `%s'" coding-system))
(error "Can't prefer the coding system ‘%s’" coding-system))
(let ((base (coding-system-base coding-system))
(eol-type (coding-system-eol-type coding-system)))
(set-coding-system-priority base)
......@@ -417,7 +417,7 @@ To prefer, for instance, utf-8, say the following:
(set-default-coding-systems base)
(if (called-interactively-p 'interactive)
(or (eq base default-file-name-coding-system)
(message "The default value of `file-name-coding-system' was not changed because the specified coding system is not suitable for file names.")))))
(message "The default value of ‘file-name-coding-system’ was not changed because the specified coding system is not suitable for file names.")))))
(defvar sort-coding-systems-predicate nil
"If non-nil, a predicate function to sort coding systems.
......@@ -719,14 +719,14 @@ DEFAULT is the coding system to use by default in the query."
(insert "No default coding systems to try for "
(if (stringp from)
(format "string \"%s\"." from)
(format "buffer `%s'." bufname)))
(format "buffer ‘%s’." bufname)))
(insert
"These default coding systems were tried to encode"
(if (stringp from)
(concat " \"" (if (> (length from) 10)
(concat (substring from 0 10) "...\"")
(concat from "\"")))
(format " text\nin the buffer `%s'" bufname))
(format " text\nin the buffer ‘%s’" bufname))
":\n")
(let ((pos (point))
(fill-prefix " "))
......@@ -876,12 +876,12 @@ and TO is ignored."
(display-warning
'mule