aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2015-10-01 21:42:53 -0700
committerPaul Eggert2015-10-01 21:44:35 -0700
commitdd6346e00c0910b16f1bd195e5e94f6ac1d696ee (patch)
treeb8fa1dbed8b583dc0e7a6441757f2354532d128e
parent6083f333ed38aa65f1d0a4c2bd7505a29e887444 (diff)
downloademacs-dd6346e00c0910b16f1bd195e5e94f6ac1d696ee.tar.gz
emacs-dd6346e00c0910b16f1bd195e5e94f6ac1d696ee.zip
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.
-rw-r--r--doc/emacs/text.texi4
-rw-r--r--doc/lispref/control.texi16
-rw-r--r--doc/lispref/display.texi22
-rw-r--r--lisp/cedet/mode-local.el4
-rw-r--r--lisp/emacs-lisp/bytecomp.el2
-rw-r--r--lisp/emacs-lisp/elint.el2
-rw-r--r--lisp/info-xref.el2
-rw-r--r--lisp/mail/emacsbug.el3
-rw-r--r--lisp/mh-e/mh-e.el4
-rw-r--r--lisp/net/newst-treeview.el2
10 files changed, 39 insertions, 22 deletions
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi
index 7f3afd71d5b..bab660e1e10 100644
--- a/doc/emacs/text.texi
+++ b/doc/emacs/text.texi
@@ -417,8 +417,8 @@ beginning of a line.
417using straight apostrophes @t{'like this'} or double-quotes @t{"like 417using straight apostrophes @t{'like this'} or double-quotes @t{"like
418this"}. Another common way is the curved quote convention, which uses 418this"}. Another common way is the curved quote convention, which uses
419left and right single or double quotation marks @t{‘like this’} or 419left and right single or double quotation marks @t{‘like this’} or
420@t{“like this”}. Typewriter quotes are simple and portable; curved 420@t{“like this”}. In text files, typewriter quotes are simple and
421quotes are less ambiguous and typically look nicer. 421portable; curved quotes are less ambiguous and typically look nicer.
422 422
423 Electric Quote mode makes it easier to type curved quotes. As you 423 Electric Quote mode makes it easier to type curved quotes. As you
424type characters it optionally converts @t{`} to @t{‘}, @t{'} to @t{’}, 424type characters it optionally converts @t{`} to @t{‘}, @t{'} to @t{’},
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi
index fca16da5d3f..412903f8fbc 100644
--- a/doc/lispref/control.texi
+++ b/doc/lispref/control.texi
@@ -1,4 +1,4 @@
1@c -*-texinfo-*- 1@c -*- mode: texinfo; coding: utf-8 -*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1995, 1998-1999, 2001-2015 Free Software 3@c Copyright (C) 1990-1995, 1998-1999, 2001-2015 Free Software
4@c Foundation, Inc. 4@c Foundation, Inc.
@@ -1002,8 +1002,8 @@ These examples show typical uses of @code{error}:
1002@end group 1002@end group
1003 1003
1004@group 1004@group
1005(error "You have committed %d errors" 10) 1005(error "Invalid name `%s'" "A%%B")
1006 @error{} You have committed 10 errors 1006 @error{} Invalid name ‘A%%B’
1007@end group 1007@end group
1008@end example 1008@end example
1009 1009
@@ -1011,10 +1011,16 @@ These examples show typical uses of @code{error}:
1011error symbol @code{error}, and a list containing the string returned by 1011error symbol @code{error}, and a list containing the string returned by
1012@code{format-message}. 1012@code{format-message}.
1013 1013
1014In a format string containing single quotes, curved quotes @t{‘like
1015this’} and grave quotes @t{`like this'} work better than straight
1016quotes @t{'like this'}, as @code{error} typically formats every
1017straight quote as a curved closing quote.
1018
1014@strong{Warning:} If you want to use your own string as an error message 1019@strong{Warning:} If you want to use your own string as an error message
1015verbatim, don't just write @code{(error @var{string})}. If @var{string} 1020verbatim, don't just write @code{(error @var{string})}. If @var{string}
1016contains @samp{%}, it will be interpreted as a format specifier, with 1021@var{string} contains @samp{%}, @samp{`}, or @samp{'} it may be
1017undesirable results. Instead, use @code{(error "%s" @var{string})}. 1022reformatted, with undesirable results. Instead, use @code{(error "%s"
1023@var{string})}.
1018@end defun 1024@end defun
1019 1025
1020@defun signal error-symbol data 1026@defun signal error-symbol data
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 452462adcfc..ad248b116ed 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -1,4 +1,4 @@
1@c -*-texinfo-*- 1@c -*- mode: texinfo; coding: utf-8 -*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1995, 1998-2015 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1995, 1998-2015 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
@@ -254,6 +254,11 @@ properties, it is displayed with the specified faces (@pxref{Faces}).
254The string is also added to the @file{*Messages*} buffer, but without 254The string is also added to the @file{*Messages*} buffer, but without
255text properties (@pxref{Logging Messages}). 255text properties (@pxref{Logging Messages}).
256 256
257In a format string containing single quotes, curved quotes @t{‘like
258this’} and grave quotes @t{`like this'} work better than straight
259quotes @t{'like this'}, as @code{message} typically formats every
260straight quote as a curved closing quote.
261
257In batch mode, the message is printed to the standard error stream, 262In batch mode, the message is printed to the standard error stream,
258followed by a newline. 263followed by a newline.
259 264
@@ -268,21 +273,26 @@ onto the screen immediately.
268 273
269@example 274@example
270@group 275@group
271(message "Minibuffer depth is %d." 276(message "Reverting `%s'..." (buffer-name))
272 (minibuffer-depth)) 277 @print{} Reverting ‘subr.el’...
273 @print{} Minibuffer depth is 0. 278@result{} "Reverting ‘subr.el’..."
274@result{} "Minibuffer depth is 0."
275@end group 279@end group
276 280
277@group 281@group
278---------- Echo Area ---------- 282---------- Echo Area ----------
279Minibuffer depth is 0. 283Reverting ‘subr.el’...
280---------- Echo Area ---------- 284---------- Echo Area ----------
281@end group 285@end group
282@end example 286@end example
283 287
284To automatically display a message in the echo area or in a pop-buffer, 288To automatically display a message in the echo area or in a pop-buffer,
285depending on its size, use @code{display-message-or-buffer} (see below). 289depending on its size, use @code{display-message-or-buffer} (see below).
290
291@strong{Warning:} If you want to use your own string as a message
292verbatim, don't just write @code{(message @var{string})}. If
293@var{string} contains @samp{%}, @samp{`}, or @samp{'} it may be
294reformatted, with undesirable results. Instead, use @code{(message
295"%s" @var{string})}.
286@end defun 296@end defun
287 297
288@defvar inhibit-message 298@defvar inhibit-message
diff --git a/lisp/cedet/mode-local.el b/lisp/cedet/mode-local.el
index 8736a4ff93c..b5995ffa397 100644
--- a/lisp/cedet/mode-local.el
+++ b/lisp/cedet/mode-local.el
@@ -644,9 +644,9 @@ SYMBOL is a function that can be overridden."
644 (insert (overload-docstring-extension symbol) "\n\n") 644 (insert (overload-docstring-extension symbol) "\n\n")
645 (insert (format-message "default function: `%s'\n" default)) 645 (insert (format-message "default function: `%s'\n" default))
646 (if override 646 (if override
647 (insert (format-message "\noverride in buffer '%s': `%s'\n" 647 (insert (format-message "\noverride in buffer `%s': `%s'\n"
648 describe-function-orig-buffer override)) 648 describe-function-orig-buffer override))
649 (insert (format-message "\nno override in buffer '%s'\n" 649 (insert (format-message "\nno override in buffer `%s'\n"
650 describe-function-orig-buffer))) 650 describe-function-orig-buffer)))
651 651
652 (mapatoms 652 (mapatoms
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 8699af60ea8..6f7ba3353f6 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -2015,7 +2015,7 @@ and will be removed soon. See (elisp)Backquote in the manual."))
2015 (format " (string-lessp emacs-version \"%s\")\n" minimum-version) 2015 (format " (string-lessp emacs-version \"%s\")\n" minimum-version)
2016 ;; Because the header must fit in a fixed width, we cannot 2016 ;; Because the header must fit in a fixed width, we cannot
2017 ;; insert arbitrary-length file names (Bug#11585). 2017 ;; insert arbitrary-length file names (Bug#11585).
2018 " (error \"'%s' was compiled for " 2018 " (error \"`%s' was compiled for "
2019 (format "Emacs %s or later\" #$))\n\n" minimum-version)) 2019 (format "Emacs %s or later\" #$))\n\n" minimum-version))
2020 ;; Now compensate for any change in size, to make sure all 2020 ;; Now compensate for any change in size, to make sure all
2021 ;; positions in the file remain valid. 2021 ;; positions in the file remain valid.
diff --git a/lisp/emacs-lisp/elint.el b/lisp/emacs-lisp/elint.el
index 86ac33c2600..64d65c05902 100644
--- a/lisp/emacs-lisp/elint.el
+++ b/lisp/emacs-lisp/elint.el
@@ -520,7 +520,7 @@ Return nil if there are no more forms, t otherwise."
520 ;;; (with-syntax-table emacs-lisp-mode-syntax-table 520 ;;; (with-syntax-table emacs-lisp-mode-syntax-table
521 ;;; (elint-update-env)) 521 ;;; (elint-update-env))
522 ;;; (setq env (elint-env-add-env env elint-buffer-env)))) 522 ;;; (setq env (elint-env-add-env env elint-buffer-env))))
523 ;;(message "Elint processed (require '%s)" name)) 523 ;;(message "%s" (format "Elint processed (require '%s)" name))
524 (error "%s.el not found in load-path" libname))) 524 (error "%s.el not found in load-path" libname)))
525 (error 525 (error
526 (message "Can't get variables from require'd library %s: %s" 526 (message "Can't get variables from require'd library %s: %s"
diff --git a/lisp/info-xref.el b/lisp/info-xref.el
index 2b81efa178e..fcdf5323db7 100644
--- a/lisp/info-xref.el
+++ b/lisp/info-xref.el
@@ -454,7 +454,7 @@ and can take a long time."
454 (cond ((symbolp load) 454 (cond ((symbolp load)
455 (condition-case cause (require load) 455 (condition-case cause (require load)
456 (error 456 (error
457 (info-xref-output "Symbol `%s': cannot require '%s: %s" 457 (info-xref-output "Symbol `%s': cannot require `%s': %s"
458 symbol load cause)))) 458 symbol load cause))))
459 ;; skip if previously loaded 459 ;; skip if previously loaded
460 ((assoc load load-history)) 460 ((assoc load load-history))
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index f54893fb4be..8e28973c43f 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -417,7 +417,8 @@ and send the mail again%s."
417 (regexp-quote (system-name))) 417 (regexp-quote (system-name)))
418 from)) 418 from))
419 (not (yes-or-no-p 419 (not (yes-or-no-p
420 (format "Is '%s' really your email address? " from))) 420 (format-message "Is `%s' really your email address? "
421 from)))
421 (error "Please edit the From address and try again")))))) 422 (error "Please edit the From address and try again"))))))
422 423
423 424
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el
index 96fe7d797c2..c757920ef29 100644
--- a/lisp/mh-e/mh-e.el
+++ b/lisp/mh-e/mh-e.el
@@ -2901,11 +2901,11 @@ This option contains the Unix command line which performs the
2901actual printing for the \\[mh-print-msg] command. The string can 2901actual printing for the \\[mh-print-msg] command. The string can
2902contain one escape, \"%s\", which is replaced by the name of the 2902contain one escape, \"%s\", which is replaced by the name of the
2903folder and the message number and is useful for print job names. 2903folder and the message number and is useful for print job names.
2904I use \"mpage -h'%s' -b Letter -H1of -mlrtb -P\" which produces a 2904I use \"mpage -h\\='%s\\=' -b Letter -H1of -mlrtb -P\" which produces a
2905nice header and adds a bit of margin so the text fits within my 2905nice header and adds a bit of margin so the text fits within my
2906printer's margins. 2906printer's margins.
2907 2907
2908This options is not used by the commands \\[mh-ps-print-msg] or 2908This option is not used by the commands \\[mh-ps-print-msg] or
2909\\[mh-ps-print-msg-file]." 2909\\[mh-ps-print-msg-file]."
2910 :type 'string 2910 :type 'string
2911 :group 'mh-show 2911 :group 'mh-show
diff --git a/lisp/net/newst-treeview.el b/lisp/net/newst-treeview.el
index 4eef5809233..0c2df8897d7 100644
--- a/lisp/net/newst-treeview.el
+++ b/lisp/net/newst-treeview.el
@@ -940,7 +940,7 @@ Optional arguments CHANGED-WIDGET and EVENT are ignored."
940 "Return propertized copy of string TAG. 940 "Return propertized copy of string TAG.
941Optional argument NUM-NEW is used for choosing face, other 941Optional argument NUM-NEW is used for choosing face, other
942arguments NT-ID, FEED, and VFEED are added as properties." 942arguments NT-ID, FEED, and VFEED are added as properties."
943 ;;(message "newsticker--treeview-propertize-tag '%s' %s" feed nt-id) 943 ;;(message "newsticker--treeview-propertize-tag `%s' %s" feed nt-id)
944 (let ((face 'newsticker-treeview-face) 944 (let ((face 'newsticker-treeview-face)
945 (map (make-sparse-keymap))) 945 (map (make-sparse-keymap)))
946 (if (and num-new (> num-new 0)) 946 (if (and num-new (> num-new 0))