branch: externals/cape
commit e7715105ed919064f380e6d181343b6b938a554d
Author: Daniel Mendler <m...@daniel-mendler.de>
Commit: Daniel Mendler <m...@daniel-mendler.de>

    cape-dict: Restrict maximum number of words if cape-dict-grep is nil
---
 cape.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/cape.el b/cape.el
index 38de07a368..21fde3b069 100644
--- a/cape.el
+++ b/cape.el
@@ -658,6 +658,8 @@ See the user options `cape-dabbrev-min-length' and
                (dolist (file files)
                  (insert-file-contents file)
                  (insert "\n"))
+               (when (> (count-lines (point-min) (point-max)) 100000)
+                 (error "Too many words in `cape-dict-file'.  Use 
`cape-dict-grep'"))
                (split-string (buffer-string) "[\r\n]+" t)))
            (lambda (word)
              (when cape-dict-limit

Reply via email to