(if (or (eq visit t)
(eq visit nil)
(stringp visit))
- (message "Wrote %d characters to `%s'" (- end start) buffer-file-name))))
+ (message "Wrote %d characters to `%s'"
+ (cond ((null start) (buffer-size))
+ ((stringp start) (length start))
+ (t (- end start)))
+ buffer-file-name))))
(put 'write-region 'epa-file 'epa-file-write-region)
(defun epa-file-select-keys ()
(and (or (eq visit t)
(eq visit nil)
(stringp visit))
- (message "Wrote %d characters to `%s'" (- end start) visit-file))
+ (message "Wrote %d characters to `%s'"
+ (cond ((null start) (buffer-size))
+ ((stringp start) (length start))
+ (t (- end start)))
+ visit-file))
;; ensure `last-coding-system-used' has an appropriate value
(setq last-coding-system-used coding-system-used)
(set-buffer-modified-p nil)))
;; ensure `last-coding-system-used' has an appropriate value
(setq last-coding-system-used coding-system-used)
- (ange-ftp-message "Wrote %d characters to `%s'" (- end start) abbr)
+ (ange-ftp-message "Wrote %d characters to `%s'"
+ (cond ((null start) (buffer-size))
+ ((stringp start) (length start))
+ (t (- end start)))
+ abbr)
(ange-ftp-add-file-entry filename))
(ange-ftp-real-write-region start end filename append visit))))
;; The end.
(when (or (eq visit t) (null visit) (stringp visit))
- (tramp-message v 0 "Wrote %d characters to `%s'" (- end start) filename))
+ (tramp-message v 0 "Wrote %d characters to `%s'"
+ (cond ((null start) (buffer-size))
+ ((stringp start) (length start))
+ (t (- end start)))
+ filename))
(run-hooks 'tramp-handle-write-region-hook)))
\f
(tramp-set-file-uid-gid filename uid gid))
(when (or (eq visit t) (null visit) (stringp visit))
(tramp-message v 0 "Wrote %d characters to `%s'"
- (- end start) filename))
+ (cond ((null start) (buffer-size))
+ ((stringp start) (length start))
+ (t (- end start)))
+ filename))
(run-hooks 'tramp-handle-write-region-hook)))))
(defvar tramp-vc-registered-file-names nil
? "Added %d characters to `%s'"
: "Wrote %d characters to `%s'");
CALLN (Fmessage, format,
- make_number (XINT (end) - XINT (start)),
+ (STRINGP (start) ? Flength (start)
+ : make_number (XINT (end) - XINT (start))),
visit_file);
}
return Qnil;