emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/simple.el


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/simple.el
Date: Thu, 18 Apr 2002 20:05:22 -0400

Index: emacs/lisp/simple.el
diff -c emacs/lisp/simple.el:1.536 emacs/lisp/simple.el:1.537
*** emacs/lisp/simple.el:1.536  Thu Apr 18 18:16:00 2002
--- emacs/lisp/simple.el        Thu Apr 18 20:05:22 2002
***************
*** 1875,1883 ****
        (setq this-command 'kill-region)
        (message "If the next command is a kill, it will append"))
      (setq last-command 'kill-region)))
! 
  ;; Yanking.
  
  (defun yank-pop (arg)
    "Replace just-yanked stretch of killed text with a different stretch.
  This command is allowed only immediately after a `yank' or a `yank-pop'.
--- 1875,1891 ----
        (setq this-command 'kill-region)
        (message "If the next command is a kill, it will append"))
      (setq last-command 'kill-region)))
! 
  ;; Yanking.
  
+ ;; This is actually used in subr.el but defcustom does not work there.
+ (defcustom yank-excluded-properties
+   '(read-only invisible intangible field mouse-face local-map keymap)
+   "*Text properties to discard when yanking."
+   :type '(choice (const :tag "All" t) (repeat symbol))
+   :group 'editing
+   :version 21.4)
+ 
  (defun yank-pop (arg)
    "Replace just-yanked stretch of killed text with a different stretch.
  This command is allowed only immediately after a `yank' or a `yank-pop'.
***************
*** 1899,1908 ****
        (before (< (point) (mark t))))
      (delete-region (point) (mark t))
      (set-marker (mark-marker) (point) (current-buffer))
!     (let ((opoint (point)))
!       (insert (current-kill arg))
!       (let ((inhibit-read-only t))
!       (remove-text-properties opoint (point) '(read-only nil))))
      (if before
        ;; This is like exchange-point-and-mark, but doesn't activate the mark.
        ;; It is cleaner to avoid activation, even though the command
--- 1907,1913 ----
        (before (< (point) (mark t))))
      (delete-region (point) (mark t))
      (set-marker (mark-marker) (point) (current-buffer))
!     (insert-for-yank (current-kill arg))
      (if before
        ;; This is like exchange-point-and-mark, but doesn't activate the mark.
        ;; It is cleaner to avoid activation, even though the command
***************
*** 1924,1938 ****
    ;; for the following command.
    (setq this-command t)
    (push-mark (point))
!   (let ((opoint (point)))
!     (insert (current-kill (cond
!                          ((listp arg) 0)
!                          ((eq arg '-) -1)
!                          (t (1- arg)))))
!     (let ((inhibit-read-only t))
!       ;; Clear `field' property for the sake of copying from the
!       ;; minibuffer prompt or a *shell* prompt.
!       (remove-text-properties opoint (point) '(read-only nil field nil))))
    (if (consp arg)
        ;; This is like exchange-point-and-mark, but doesn't activate the mark.
        ;; It is cleaner to avoid activation, even though the command
--- 1929,1938 ----
    ;; for the following command.
    (setq this-command t)
    (push-mark (point))
!   (insert-for-yank (current-kill (cond
!                                 ((listp arg) 0)
!                                 ((eq arg '-) -1)
!                                 (t (1- arg)))))
    (if (consp arg)
        ;; This is like exchange-point-and-mark, but doesn't activate the mark.
        ;; It is cleaner to avoid activation, even though the command



reply via email to

[Prev in Thread] Current Thread [Next in Thread]