[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/subr.el
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/subr.el |
Date: |
Thu, 24 Jan 2002 21:32:18 -0500 |
Index: emacs/lisp/subr.el
diff -c emacs/lisp/subr.el:1.282 emacs/lisp/subr.el:1.283
*** emacs/lisp/subr.el:1.282 Wed Jan 23 12:46:44 2002
--- emacs/lisp/subr.el Thu Jan 24 21:32:18 2002
***************
*** 1362,1372 ****
(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.
--- 1362,1379 ----
(cons 'progn body)
'(set-match-data save-match-data-internal))))
! (defun substring-no-properties (string &optional from to)
! "Return a substring of STRING, with no text properties.
! The substring starts at index FROM and ends before TO.
! If FROM is nil or omitted, it defaults to the beginning of STRING.
! If TO is nil or omitted, it defaults to the end of STRING.
! If FROM or TO is negative, it counts from the end.
!
! Simply (substring-no-properties STRING) copies a string without
! its properties."
! (let ((str (substring string (or from 0) to)))
! (set-text-properties 0 (length str) nil str)
! str))
(defun match-string (num &optional string)
"Return string of text matched by last search.