org.el: Fix the contextual check against a function

* org.el (org-contextualize-validate-key): Fix the check
against a function.
This commit is contained in:
Bastien Guerry 2012-08-24 14:22:45 +02:00
parent 10dbdf5fc2
commit bfe3e2102f
1 changed files with 11 additions and 11 deletions

View File

@ -8675,6 +8675,7 @@ definitions."
(lambda (rr)
(when
(and (equal key (car r))
(if (functionp rr) (funcall rr)
(or (and (eq (car rr) 'in-file)
(buffer-file-name)
(string-match (cdr rr) (buffer-file-name)))
@ -8684,8 +8685,7 @@ definitions."
(buffer-file-name))
(not (string-match (cdr rr) (buffer-file-name))))
(when (eq (car rr) 'not-in-mode)
(not (string-match (cdr rr) (symbol-name major-mode))))
(when (functionp rr) (funcall rr))))
(not (string-match (cdr rr) (symbol-name major-mode)))))))
(push r res)))
(car (last r))))
(delete-dups (delq nil res))))