From cc016a3ea455a3eae6ca68e668783390d2648755 Mon Sep 17 00:00:00 2001 From: Rafael Laboissiere Date: Thu, 21 Feb 2019 12:08:06 +0100 Subject: Fix compilation warnings * (org-recoll-search-history) Specify the type of custom variable. * (org-recoll-compare-string-to-list) Avoid warnings about assignment and reference to free variable org-recoll-matched. This is fixed by locally defining the variable inside a let construct. Furthermore, the name of the variable is changed to "matched", since there is no need to prefix it by "org-recoll-". --- org-recoll.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/org-recoll.el b/org-recoll.el index 386ee45..14f4372 100644 --- a/org-recoll.el +++ b/org-recoll.el @@ -67,6 +67,7 @@ initated and this variable is not evaluated." (defcustom org-recoll-search-history nil "List to store your recoll search history." :group 'org-recoll + :type 'list ) (defcustom org-recoll-result-file-read-only t @@ -123,12 +124,12 @@ deleting/editing parts of your research library." (defun org-recoll-compare-string-to-list (string list) "Compares STRING to each element of LIST." - (setq org-recoll-matched nil) - (while list - (if (string= (prin1-to-string (car list)) string) - (setq org-recoll-matched t)) - (setq list (cdr list))) - org-recoll-matched) + (let ((matched nil)) + (while list + (if (string= (prin1-to-string (car list)) string) + (setq matched t)) + (setq list (cdr list))) + matched)) (defun org-recoll-fill-region-paragraphs () "Fill region like `org-fill-paragraph' for each para in buffer." -- cgit v1.2.3