diff options
author | Bastien Guerry <bzg@altern.org> | 2012-08-24 14:22:45 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2012-08-24 14:22:45 +0200 |
commit | bfe3e2102fa656109e6ec04265c41ca3bd15c417 (patch) | |
tree | fc9daf325b1840cbddea7580722dfe9b342d684c | |
parent | 10dbdf5fc28f0346f00e753792553c6d7244457e (diff) | |
download | org-mode-bfe3e2102fa656109e6ec04265c41ca3bd15c417.tar.gz |
org.el: Fix the contextual check against a function
* org.el (org-contextualize-validate-key): Fix the check
against a function.
-rw-r--r-- | lisp/org.el | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lisp/org.el b/lisp/org.el index b3ae268..4a8e590 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -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)))) |