Mercurial > vim
comparison src/userfunc.c @ 11545:1780e6fecb30 v8.0.0655
patch 8.0.0655: not easy to make sure a function does not exist
commit https://github.com/vim/vim/commit/d6abcd154cdc6a8dd4b7c6ccad37617ea8a1b4aa
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jun 22 19:15:24 2017 +0200
patch 8.0.0655: not easy to make sure a function does not exist
Problem: Not easy to make sure a function does not exist.
Solution: Add ! as an optional argument to :delfunc.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 22 Jun 2017 19:30:04 +0200 |
parents | 57c452316da1 |
children | 7ad79766365a |
comparison
equal
deleted
inserted
replaced
11544:c5f791fb7861 | 11545:1780e6fecb30 |
---|---|
2805 | 2805 |
2806 if (!eap->skip) | 2806 if (!eap->skip) |
2807 { | 2807 { |
2808 if (fp == NULL) | 2808 if (fp == NULL) |
2809 { | 2809 { |
2810 EMSG2(_(e_nofunc), eap->arg); | 2810 if (!eap->forceit) |
2811 EMSG2(_(e_nofunc), eap->arg); | |
2811 return; | 2812 return; |
2812 } | 2813 } |
2813 if (fp->uf_calls > 0) | 2814 if (fp->uf_calls > 0) |
2814 { | 2815 { |
2815 EMSG2(_("E131: Cannot delete function %s: It is in use"), eap->arg); | 2816 EMSG2(_("E131: Cannot delete function %s: It is in use"), eap->arg); |