diff --git a/lisp/subr.el b/lisp/subr.el index 99ddd813867..3210ab05702 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -7140,8 +7140,8 @@ buffer-match-p (string-match-p condition (buffer-name buffer))) ((pred functionp) (if (eq 1 (cdr (func-arity condition))) - (funcall condition buffer) - (funcall condition buffer arg))) + (funcall condition (buffer-name buffer)) + (funcall condition (buffer-name buffer) arg))) (`(major-mode . ,mode) (eq (buffer-local-value 'major-mode buffer)