X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2Fnotmuch.el;h=40b9fabdbc49c53a17720f1615a3984a8eb15558;hp=44519b7abc55449e3b00a5a63ef19cefc35cb7f6;hb=0b76e4a6f45b051bfcaf9f058d3162b423007294;hpb=e4164dfdc36e5c95224c75ebc988c603d0e2aa27 diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 44519b7a..40b9fabd 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -402,17 +402,17 @@ returns nil" (next-single-property-change (or pos (point)) 'notmuch-search-result nil (point-max)))) -(defun notmuch-search-foreach-result (beg end function) - "Invoke FUNCTION for each result between BEG and END. +(defun notmuch-search-foreach-result (beg end fn) + "Invoke FN for each result between BEG and END. -FUNCTION should take one argument. It will be applied to the +FN should take one argument. It will be applied to the character position of the beginning of each result that overlaps the region between points BEG and END. As a special case, if (= -BEG END), FUNCTION will be applied to the result containing point +BEG END), FN will be applied to the result containing point BEG." (lexical-let ((pos (notmuch-search-result-beginning beg)) - ;; End must be a marker in case function changes the + ;; End must be a marker in case fn changes the ;; text. (end (copy-marker end)) ;; Make sure we examine at least one result, even if @@ -423,7 +423,7 @@ BEG." ;; pos. (while (and pos (or (< pos end) first)) (when (notmuch-search-get-result pos) - (funcall function pos)) + (funcall fn pos)) (setq pos (notmuch-search-result-end pos) first nil)))) ;; Unindent the function argument of notmuch-search-foreach-result so @@ -940,8 +940,8 @@ PROMPT is the string to prompt with." "Return the current query in this search buffer" notmuch-search-query-string) -;;;###autoload (put 'notmuch-search 'notmuch-doc "Search for messages.") +;;;###autoload (defun notmuch-search (&optional query oldest-first target-thread target-line no-display) "Display threads matching QUERY in a notmuch-search buffer.