comparison lisp/simple.el @ 8768:e2073805b688

(kill-new): Call menu-bar-update-yank-menu only if that function is defined.
author Karl Heuer <kwzh@gnu.org>
date Thu, 15 Sep 1994 22:19:50 +0000
parents 2b54e6deed2f
children 25406f41c336
comparison
equal deleted inserted replaced
8767:441af4b664ac 8768:e2073805b688
996 "Make STRING the latest kill in the kill ring. 996 "Make STRING the latest kill in the kill ring.
997 Set the kill-ring-yank pointer to point to it. 997 Set the kill-ring-yank pointer to point to it.
998 If `interprogram-cut-function' is non-nil, apply it to STRING. 998 If `interprogram-cut-function' is non-nil, apply it to STRING.
999 Optional second argument REPLACE non-nil means that STRING will replace 999 Optional second argument REPLACE non-nil means that STRING will replace
1000 the front of the kill ring, rather than being added to the list." 1000 the front of the kill ring, rather than being added to the list."
1001 (menu-bar-update-yank-menu string (and replace (car kill-ring))) 1001 (and (fboundp 'menu-bar-update-yank-menu)
1002 (menu-bar-update-yank-menu string (and replace (car kill-ring))))
1002 (if replace 1003 (if replace
1003 (setcar kill-ring string) 1004 (setcar kill-ring string)
1004 (setq kill-ring (cons string kill-ring)) 1005 (setq kill-ring (cons string kill-ring))
1005 (if (> (length kill-ring) kill-ring-max) 1006 (if (> (length kill-ring) kill-ring-max)
1006 (setcdr (nthcdr (1- kill-ring-max) kill-ring) nil))) 1007 (setcdr (nthcdr (1- kill-ring-max) kill-ring) nil)))