]> code.delx.au - gnu-emacs/blobdiff - src/editfns.c
Fix so top -10 and left -10 in frame parameters work.
[gnu-emacs] / src / editfns.c
index 00ac0ca0fa99ff574ea01f7c2362c2ae535aac17..9f30ea064112dce661400b18b070b57bd39a7c14 100644 (file)
@@ -1897,7 +1897,7 @@ usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE)  */)
 }
 
 DEFUN ("current-time-string", Fcurrent_time_string, Scurrent_time_string, 0, 1, 0,
-       doc: /* Return the current time, as a human-readable string.
+       doc: /* Return the current local time, as a human-readable string.
 Programs can use this function to decode a time,
 since the number of columns in each field is fixed
 if the year is in the range 1000-9999.
@@ -3782,7 +3782,11 @@ usage: (format STRING &rest OBJECTS)  */)
               to be as large as is calculated here.  Easy check for
               the case PRECISION = 0. */
            thissize = precision[n] ? CONVERTED_BYTE_SIZE (multibyte, args[n]) : 0;
+           /* The precision also constrains how much of the argument
+              string will finally appear (Bug#5710). */
            actual_width = lisp_string_width (args[n], -1, NULL, NULL);
+           if (precision[n] != -1)
+             actual_width = min(actual_width,precision[n]);
          }
        /* Would get MPV otherwise, since Lisp_Int's `point' to low memory.  */
        else if (INTEGERP (args[n]) && *format != 's')