Bladeren bron

New function: Strip text properties

* org-test.el (org-test-strip-text-props): New function. Strip text
properties.
David Maus 14 jaren geleden
bovenliggende
commit
415d4fbf38
1 gewijzigde bestanden met toevoegingen van 7 en 0 verwijderingen
  1. 7 0
      testing/org-test.el

+ 7 - 0
testing/org-test.el

@@ -179,6 +179,13 @@ files."
 
 (define-key emacs-lisp-mode-map "\M-\C-j" 'org-test-jump)
 
+
+;;; Miscellaneous helper functions
+(defun org-test-strip-text-props (s)
+  "Return S without any text properties."
+  (let ((noprop (copy-sequence s)))
+    (set-text-properties 0 (length noprop) nil noprop)
+    noprop))
 
 ;;; Load and Run tests
 (defun org-test-load ()