Mercurial > emacs
comparison lisp/simple.el @ 108902:1f795f817d05
Merge from mainline.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Sun, 06 Jun 2010 22:46:17 +0000 |
parents | e7c6230ab85d |
children | a52944b44517 |
comparison
equal
deleted
inserted
replaced
108901:10652acf752a | 108902:1f795f817d05 |
---|---|
2903 (put-text-property 0 (length string) | 2903 (put-text-property 0 (length string) |
2904 'yank-handler yank-handler string)) | 2904 'yank-handler yank-handler string)) |
2905 (if yank-handler | 2905 (if yank-handler |
2906 (signal 'args-out-of-range | 2906 (signal 'args-out-of-range |
2907 (list string "yank-handler specified for empty string")))) | 2907 (list string "yank-handler specified for empty string")))) |
2908 (when (and kill-do-not-save-duplicates | 2908 (unless (and kill-do-not-save-duplicates |
2909 (equal string (car kill-ring))) | 2909 (equal string (car kill-ring))) |
2910 (setq replace t)) | 2910 (if (fboundp 'menu-bar-update-yank-menu) |
2911 (if (fboundp 'menu-bar-update-yank-menu) | 2911 (menu-bar-update-yank-menu string (and replace (car kill-ring))))) |
2912 (menu-bar-update-yank-menu string (and replace (car kill-ring)))) | |
2913 (when save-interprogram-paste-before-kill | 2912 (when save-interprogram-paste-before-kill |
2914 (let ((interprogram-paste (and interprogram-paste-function | 2913 (let ((interprogram-paste (and interprogram-paste-function |
2915 (funcall interprogram-paste-function)))) | 2914 (funcall interprogram-paste-function)))) |
2916 (when interprogram-paste | 2915 (when interprogram-paste |
2917 (if (listp interprogram-paste) | 2916 (dolist (s (if (listp interprogram-paste) |
2918 (dolist (s (nreverse interprogram-paste)) | 2917 (nreverse interprogram-paste) |
2919 (push s kill-ring)) | 2918 (list interprogram-paste))) |
2920 (push interprogram-paste kill-ring))))) | 2919 (unless (and kill-do-not-save-duplicates |
2921 (if (and replace kill-ring) | 2920 (equal s (car kill-ring))) |
2922 (setcar kill-ring string) | 2921 (push s kill-ring)))))) |
2923 (push string kill-ring) | 2922 (unless (and kill-do-not-save-duplicates |
2924 (if (> (length kill-ring) kill-ring-max) | 2923 (equal string (car kill-ring))) |
2925 (setcdr (nthcdr (1- kill-ring-max) kill-ring) nil))) | 2924 (if (and replace kill-ring) |
2925 (setcar kill-ring string) | |
2926 (push string kill-ring) | |
2927 (if (> (length kill-ring) kill-ring-max) | |
2928 (setcdr (nthcdr (1- kill-ring-max) kill-ring) nil)))) | |
2926 (setq kill-ring-yank-pointer kill-ring) | 2929 (setq kill-ring-yank-pointer kill-ring) |
2927 (if interprogram-cut-function | 2930 (if interprogram-cut-function |
2928 (funcall interprogram-cut-function string (not replace)))) | 2931 (funcall interprogram-cut-function string (not replace)))) |
2929 | 2932 |
2930 (defun kill-append (string before-p &optional yank-handler) | 2933 (defun kill-append (string before-p &optional yank-handler) |