aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2017-03-04 23:14:51 -0800
committerPaul Eggert2017-03-04 23:18:38 -0800
commit1af7410a2333fdadc68edb9d4890434d75ebaf5e (patch)
treee3cc6ad378b766ca413ea6d4bda3d9331da648ff /src
parentdf0276b62f3df57cde3c049ca613a366c675209b (diff)
downloademacs-1af7410a2333fdadc68edb9d4890434d75ebaf5e.tar.gz
emacs-1af7410a2333fdadc68edb9d4890434d75ebaf5e.zip
* src/editfns.c (styled_format): Omit unnecessary code for "%0d" etc.
Diffstat (limited to 'src')
-rw-r--r--src/editfns.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/editfns.c b/src/editfns.c
index d50ea83141b..db9ad066909 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -4270,16 +4270,15 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
4270 /* Create the copy of the conversion specification, with 4270 /* Create the copy of the conversion specification, with
4271 any width and precision removed, with ".*" inserted, 4271 any width and precision removed, with ".*" inserted,
4272 and with pM inserted for integer formats. 4272 and with pM inserted for integer formats.
4273 At most three flags F can be specified at once. */ 4273 At most two flags F can be specified at once. */
4274 char convspec[sizeof "%FFF.*d" + pMlen]; 4274 char convspec[sizeof "%FF.*d" + pMlen];
4275 { 4275 {
4276 char *f = convspec; 4276 char *f = convspec;
4277 *f++ = '%'; 4277 *f++ = '%';
4278 /* MINUS_FLAG is dealt with later. */ 4278 /* MINUS_FLAG and ZERO_FLAG are dealt with later. */
4279 *f = '+'; f += plus_flag; 4279 *f = '+'; f += plus_flag;
4280 *f = ' '; f += space_flag; 4280 *f = ' '; f += space_flag;
4281 *f = '#'; f += sharp_flag; 4281 *f = '#'; f += sharp_flag;
4282 *f = '0'; f += zero_flag;
4283 *f++ = '.'; 4282 *f++ = '.';
4284 *f++ = '*'; 4283 *f++ = '*';
4285 if (conversion == 'd' || conversion == 'i' 4284 if (conversion == 'd' || conversion == 'i'