0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-19 20:18:32 +00:00

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

View file

@ -8675,17 +8675,17 @@ definitions."
(lambda (rr)
(when
(and (equal key (car r))
(or (and (eq (car rr) 'in-file)
(buffer-file-name)
(string-match (cdr rr) (buffer-file-name)))
(and (eq (car rr) 'in-mode)
(string-match (cdr rr) (symbol-name major-mode)))
(when (and (eq (car rr) 'not-in-file)
(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))))
(if (functionp rr) (funcall rr)
(or (and (eq (car rr) 'in-file)
(buffer-file-name)
(string-match (cdr rr) (buffer-file-name)))
(and (eq (car rr) 'in-mode)
(string-match (cdr rr) (symbol-name major-mode)))
(when (and (eq (car rr) 'not-in-file)
(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)))))))
(push r res)))
(car (last r))))
(delete-dups (delq nil res))))