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:
parent
10dbdf5fc2
commit
bfe3e2102f
22
lisp/org.el
22
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))))
|
||||
|
|
Loading…
Reference in New Issue