changeset 42917:ec2db12c7670

(copy-without-properties): New function.
author Richard M. Stallman <rms@gnu.org>
date Wed, 23 Jan 2002 17:46:44 +0000
parents 4d674ddf28fb
children 9b06036a8c5e
files lisp/subr.el
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/subr.el	Wed Jan 23 04:03:11 2002 +0000
+++ b/lisp/subr.el	Wed Jan 23 17:46:44 2002 +0000
@@ -1080,7 +1080,7 @@
 	  (if (> (overlay-end o) end)
 	      (move-overlay o end (overlay-end o))
 	    (delete-overlay o)))))))
-
+
 ;;;; Miscellanea.
 
 ;; A number of major modes set this locally.
@@ -1362,6 +1362,12 @@
 	      (cons 'progn body)
 	      '(set-match-data save-match-data-internal))))
 
+(defun copy-without-properties (string)
+  "Return a copy of STRING with no text properties."
+  (setq string (concat string))
+  (set-text-properties 0 (length string) nil string)
+  string)
+
 (defun match-string (num &optional string)
   "Return string of text matched by last search.
 NUM specifies which parenthesized expression in the last regexp.