/[emacs]/emacs/lisp/simple.el
ViewVC logotype

Diff of /emacs/lisp/simple.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.536 by kfstorm, Thu Apr 18 22:16:00 2002 UTC revision 1.537 by rms, Fri Apr 19 00:05:22 2002 UTC
# Line 1875  The argument is used for internal purpos Line 1875  The argument is used for internal purpos
1875          (setq this-command 'kill-region)          (setq this-command 'kill-region)
1876          (message "If the next command is a kill, it will append"))          (message "If the next command is a kill, it will append"))
1877      (setq last-command 'kill-region)))      (setq last-command 'kill-region)))
1878    
1879  ;; Yanking.  ;; Yanking.
1880    
1881    ;; This is actually used in subr.el but defcustom does not work there.
1882    (defcustom yank-excluded-properties
1883      '(read-only invisible intangible field mouse-face local-map keymap)
1884      "*Text properties to discard when yanking."
1885      :type '(choice (const :tag "All" t) (repeat symbol))
1886      :group 'editing
1887      :version 21.4)
1888    
1889  (defun yank-pop (arg)  (defun yank-pop (arg)
1890    "Replace just-yanked stretch of killed text with a different stretch.    "Replace just-yanked stretch of killed text with a different stretch.
1891  This command is allowed only immediately after a `yank' or a `yank-pop'.  This command is allowed only immediately after a `yank' or a `yank-pop'.
# Line 1899  comes the newest one." Line 1907  comes the newest one."
1907          (before (< (point) (mark t))))          (before (< (point) (mark t))))
1908      (delete-region (point) (mark t))      (delete-region (point) (mark t))
1909      (set-marker (mark-marker) (point) (current-buffer))      (set-marker (mark-marker) (point) (current-buffer))
1910      (let ((opoint (point)))      (insert-for-yank (current-kill arg))
       (insert (current-kill arg))  
       (let ((inhibit-read-only t))  
         (remove-text-properties opoint (point) '(read-only nil))))  
1911      (if before      (if before
1912          ;; This is like exchange-point-and-mark, but doesn't activate the mark.          ;; This is like exchange-point-and-mark, but doesn't activate the mark.
1913          ;; It is cleaner to avoid activation, even though the command          ;; It is cleaner to avoid activation, even though the command
# Line 1924  See also the command \\[yank-pop]." Line 1929  See also the command \\[yank-pop]."
1929    ;; for the following command.    ;; for the following command.
1930    (setq this-command t)    (setq this-command t)
1931    (push-mark (point))    (push-mark (point))
1932    (let ((opoint (point)))    (insert-for-yank (current-kill (cond
1933      (insert (current-kill (cond                                    ((listp arg) 0)
1934                             ((listp arg) 0)                                    ((eq arg '-) -1)
1935                             ((eq arg '-) -1)                                    (t (1- arg)))))
                            (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))))  
1936    (if (consp arg)    (if (consp arg)
1937        ;; This is like exchange-point-and-mark, but doesn't activate the mark.        ;; This is like exchange-point-and-mark, but doesn't activate the mark.
1938        ;; It is cleaner to avoid activation, even though the command        ;; It is cleaner to avoid activation, even though the command

Legend:
Removed from v.1.536  
changed lines
  Added in v.1.537

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26