commit 9596f7de9d283110d2e03aa3dd4267c9eb79ccc5
parent 20635b40f4a48c4cca9ba90655d12ab3d6b1c591
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Tue, 21 May 2019 12:59:34 +0200
tweaks: delete a now-unused function
Diffstat:
2 files changed, 0 insertions(+), 37 deletions(-)
diff --git a/src/files.c b/src/files.c
@@ -542,40 +542,6 @@ void replace_buffer(const char *filename, undo_type action, bool marked)
openfile->undotop->strdata = mallocstrcpy(NULL, _("spelling correction"));
#endif
}
-
-#ifndef NANO_TINY
-/* Open the specified file, and if that succeeds, blow away the text of
- * the current buffer covered by the mark and read the file
- * contents into its place. */
-void replace_marked_buffer(const char *filename)
-{
- FILE *f;
- int descriptor;
- linestruct *was_cutbuffer = cutbuffer;
-
- descriptor = open_file(filename, FALSE, TRUE, &f);
-
- if (descriptor < 0)
- return;
-
- add_undo(COUPLE_BEGIN);
- openfile->undotop->strdata = mallocstrcpy(NULL, _("spelling correction"));
-
- /* Throw away the text under the mark. */
- cutbuffer = NULL;
- add_undo(CUT);
- do_cut_text(FALSE, TRUE, FALSE, FALSE);
- update_undo(CUT);
- free_lines(cutbuffer);
- cutbuffer = was_cutbuffer;
-
- /* Insert the processed file where the marked text was. */
- read_file(f, descriptor, filename, TRUE);
-
- add_undo(COUPLE_END);
- openfile->undotop->strdata = mallocstrcpy(NULL, _("spelling correction"));
-}
-#endif /* !NANO_TINY */
#endif /* ENABLE_SPELLER */
/* Update the titlebar and the multiline cache to match the current buffer. */
diff --git a/src/proto.h b/src/proto.h
@@ -268,9 +268,6 @@ void set_modified(void);
bool open_buffer(const char *filename, bool new_buffer);
#ifdef ENABLE_SPELLER
void replace_buffer(const char *filename, undo_type action, bool marked);
-#ifndef NANO_TINY
-void replace_marked_buffer(const char *filename);
-#endif
#endif
void prepare_for_display(void);
#ifdef ENABLE_MULTIBUFFER