From: Richard M. Stallman Date: Wed, 23 Jan 2002 17:46:44 +0000 (+0000) Subject: (copy-without-properties): New function. X-Git-Tag: ttn-vms-21-2-B4~17006 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c5802acf35515ef346f465d09eaf10d658be2c4b;p=emacs.git (copy-without-properties): New function. --- diff --git a/lisp/subr.el b/lisp/subr.el index c199bee05dc..4512fbfafb0 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1080,7 +1080,7 @@ Overlays might be moved and or split." (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 @@ Value is what BODY returns." (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.