Thank you for your checking. >> BTW, about save-match-data, I used it because of inhibiting changing old >> match data. Using it is wrong (as the style)? > > save-match-data should only be used where it is really needed, not > defensively: 99% of the code may destroy the match-date (and could thus > use save-match-data defensively), whereas less than 1% of the code needs > the match-data to be saved. > I understand you. I will be carefull about using `save-match-data' from now on. >> - (and (eq cmd0 'quote) (string= cmd1 "mdtm"))) >> + (and (eq cmd0 'quote) (string-match-p "^\\(mdtm\\|size\\)$" cmd1))) > > I used (member cmd1 '("mdtm" "size")) instead. The regexp equivalent > would be "\\`\\(mdtm\\|size\\)\\'". > I also think it is better. >> + (res (prog2 >> + (unless ascii-mode >> + (ange-ftp-set-binary-mode host user)) >> + (ange-ftp-send-cmd host user (list 'quote "size" name)) >> + (unless ascii-mode >> + (ange-ftp-set-ascii-mode host user)))) > > Now that I look at it: isn't it problematic to set the mode to `ascii' > here? If the mode was binary before and we call it with ascii-mode=nil, > we end up switching to ascii mode unwittingly, don't we? > I read the code of `ange-ftp.el'. The follows is written... In comments: By default ange-ftp transfers files in ASCII mode. In code: (defun ange-ftp-... ... (unwind-protect (progn ... (if binary (ange-ftp-set-binary-mode host user)) ...) (if binary (ange-ftp-set-ascii-mode host user))) ...) So, I understood that `ASCII mode' is basic mode. I wrote after the style. (In my former patch, I should have used `unwind-protect'.) But, as you wrote, there is no guarantee that the mode is always ascii. So, I wrote the mode changing clearly. > > Stefan > Would you like to check my patch again ?