Запись блока в комментированный файл
(defun ru-block-write-with-comment
(file_name
comment
base_point
selection
is_ask_rewrite
/
file_info_list
rewrite
)
(if (and (findfile file_name) is_ask_rewrite)
(setq
file_info_list
(dos_file file_name)
rewrite (not (ru-no
(strcat
"Файл
"
(nth 0 file_info_list)
(if (/= comment "")
(strcat "
["
comment
"]"
) ;_ end of strcat
) ;_ end of if
"
Создан "
(nth 2 file_info_list)
" в "
(nth 3 file_info_list)
", размер "
(nth 1 file_info_list)
" байт"
"
Уже существует!"
"
Переписать"
) ;_ end of strcat
) ;_ end of
) ;_ end of not
) ;_ end of setq
(setq rewrite t)
) ;_ end of if
(if rewrite
(ru-block-rewrite-with-comment file_name comment base_point selection)
) ;_ end of if
) ;_ end of defun