aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Courtieu2015-02-23 19:28:42 +0000
committerPierre Courtieu2015-02-23 19:28:42 +0000
commitc85d28df72efb16d0652c85af3ad2ea0138d773a (patch)
treecc128317e1c4a9dbfdf7daebc8238fdac97f32a9
parent611fbfb2fc93f240c4bb2a8dbbbcfd0921145ef5 (diff)
Typo in last commit.
-rw-r--r--coq/coq.el22
1 files changed, 16 insertions, 6 deletions
diff --git a/coq/coq.el b/coq/coq.el
index 862816cb..dd0a7677 100644
--- a/coq/coq.el
+++ b/coq/coq.el
@@ -872,13 +872,23 @@ More precisely it executes SETCMD, then DO id and finally silently UNSETCMD."
(concat "\"" s "\"")
s))
-(defsubst coq-put-into-double-quote-if-notation-remove-ind (s)
- (if (equal (char-syntax (string-to-char s)) ?\.)
- (concat "\"" s "\" " "-\"_ind\" - \"_rect\" -\"_rec\"")
- s))
+(defcustom coq-removed-patterns-when-search
+ '("_ind" "_rect" "_rec")
+ "String list to remove from search request to coq environment."
+ :type '(repeat string)
+ :group 'coq)
-(defsubst coq-put-into-brackets-remove-useless (s)
- (concat s " -\"_ind\" - \"_rect\" -\"_rec\""))
+(defun coq-build-removed-pattern (s)
+ (concat " -\"" s "\""))
+
+(defun coq-build-removed-patterns (l)
+ (mapcar 'coq-build-removed-pattern l))
+
+(defsubst coq-put-into-double-quote-if-notation-remove-ind (s)
+ (let ((removed (coq-build-removed-patterns coq-removed-patterns-when-search)))
+ (if (equal (char-syntax (string-to-char s)) ?\.)
+ (apply 'concat (cons "\"" (cons s (cons "\"" removed))))
+ (apply 'concat (cons s removed)))))
(defsubst coq-put-into-quotes (s)
(concat "\"" s "\""))