(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.
"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).
(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))
(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)))
(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)))
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))))
(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.
(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))
(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
'("" "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)))
(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
(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
(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))))
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))
(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)))
(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)
(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
(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)))
(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)))))
(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))))))
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
(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
(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
(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
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)
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)))
(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))))
(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.
(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)))
"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)))))
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))
(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)
(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))))))
(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))))
(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))
(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
(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.
(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
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.
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)
(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)
;; 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)))
(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))))
(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))))
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.
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)
(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")))
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)
((= 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.
(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)
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))
;; 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)))
(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)
(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))
(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)
(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.
(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))))
\f
;;;; Background mode.
(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.
(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."
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)
(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)
(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
\(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)
(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.
(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 " "))
(display-warning
'mule
(format "\
-Invalid coding system `%s' is specified
+Invalid coding system ‘%s’ is specified
for the current buffer/file by the %s.
It is highly recommended to fix it before writing to a file."
(car auto-cs)
(if (eq (cdr auto-cs) :coding) ":coding tag"
- (format "variable `%s'" (cdr auto-cs))))
+ (format "variable ‘%s’" (cdr auto-cs))))
:warning)
(or (yes-or-no-p "Really proceed with writing? ")
(error "Save aborted"))
(unless (or current-input-method (null input-method))
(let ((slot (assoc input-method input-method-alist)))
(if (null slot)
- (error "Can't activate input method `%s'" input-method))
+ (error "Can't activate input method ‘%s’" input-method))
(setq current-input-method-title nil)
(let ((func (nth 2 slot)))
(if (functionp func)
(progn
(require (cdr func))
(apply (car func) input-method (nthcdr 5 slot)))
- (error "Can't activate input method `%s'" input-method))))
+ (error "Can't activate input method ‘%s’" input-method))))
(setq current-input-method input-method)
(or (stringp current-input-method-title)
(setq current-input-method-title (nth 3 slot)))
(interactive "P\np")
(if toggle-input-method-active
- (error "Recursive use of `toggle-input-method'"))
+ (error "Recursive use of ‘toggle-input-method’"))
(if (and current-input-method (not arg))
(deactivate-input-method)
(let ((toggle-input-method-active t)
(if (and (symbolp describe-current-input-method-function)
(fboundp describe-current-input-method-function))
(funcall describe-current-input-method-function)
- (message "No way to describe the current input method `%s'"
+ (message "No way to describe the current input method ‘%s’"
current-input-method)
(ding))
(error "No input method is activated now")))
(dolist (script '(devanagari sanskrit bengali tamil telugu assamese
oriya kannada malayalam gujarati punjabi))
(define-charset (intern (format "%s-cdac" script))
- (format "Glyphs of %s script for CDAC font. Subset of `indian-glyph'."
+ (format "Glyphs of %s script for CDAC font. Subset of ‘indian-glyph’."
(capitalize (symbol-name script)))
:short-name (format "CDAC %s glyphs" (capitalize (symbol-name script)))
:supplementary-p t
(dolist (script '(devanagari bengali punjabi gujarati
oriya tamil telugu kannada malayalam))
(define-charset (intern (format "%s-akruti" script))
- (format "Glyphs of %s script for AKRUTI font. Subset of `indian-glyph'."
+ (format "Glyphs of %s script for AKRUTI font. Subset of ‘indian-glyph’."
(capitalize (symbol-name script)))
:short-name (format "AKRUTI %s glyphs" (capitalize (symbol-name script)))
:supplementary-p t
(goto-char pos)
(when (and set-auto-coding-for-load
(re-search-forward re-unibyte tail-end t))
- (display-warning 'mule "`unibyte: t' is obsolete; \
+ (display-warning 'mule "\"unibyte: t\" is obsolete; \
use \"coding: 'raw-text\" instead." :warning)
(setq coding-system 'raw-text))
(when (and (not coding-system)
(describe-minor-mode-completion-table-for-indicator))))
(let* ((minor-mode (lookup-minor-mode-from-indicator indicator))
(mm-fun (or (get minor-mode :minor-mode-function) minor-mode)))
- (unless minor-mode (error "Cannot find minor mode for `%s'" indicator))
+ (unless minor-mode (error "Cannot find minor mode for ‘%s’" indicator))
(let* ((map (cdr-safe (assq minor-mode minor-mode-map-alist)))
(menu (and (keymapp map) (lookup-key map [menu-bar]))))
(setq menu
(let ((match (match-string 3 from)))
(cond
((string= match "\\n")
- (message "Note: `\\n' here doesn't match a newline; to do that, type C-q C-j instead"))
+ (message "Note: ‘\\n’ here doesn't match a newline; to do that, type C-q C-j instead"))
((string= match "\\t")
- (message "Note: `\\t' here doesn't match a tab; to do that, just type TAB")))
+ (message "Note: ‘\\t’ here doesn't match a tab; to do that, just type TAB")))
(sit-for 2)))
(if (not to)
from
(goto-char m)
(recenter line)
(if readonly
- (message "Buffer `%s' is read only." buf)
+ (message "Buffer ‘%s’ is read only." buf)
(delete-region (line-beginning-position) (line-end-position))
(insert text))
(move-to-column col)))))))
;; Don't display regexp if with remaining text
;; it is longer than window-width.
(if (> (+ (length regexp) 42) (window-width))
- "" (format " for `%s'" (query-replace-descr regexp)))))
+ "" (format " for ‘%s’" (query-replace-descr regexp)))))
(setq occur-revert-arguments (list regexp nlines bufs))
(if (= count 0)
(kill-buffer occur-buf)
(cols (nth 1 wsb)))
(cond
((not (memq side '(left right)))
- (error "`left' or `right' expected instead of %S" side))
+ (error "‘left’ or ‘right’ expected instead of %S" side))
((and (eq vtype side) cols))
((eq (frame-parameter nil 'vertical-scroll-bars) side)
;; nil means it's a non-toolkit scroll bar, and its width in
(not executing-kbd-macro)
(where-is-internal function overriding-local-map t))))
(unless (commandp function)
- (error "`%s' is not a valid command name" command-name))
+ (error "‘%s’ is not a valid command name" command-name))
(setq this-command function)
;; Normally `real-this-command' should never be changed, but here we really
;; want to pretend that M-x <cmd> RET is nothing more than a "key
(symbol-name function) typed))))
(when binding
(with-temp-message
- (format "You can run the command `%s' with %s"
+ (format "You can run the command ‘%s’ with %s"
function
(if (stringp binding)
(concat "M-x " binding " RET")
;; but we don't want to ask the question again.
(setq undo-extra-outer-limit (+ size 50000))
(if (let (use-dialog-box track-mouse executing-kbd-macro )
- (yes-or-no-p (format "Buffer `%s' undo info is %d bytes long; discard it? "
+ (yes-or-no-p (format "Buffer ‘%s’ undo info is %d bytes long; discard it? "
(buffer-name) size)))
(progn (setq buffer-undo-list nil)
(setq undo-extra-outer-limit nil)
nil))
(display-warning '(undo discard-info)
(concat
- (format "Buffer `%s' undo info was %d bytes long.\n"
+ (format "Buffer ‘%s’ undo info was %d bytes long.\n"
(buffer-name) size)
"The undo info was discarded because it exceeded \
`undo-outer-limit'.
(format "\
The default mail mode is now Message mode.
You have the following Mail mode variable%s customized:
-\n %s\n\nTo use Mail mode, set `mail-user-agent' to sendmail-user-agent.
-To disable this warning, set `compose-mail-user-agent-warnings' to nil."
+\n %s\n\nTo use Mail mode, set ‘mail-user-agent’ to sendmail-user-agent.
+To disable this warning, set ‘compose-mail-user-agent-warnings’ to nil."
(if (> (length warn-vars) 1) "s" "")
(mapconcat 'symbol-name
warn-vars " "))))))
(t "globally"))))
(val (progn
(when obsolete
- (message (concat "`%S' is obsolete; "
- (if (symbolp obsolete) "use `%S' instead" "%s"))
+ (message (concat "‘%S’ is obsolete; "
+ (if (symbolp obsolete) "use ‘%S’ instead" "%s"))
var obsolete)
(sit-for 3))
(if prop
(require 'cus-edit)
(setq type (widget-convert type))
(unless (widget-apply type :match value)
- (user-error "Value `%S' does not match type %S of %S"
+ (user-error "Value ‘%S’ does not match type %S of %S"
value (car type) variable))))
(if make-local
;; `base-position'. It's difficult to make any use of `base-size',
;; so we just ignore it.
(unless (consp base-position)
- (message "Obsolete `base-size' passed to choose-completion-string")
+ (message "Obsolete ‘base-size’ passed to choose-completion-string")
(setq base-position nil))
(let* ((buffer (or buffer completion-reference-buffer))
`(progn
(defcustom ,varalt-sym nil
- ,(format "Alist of alternative implementations for the `%s' command.
+ ,(format "Alist of alternative implementations for the ‘%s’ command.
Each entry must be a pair (ALTNAME . ALTFUN), where:
ALTNAME - The name shown at user to describe the alternative implementation.
(defvar ,varimp-sym nil "Internal use only.")
(defun ,command (&optional arg)
- ,(format "Run generic command `%s'.
+ ,(format "Run generic command ‘%s’.
If used for the first time, or with interactive ARG, ask the user which
-implementation to use for `%s'. The variable `%s'
+implementation to use for ‘%s’. The variable ‘%s’
contains the list of implementations currently supported for this command."
command-name command-name varalt-name)
(interactive "P")
(when (or arg (null ,varimp-sym))
(let ((val (completing-read
- ,(format "Select implementation for command `%s': "
+ ,(format "Select implementation for command ‘%s’: "
command-name)
,varalt-sym nil t)))
(unless (string-equal val "")
(when (null ,varimp-sym)
(message
- "Use `C-u M-x %s RET' to select another implementation"
+ "Use ‘C-u M-x %s RET’ to select another implementation"
,command-name)
(sit-for 3))
(customize-save-variable ',varimp-sym
(cdr (assoc-string val ,varalt-sym))))))
(if ,varimp-sym
(call-interactively ,varimp-sym)
- (message ,(format "No implementation selected for command `%s'"
+ (message ,(format "No implementation selected for command ‘%s’"
command-name)))))))
\f
:group 'initialization
:initialize #'custom-initialize-default
:set (lambda (_variable _value)
- (error "Customizing `site-run-file' does not work")))
+ (error "Customizing ‘site-run-file’ does not work")))
(make-obsolete-variable 'system-name "use (system-name) instead" "25.1")
(let ((elt (assoc completion tty-long-option-alist)))
;; Check for abbreviated long option.
(or elt
- (error "Option `%s' is ambiguous" argi))
+ (error "Option ‘%s’ is ambiguous" argi))
(setq argi (cdr elt)))
;; Check for a short option.
(setq argval nil
((stringp completion)
(let ((elt (assoc completion longopts)))
(unless elt
- (error "Option `%s' is ambiguous" argi))
+ (error "Option ‘%s’ is ambiguous" argi))
(setq argi (substring (car elt) 1))))
(t
(setq argval nil
(setq done t)))
;; Was argval set but not used?
(and argval
- (error "Option `%s' doesn't allow an argument" argi))))
+ (error "Option ‘%s’ doesn't allow an argument" argi))))
;; Re-attach the --display arg.
(and display-arg (setq args (append display-arg args)))
(not (featurep
(intern
(concat (symbol-name initial-window-system) "-win")))))
- (error "Unsupported window system `%s'" initial-window-system))
+ (error "Unsupported window system ‘%s’" initial-window-system))
;; Process window-system specific command line parameters.
(setq command-line-args
(let ((window-system initial-window-system)) ;Hack attack!
(error
(display-warning
'initialization
- (format "An error occurred while loading `%s':\n\n%s%s%s\n\n\
+ (format "An error occurred while loading ‘%s’:\n\n%s%s%s\n\n\
To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file. Start Emacs with
-the `--debug-init' option to view a complete error backtrace."
+the ‘--debug-init’ option to view a complete error backtrace."
user-init-file
(get (car error) 'error-message)
(if (cdr error) ": " "")
(expand-file-name user-emacs-directory))
(setq warned t)
(display-warning 'initialization
- (format "Your `load-path' seems to contain
-your `.emacs.d' directory: %s\n\
+ (format "Your ‘load-path’ seems to contain
+your ‘.emacs.d’ directory: %s\n\
This is likely to cause problems...\n\
Consider using a subdirectory instead, e.g.: %s"
dir (expand-file-name
(if (stringp completion)
(let ((elt (member completion longopts)))
(or elt
- (error "Option `%s' is ambiguous" argi))
+ (error "Option ‘%s’ is ambiguous" argi))
(setq argi (substring (car elt) 1)))
(setq argval nil
argi orig-argi)))))
(setq inhibit-startup-screen t)
(setq tem (or argval (pop command-line-args-left)))
(or (stringp tem)
- (error "File name omitted from `-insert' option"))
+ (error "File name omitted from ‘-insert’ option"))
(insert-file-contents (command-line-normalize-file-name tem)))
((equal argi "-kill")
;; An explicit option to specify visiting a file.
(setq tem (or argval (pop command-line-args-left)))
(unless (stringp tem)
- (error "File name omitted from `%s' option" argi))
+ (error "File name omitted from ‘%s’ option" argi))
(funcall process-file-arg tem))
;; These command lines now have no effect.
(unless did-hook
;; Presume that the argument is a file name.
(if (string-match "\\`-" argi)
- (error "Unknown option `%s'" argi))
+ (error "Unknown option ‘%s’" argi))
;; FIXME: Why do we only inhibit the startup
;; screen for -nw?
(unless initial-window-system
If FORM does return, signal an error."
(declare (debug t))
`(prog1 ,form
- (error "Form marked with `noreturn' did return")))
+ (error "Form marked with ‘noreturn’ did return")))
(defmacro 1value (form)
"Evaluate FORM, expecting a constant return value.
(mapcar (lambda (parent)
(cons parent
(or (get parent 'error-conditions)
- (error "Unknown signal `%s'" parent))))
+ (error "Unknown signal ‘%s’" parent))))
parent))
(cons parent (get parent 'error-conditions)))))
(put name 'error-conditions
exp
(let* ((sym (cadr list-var))
(append (eval append))
- (msg (format "`add-to-list' can't use lexical var `%s'; use `push' or `cl-pushnew'"
+ (msg (format "‘add-to-list’ can't use lexical var ‘%s’; use ‘push’ or ‘cl-pushnew’"
sym))
;; Big ugly hack so we only output a warning during
;; byte-compilation, and so we can use
If optional argument INHIBIT-KEYBOARD-QUIT is non-nil, ignore
keyboard-quit events while waiting for a valid input."
(unless (consp chars)
- (error "Called `read-char-choice' without valid char choices"))
+ (error "Called ‘read-char-choice’ without valid char choices"))
(let (char done show-help (helpbuf " *Char Help*"))
(let ((cursor-in-echo-area t)
(executing-kbd-macro executing-kbd-macro)
;; Handle the -xrm option.
(defun x-handle-xrm-switch (switch)
(unless (consp x-invocation-args)
- (error "%s: missing argument to `%s' option" (invocation-name) switch))
+ (error "%s: missing argument to ‘%s’ option" (invocation-name) switch))
(setq x-command-line-resources
(if (null x-command-line-resources)
(pop x-invocation-args)
;; the initial frame, too.
(defun x-handle-name-switch (switch)
(or (consp x-invocation-args)
- (error "%s: missing argument to `%s' option" (invocation-name) switch))
+ (error "%s: missing argument to ‘%s’ option" (invocation-name) switch))
(setq x-resource-name (pop x-invocation-args)
initial-frame-alist (cons (cons 'name x-resource-name)
initial-frame-alist)))
(let ((elt (assoc completion option-alist)))
;; Check for abbreviated long option.
(or elt
- (error "Option `%s' is ambiguous" this-switch))
+ (error "Option ‘%s’ is ambiguous" this-switch))
(setq this-switch completion))))))
(setq aelt (assoc this-switch option-alist))
(if aelt (setq handler (nth 2 aelt)))
;; Handle the --parent-id option.
(defun x-handle-parent-id (switch)
(or (consp x-invocation-args)
- (error "%s: missing argument to `%s' option" (invocation-name) switch))
+ (error "%s: missing argument to ‘%s’ option" (invocation-name) switch))
(setq initial-frame-alist (cons
(cons 'parent-id
(string-to-number (car x-invocation-args)))
;; to give us back our session id we had on the previous run.
(defun x-handle-smid (switch)
(or (consp x-invocation-args)
- (error "%s: missing argument to `%s' option" (invocation-name) switch))
+ (error "%s: missing argument to ‘%s’ option" (invocation-name) switch))
(setq x-session-previous-id (car x-invocation-args)
x-invocation-args (cdr x-invocation-args)))