From c85d28df72efb16d0652c85af3ad2ea0138d773a Mon Sep 17 00:00:00 2001 From: Pierre Courtieu Date: Mon, 23 Feb 2015 19:28:42 +0000 Subject: Typo in last commit. --- coq/coq.el | 22 ++++++++++++++++------ 1 file 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 "\"")) -- cgit v1.2.3