[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/subr.el
From: |
Kim F. Storm |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/subr.el |
Date: |
Sun, 21 Apr 2002 13:00:42 -0400 |
Index: emacs/lisp/subr.el
diff -c emacs/lisp/subr.el:1.298 emacs/lisp/subr.el:1.299
*** emacs/lisp/subr.el:1.298 Thu Apr 18 20:06:54 2002
--- emacs/lisp/subr.el Sun Apr 21 13:00:41 2002
***************
*** 1287,1292 ****
--- 1287,1317 ----
(set-text-properties opoint (point) nil)
(remove-list-of-text-properties opoint (point)
yank-excluded-properties)))))
+
+ (defun insert-buffer-substring-no-properties (buf &optional start end)
+ "Insert before point a substring of buffer BUFFER, without text properties.
+ BUFFER may be a buffer or a buffer name.
+ Arguments START and END are character numbers specifying the substring.
+ They default to the beginning and the end of BUFFER."
+ (let ((opoint (point)))
+ (insert-buffer-substring buf start end)
+ (let ((inhibit-read-only t))
+ (set-text-properties opoint (point) nil))))
+
+ (defun insert-buffer-substring-as-yank (buf &optional start end)
+ "Insert before point a part of buffer BUFFER, stripping some text
properties.
+ BUFFER may be a buffer or a buffer name. Arguments START and END are
+ character numbers specifying the substring. They default to the
+ beginning and the end of BUFFER. Strip text properties from the
+ inserted text according to `yank-excluded-properties'."
+ (let ((opoint (point)))
+ (insert-buffer-substring buf start end)
+ (let ((inhibit-read-only t))
+ (if (eq yank-excluded-properties t)
+ (set-text-properties opoint (point) nil)
+ (remove-list-of-text-properties opoint (point)
+ yank-excluded-properties)))))
+
;; Synchronous shell commands.
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Richard M. Stallman, 2002/04/01
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Pavel JanÃk, 2002/04/07
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Richard M. Stallman, 2002/04/10
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Richard M. Stallman, 2002/04/18
- [Emacs-diffs] Changes to emacs/lisp/subr.el,
Kim F. Storm <=
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Richard M. Stallman, 2002/04/27
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Richard M. Stallman, 2002/04/28
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Kim F. Storm, 2002/04/29