diff options
| -rw-r--r-- | lisp/simple.el | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 71f33054dd1..eae8ad74b04 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -1875,9 +1875,17 @@ The argument is used for internal purposes; do not supply one." | |||
| 1875 | (setq this-command 'kill-region) | 1875 | (setq this-command 'kill-region) |
| 1876 | (message "If the next command is a kill, it will append")) | 1876 | (message "If the next command is a kill, it will append")) |
| 1877 | (setq last-command 'kill-region))) | 1877 | (setq last-command 'kill-region))) |
| 1878 | 1878 | ||
| 1879 | ;; Yanking. | 1879 | ;; Yanking. |
| 1880 | 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 | |||
| 1881 | (defun yank-pop (arg) | 1889 | (defun yank-pop (arg) |
| 1882 | "Replace just-yanked stretch of killed text with a different stretch. | 1890 | "Replace just-yanked stretch of killed text with a different stretch. |
| 1883 | This command is allowed only immediately after a `yank' or a `yank-pop'. | 1891 | This command is allowed only immediately after a `yank' or a `yank-pop'. |
| @@ -1899,10 +1907,7 @@ comes the newest one." | |||
| 1899 | (before (< (point) (mark t)))) | 1907 | (before (< (point) (mark t)))) |
| 1900 | (delete-region (point) (mark t)) | 1908 | (delete-region (point) (mark t)) |
| 1901 | (set-marker (mark-marker) (point) (current-buffer)) | 1909 | (set-marker (mark-marker) (point) (current-buffer)) |
| 1902 | (let ((opoint (point))) | 1910 | (insert-for-yank (current-kill arg)) |
| 1903 | (insert (current-kill arg)) | ||
| 1904 | (let ((inhibit-read-only t)) | ||
| 1905 | (remove-text-properties opoint (point) '(read-only nil)))) | ||
| 1906 | (if before | 1911 | (if before |
| 1907 | ;; This is like exchange-point-and-mark, but doesn't activate the mark. | 1912 | ;; This is like exchange-point-and-mark, but doesn't activate the mark. |
| 1908 | ;; It is cleaner to avoid activation, even though the command | 1913 | ;; It is cleaner to avoid activation, even though the command |
| @@ -1924,15 +1929,10 @@ See also the command \\[yank-pop]." | |||
| 1924 | ;; for the following command. | 1929 | ;; for the following command. |
| 1925 | (setq this-command t) | 1930 | (setq this-command t) |
| 1926 | (push-mark (point)) | 1931 | (push-mark (point)) |
| 1927 | (let ((opoint (point))) | 1932 | (insert-for-yank (current-kill (cond |
| 1928 | (insert (current-kill (cond | 1933 | ((listp arg) 0) |
| 1929 | ((listp arg) 0) | 1934 | ((eq arg '-) -1) |
| 1930 | ((eq arg '-) -1) | 1935 | (t (1- arg))))) |
| 1931 | (t (1- arg))))) | ||
| 1932 | (let ((inhibit-read-only t)) | ||
| 1933 | ;; Clear `field' property for the sake of copying from the | ||
| 1934 | ;; minibuffer prompt or a *shell* prompt. | ||
| 1935 | (remove-text-properties opoint (point) '(read-only nil field nil)))) | ||
| 1936 | (if (consp arg) | 1936 | (if (consp arg) |
| 1937 | ;; This is like exchange-point-and-mark, but doesn't activate the mark. | 1937 | ;; This is like exchange-point-and-mark, but doesn't activate the mark. |
| 1938 | ;; It is cleaner to avoid activation, even though the command | 1938 | ;; It is cleaner to avoid activation, even though the command |