aboutsummaryrefslogtreecommitdiffhomepage
path: root/generic
diff options
context:
space:
mode:
authorGravatar David Aspinall <da@inf.ed.ac.uk>2000-05-31 14:15:01 +0000
committerGravatar David Aspinall <da@inf.ed.ac.uk>2000-05-31 14:15:01 +0000
commitd70352a272abfece407d049077ffd99464a44810 (patch)
tree8d609cdb6edd2a0a44788a33cddd832ccfe3811a /generic
parent40a3c72c2ca73e3a7abca3d09807f43d386a5474 (diff)
Fixes for completion support.
Diffstat (limited to 'generic')
-rw-r--r--generic/proof-script.el13
1 files changed, 9 insertions, 4 deletions
diff --git a/generic/proof-script.el b/generic/proof-script.el
index cfce635e..d511f334 100644
--- a/generic/proof-script.el
+++ b/generic/proof-script.el
@@ -2375,18 +2375,23 @@ sent to the assistant."
;;
(defun proof-add-completions ()
"Add completions from <PA>-completion-table to completion database.
-Uses `add-completion' with a negative number of uses to discourage
-saving these into the users database."
+Uses `add-completion' with a negative number of uses and ancient
+last use time, to discourage saving these into the users database."
(interactive)
(require 'completion)
- (mapcar (lambda (cmpl) (add-completion cmpl -1000))
+ (mapcar (lambda (cmpl)
+ ;; completion gives error in this case; trapping
+ ;; the error here is tricky in FSF Emacs so duplicate
+ ;; the test.
+ (if (>= (length cmpl) completion-min-length)
+ (add-completion cmpl -1000 0)))
(proof-ass completion-table)))
;; NB: completion table is expected to be set when proof-script
;; is loaded! Can call proof-script-add-completions if the table
;; is updated.
(eval-after-load "completion"
- (proof-add-completions))
+ '(proof-add-completions))