Browse Source

org.el (org-contextualize-validate-key): Bugfix

* org.el (org-contextualize-validate-key): Fix bug: perform
the check even when (buffer-file-name) returns `nil'.
Bastien Guerry 11 years ago
parent
commit
bff69f97f3
1 changed files with 3 additions and 2 deletions
  1. 3 2
      lisp/org.el

+ 3 - 2
lisp/org.el

@@ -9130,9 +9130,10 @@ definitions."
 			  (string-match (cdr rr) (symbol-name major-mode)))
 		     (and (eq (car rr) 'in-buffer)
 			  (string-match (cdr rr) (buffer-name)))
-		     (when (and (eq (car rr) 'not-in-file)
+		     (if (and (eq (car rr) 'not-in-file)
 				(buffer-file-name))
-		       (not (string-match (cdr rr) (buffer-file-name))))
+			 (not (string-match (cdr rr) (buffer-file-name)))
+		       t)
 		     (when (eq (car rr) 'not-in-mode)
 		       (not (string-match (cdr rr) (symbol-name major-mode))))
 		     (when (eq (car rr) 'not-in-buffer)