(buffer-substring-no-properties): New function.
authorRichard M. Stallman <rms@gnu.org>
Mon, 1 May 1995 18:26:28 +0000 (18:26 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 1 May 1995 18:26:28 +0000 (18:26 +0000)
lisp/subr.el

index b30fc96..f3ab57a 100644 (file)
@@ -842,6 +842,12 @@ STRING should be given if the last search was by `string-match' on STRING."
          (substring string (match-beginning num) (match-end num))
        (buffer-substring (match-beginning num) (match-end num)))))
 
+(defun buffer-substring-no-properties (beg end)
+  "Return the text from BEG to END, without text properties, as a string."
+  (let ((string (buffer-substring beg end)))
+    (set-text-properties 0 (length string) nil string)
+    string))
+
 (defun shell-quote-argument (argument)
   "Quote an argument for passing as argument to an inferior shell."
   ;; Quote everything except POSIX filename characters.