Browse Source

org-macs: Fix `org-string-nw-p'

* lisp/org-macs.el (org-string-nw-p): Return value doesn't depend
  anymore on the current syntax table.

Reported-by: Rasmus Rasmus <rasmus@gmx.us>
<http://permalink.gmane.org/gmane.emacs.orgmode/95467>
Nicolas Goaziou 10 years ago
parent
commit
f8edfc9fb3
1 changed files with 3 additions and 2 deletions
  1. 3 2
      lisp/org-macs.el

+ 3 - 2
lisp/org-macs.el

@@ -71,9 +71,10 @@
 (def-edebug-spec org-bound-and-true-p (symbolp))
 
 (defun org-string-nw-p (s)
-  "Is S a string with a non-white character?"
+  "Return S if S is a string containing a non-blank character.
+Otherwise, return nil."
   (and (stringp s)
-       (org-string-match-p "\\S-" s)
+       (org-string-match-p "[^ \r\t\n]" s)
        s))
 
 (defun org-not-nil (v)