aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2017-04-08 14:03:29 -0300
committerDavid Bremner <david@tethera.net>2017-04-20 06:58:32 -0300
commit0b76e4a6f45b051bfcaf9f058d3162b423007294 (patch)
treee476acbf41f47361ffd591f1c0ae3c3e251ea35d
parent18ee87e7ce7e6a20e17a8e5138a82b9069276691 (diff)
emacs/notmuch.el: don't use 'function' as variable name.
In principle this should work, but at least in some pre-release versions of emacs26, this causes problems inside lexical let [1]. [1]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26406
-rw-r--r--emacs/notmuch.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index d8d3afeb..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