diff options
| author | Paul Eggert | 2015-08-18 23:04:58 -0700 |
|---|---|---|
| committer | Paul Eggert | 2015-08-18 23:14:08 -0700 |
| commit | 67de1b6fa752df913ae00537234d1a18bca2543f (patch) | |
| tree | abb61f8f7eed292dbcc61ebca1b912ade02dde4b /doc | |
| parent | 85bc107458601e305445d7ec6f5b209c01f5db0c (diff) | |
| download | emacs-67de1b6fa752df913ae00537234d1a18bca2543f.tar.gz emacs-67de1b6fa752df913ae00537234d1a18bca2543f.zip | |
New q flag for ‘format’
* doc/lispref/processes.texi (Sentinels):
Don't hardwire grave quoting style in example.
* doc/lispref/strings.texi (Formatting Strings):
* etc/NEWS:
Document new q flag.
* src/editfns.c (Fformat): Implement it.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/processes.texi | 4 | ||||
| -rw-r--r-- | doc/lispref/strings.texi | 9 |
2 files changed, 8 insertions, 5 deletions
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 2bc6a1843c4..98b3dfb9e3a 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi | |||
| @@ -1720,13 +1720,13 @@ sentinel, the eventual call to the sentinel will use the new one. | |||
| 1720 | @group | 1720 | @group |
| 1721 | (defun msg-me (process event) | 1721 | (defun msg-me (process event) |
| 1722 | (princ | 1722 | (princ |
| 1723 | (format "Process: %s had the event `%s'" process event))) | 1723 | (format "Process: %s had the event ‘%s’" process event))) |
| 1724 | (set-process-sentinel (get-process "shell") 'msg-me) | 1724 | (set-process-sentinel (get-process "shell") 'msg-me) |
| 1725 | @result{} msg-me | 1725 | @result{} msg-me |
| 1726 | @end group | 1726 | @end group |
| 1727 | @group | 1727 | @group |
| 1728 | (kill-process (get-process "shell")) | 1728 | (kill-process (get-process "shell")) |
| 1729 | @print{} Process: #<process shell> had the event `killed' | 1729 | @print{} Process: #<process shell> had the event ‘killed’ |
| 1730 | @result{} #<process shell> | 1730 | @result{} #<process shell> |
| 1731 | @end group | 1731 | @end group |
| 1732 | @end smallexample | 1732 | @end smallexample |
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index 30933387b20..8de1473b83d 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi | |||
| @@ -936,7 +936,7 @@ where curved single quotes stand for themselves: | |||
| 936 | (format "The name of this buffer is ‘%s’." (buffer-name)) | 936 | (format "The name of this buffer is ‘%s’." (buffer-name)) |
| 937 | @result{} "The name of this buffer is ‘strings.texi’." | 937 | @result{} "The name of this buffer is ‘strings.texi’." |
| 938 | 938 | ||
| 939 | (format "The buffer object prints as ‘%s’." (current-buffer)) | 939 | (format "The buffer object prints as %qs." (current-buffer)) |
| 940 | @result{} "The buffer object prints as ‘strings.texi’." | 940 | @result{} "The buffer object prints as ‘strings.texi’." |
| 941 | 941 | ||
| 942 | (format "The octal value of %d is %o, | 942 | (format "The octal value of %d is %o, |
| @@ -1011,13 +1011,16 @@ specifier, if any, to be inserted on the right rather than the left. | |||
| 1011 | If both @samp{-} and @samp{0} are present, the @samp{0} flag is | 1011 | If both @samp{-} and @samp{0} are present, the @samp{0} flag is |
| 1012 | ignored. | 1012 | ignored. |
| 1013 | 1013 | ||
| 1014 | The flag @samp{q} quotes the printed representation as per the | ||
| 1015 | variable @samp{text-quoting-style} described below. | ||
| 1016 | |||
| 1014 | @example | 1017 | @example |
| 1015 | @group | 1018 | @group |
| 1016 | (format "%06d is padded on the left with zeros" 123) | 1019 | (format "%06d is padded on the left with zeros" 123) |
| 1017 | @result{} "000123 is padded on the left with zeros" | 1020 | @result{} "000123 is padded on the left with zeros" |
| 1018 | 1021 | ||
| 1019 | (format "%-6d is padded on the right" 123) | 1022 | (format "%q-6d is padded on the right" 123) |
| 1020 | @result{} "123 is padded on the right" | 1023 | @result{} "‘123 ’ is padded on the right" |
| 1021 | 1024 | ||
| 1022 | (format "The word ‘%-7s’ actually has %d letters in it." | 1025 | (format "The word ‘%-7s’ actually has %d letters in it." |
| 1023 | "foo" (length "foo")) | 1026 | "foo" (length "foo")) |