Fix a few problems with directed quotes

This is in response to a problem report by Kaushal Modi in:
http://bugs.gnu.org/21588#25
* lisp/cedet/mode-local.el (describe-mode-local-overload):
* lisp/emacs-lisp/bytecomp.el (byte-compile-fix-header):
* lisp/info-xref.el (info-xref-check-all-custom):
* lisp/mail/emacsbug.el (report-emacs-bug-hook):
Prefer directed to undirected single quotes in diagnostics.
This commit is contained in:
Paul Eggert 2015-10-01 21:42:53 -07:00
parent 6083f333ed
commit dd6346e00c
10 changed files with 39 additions and 22 deletions

View file

@ -417,8 +417,8 @@ beginning of a line.
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{},

View file

@ -1,4 +1,4 @@
@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.
@ -1002,8 +1002,8 @@ These examples show typical uses of @code{error}:
@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
@ -1011,10 +1011,16 @@ These examples show typical uses of @code{error}:
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

View file

@ -1,4 +1,4 @@
@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.
@ -254,6 +254,11 @@ properties, it is displayed with the specified faces (@pxref{Faces}).
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.
@ -268,21 +273,26 @@ onto the screen immediately.
@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

View file

@ -644,9 +644,9 @@ SYMBOL is a function that can be overridden."
(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

View file

@ -2015,7 +2015,7 @@ and will be removed soon. See (elisp)Backquote in the manual."))
(format " (string-lessp emacs-version \"%s\")\n" minimum-version)
;; Because the header must fit in a fixed width, we cannot
;; insert arbitrary-length file names (Bug#11585).
" (error \"'%s' was compiled for "
" (error \"`%s' was compiled for "
(format "Emacs %s or later\" #$))\n\n" minimum-version))
;; Now compensate for any change in size, to make sure all
;; positions in the file remain valid.

View file

@ -520,7 +520,7 @@ Return nil if there are no more forms, t otherwise."
;;; (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"

View file

@ -454,7 +454,7 @@ and can take a long time."
(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))

View file

@ -417,7 +417,8 @@ and send the mail again%s."
(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"))))))

View file

@ -2901,11 +2901,11 @@ This option contains the Unix command line which performs the
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

View file

@ -940,7 +940,7 @@ Optional arguments CHANGED-WIDGET and EVENT are ignored."
"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))