using straight apostrophes @t{'like this'} or double-quotes @t{"like
this"}. Another common way is the curved quote convention, which uses
left and right single or double quotation marks @t{‘like this’} or
-@t{“like this”}. Typewriter quotes are simple and portable; curved
-quotes are less ambiguous and typically look nicer.
+@t{“like this”}. In text files, typewriter quotes are simple and
+portable; curved quotes are less ambiguous and typically look nicer.
Electric Quote mode makes it easier to type curved quotes. As you
type characters it optionally converts @t{`} to @t{‘}, @t{'} to @t{’},
-@c -*-texinfo-*-
+@c -*- mode: texinfo; coding: utf-8 -*-
@c This is part of the GNU Emacs Lisp Reference Manual.
@c Copyright (C) 1990-1995, 1998-1999, 2001-2015 Free Software
@c Foundation, Inc.
@end group
@group
-(error "You have committed %d errors" 10)
- @error{} You have committed 10 errors
+(error "Invalid name `%s'" "A%%B")
+ @error{} Invalid name ‘A%%B’
@end group
@end example
error symbol @code{error}, and a list containing the string returned by
@code{format-message}.
+In a format string containing single quotes, curved quotes @t{‘like
+this’} and grave quotes @t{`like this'} work better than straight
+quotes @t{'like this'}, as @code{error} typically formats every
+straight quote as a curved closing quote.
+
@strong{Warning:} If you want to use your own string as an error message
verbatim, don't just write @code{(error @var{string})}. If @var{string}
-contains @samp{%}, it will be interpreted as a format specifier, with
-undesirable results. Instead, use @code{(error "%s" @var{string})}.
+@var{string} contains @samp{%}, @samp{`}, or @samp{'} it may be
+reformatted, with undesirable results. Instead, use @code{(error "%s"
+@var{string})}.
@end defun
@defun signal error-symbol data
-@c -*-texinfo-*-
+@c -*- mode: texinfo; coding: utf-8 -*-
@c This is part of the GNU Emacs Lisp Reference Manual.
@c Copyright (C) 1990-1995, 1998-2015 Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
The string is also added to the @file{*Messages*} buffer, but without
text properties (@pxref{Logging Messages}).
+In a format string containing single quotes, curved quotes @t{‘like
+this’} and grave quotes @t{`like this'} work better than straight
+quotes @t{'like this'}, as @code{message} typically formats every
+straight quote as a curved closing quote.
+
In batch mode, the message is printed to the standard error stream,
followed by a newline.
@example
@group
-(message "Minibuffer depth is %d."
- (minibuffer-depth))
- @print{} Minibuffer depth is 0.
-@result{} "Minibuffer depth is 0."
+(message "Reverting `%s'..." (buffer-name))
+ @print{} Reverting ‘subr.el’...
+@result{} "Reverting ‘subr.el’..."
@end group
@group
---------- Echo Area ----------
-Minibuffer depth is 0.
+Reverting ‘subr.el’...
---------- Echo Area ----------
@end group
@end example
To automatically display a message in the echo area or in a pop-buffer,
depending on its size, use @code{display-message-or-buffer} (see below).
+
+@strong{Warning:} If you want to use your own string as a message
+verbatim, don't just write @code{(message @var{string})}. If
+@var{string} contains @samp{%}, @samp{`}, or @samp{'} it may be
+reformatted, with undesirable results. Instead, use @code{(message
+"%s" @var{string})}.
@end defun
@defvar inhibit-message
(insert (overload-docstring-extension symbol) "\n\n")
(insert (format-message "default function: `%s'\n" default))
(if override
- (insert (format-message "\noverride in buffer '%s': `%s'\n"
+ (insert (format-message "\noverride in buffer `%s': `%s'\n"
describe-function-orig-buffer override))
- (insert (format-message "\nno override in buffer '%s'\n"
+ (insert (format-message "\nno override in buffer `%s'\n"
describe-function-orig-buffer)))
(mapatoms
(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.
;;; (with-syntax-table emacs-lisp-mode-syntax-table
;;; (elint-update-env))
;;; (setq env (elint-env-add-env env elint-buffer-env))))
- ;;(message "Elint processed (require '%s)" name))
+ ;;(message "%s" (format "Elint processed (require '%s)" name))
(error "%s.el not found in load-path" libname)))
(error
(message "Can't get variables from require'd library %s: %s"
(cond ((symbolp load)
(condition-case cause (require load)
(error
- (info-xref-output "Symbol `%s': cannot require '%s: %s"
+ (info-xref-output "Symbol `%s': cannot require `%s': %s"
symbol load cause))))
;; skip if previously loaded
((assoc load load-history))
(regexp-quote (system-name)))
from))
(not (yes-or-no-p
- (format "Is '%s' really your email address? " from)))
+ (format-message "Is `%s' really your email address? "
+ from)))
(error "Please edit the From address and try again"))))))
actual printing for the \\[mh-print-msg] command. The string can
contain one escape, \"%s\", which is replaced by the name of the
folder and the message number and is useful for print job names.
-I use \"mpage -h'%s' -b Letter -H1of -mlrtb -P\" which produces a
+I use \"mpage -h\\='%s\\=' -b Letter -H1of -mlrtb -P\" which produces a
nice header and adds a bit of margin so the text fits within my
printer's margins.
-This options is not used by the commands \\[mh-ps-print-msg] or
+This option is not used by the commands \\[mh-ps-print-msg] or
\\[mh-ps-print-msg-file]."
:type 'string
:group 'mh-show
"Return propertized copy of string TAG.
Optional argument NUM-NEW is used for choosing face, other
arguments NT-ID, FEED, and VFEED are added as properties."
- ;;(message "newsticker--treeview-propertize-tag '%s' %s" feed nt-id)
+ ;;(message "newsticker--treeview-propertize-tag `%s' %s" feed nt-id)
(let ((face 'newsticker-treeview-face)
(map (make-sparse-keymap)))
(if (and num-new (> num-new 0))