From 5d0e668cc6632ee5ec1dca083b35fb4733239258 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Sun, 20 Apr 2014 08:44:07 +0200 Subject: [PATCH] org.el (org-contextualize-validate-key): Fix wrong test * org.el (org-contextualize-validate-key): Fix wrong test. Thanks to Eric Abrahamsen for reporting the problem and the fix: http://article.gmane.org/gmane.emacs.orgmode/85276 --- lisp/org.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 3d7fcfa0f..f82526ab8 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -9155,10 +9155,9 @@ definitions." (string-match (cdr rr) (symbol-name major-mode))) (and (eq (car rr) 'in-buffer) (string-match (cdr rr) (buffer-name))) - (if (and (eq (car rr) 'not-in-file) + (when (and (eq (car rr) 'not-in-file) (buffer-file-name)) - (not (string-match (cdr rr) (buffer-file-name))) - t) + (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 (eq (car rr) 'not-in-buffer)