refactor: remove dead code, adjust comment

Removed code doesn't seem to do anything? Looks like a clobbered remnant from
when do_filetype_autocmd lived in did_set_string_option.

Doc comment for wipe_buffer doesn't decrement top_file_num since a2d25b7 (2016),
which presumably means the comment on marks doesn't apply either. (fmark_T::fnum
can't refer to the wrong buffer as numbers aren't reused here anymore)

(cherry picked from commit 40114d1631)
This commit is contained in:
Sean Dewar
2026-01-13 23:09:21 +00:00
committed by github-actions[bot]
parent 6ce7b9b851
commit b0f341feea
2 changed files with 1 additions and 9 deletions

View File

@@ -2644,7 +2644,6 @@ void do_filetype_autocmd(buf_T *buf, bool force)
return; // disallow recursion
}
char **varp = &buf->b_p_ft;
int secure_save = secure;
// Reset the secure flag, since the value of 'filetype' has
@@ -2658,9 +2657,5 @@ void do_filetype_autocmd(buf_T *buf, bool force)
apply_autocmds(EVENT_FILETYPE, buf->b_p_ft, buf->b_fname, force || ft_recursive == 1, buf);
ft_recursive--;
// Just in case the old "buf" is now invalid
if (varp != &(buf->b_p_ft)) {
varp = NULL;
}
secure = secure_save;
}

View File

@@ -4100,10 +4100,7 @@ bool buf_contents_changed(buf_T *buf)
return differ;
}
/// Wipe out a buffer and decrement the last buffer number if it was used for
/// this buffer. Call this to wipe out a temp buffer that does not contain any
/// marks.
///
/// Wipe out a (typically temporary) buffer.
/// @param aucmd When true trigger autocommands.
void wipe_buffer(buf_T *buf, bool aucmd)
{