aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/menu-bar.el13
-rw-r--r--lisp/simple.el5
2 files changed, 13 insertions, 5 deletions
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 7c9fc1aeba0..1c3b8014e96 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -2169,10 +2169,16 @@ otherwise it could decide to silently do nothing."
2169 (> count 1))) 2169 (> count 1)))
2170 2170
2171(defcustom yank-menu-length 20 2171(defcustom yank-menu-length 20
2172 "Maximum length to display in the `yank-menu'." 2172 "Items in `yank-menu' longer than this will be truncated."
2173 :type 'integer 2173 :type 'integer
2174 :group 'menu) 2174 :group 'menu)
2175 2175
2176(defcustom yank-menu-max-items 60
2177 "Maximum number of entries to display in the `yank-menu'."
2178 :type 'integer
2179 :group 'menu
2180 :version "29.1")
2181
2176(defun menu-bar-update-yank-menu (string old) 2182(defun menu-bar-update-yank-menu (string old)
2177 (let ((front (car (cdr yank-menu))) 2183 (let ((front (car (cdr yank-menu)))
2178 (menu-string (if (<= (length string) yank-menu-length) 2184 (menu-string (if (<= (length string) yank-menu-length)
@@ -2196,8 +2202,9 @@ otherwise it could decide to silently do nothing."
2196 (cons 2202 (cons
2197 (cons string (cons menu-string 'menu-bar-select-yank)) 2203 (cons string (cons menu-string 'menu-bar-select-yank))
2198 (cdr yank-menu))))) 2204 (cdr yank-menu)))))
2199 (if (> (length (cdr yank-menu)) kill-ring-max) 2205 (let ((max-items (min yank-menu-max-items kill-ring-max)))
2200 (setcdr (nthcdr kill-ring-max yank-menu) nil))) 2206 (if (> (length (cdr yank-menu)) max-items)
2207 (setcdr (nthcdr max-items yank-menu) nil))))
2201 2208
2202(put 'menu-bar-select-yank 'apropos-inhibit t) 2209(put 'menu-bar-select-yank 'apropos-inhibit t)
2203(defun menu-bar-select-yank () 2210(defun menu-bar-select-yank ()
diff --git a/lisp/simple.el b/lisp/simple.el
index 7b6c52a3898..c7bb928cd73 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -5076,10 +5076,11 @@ interact nicely with `interprogram-cut-function' and
5076interaction; you may want to use them instead of manipulating the kill 5076interaction; you may want to use them instead of manipulating the kill
5077ring directly.") 5077ring directly.")
5078 5078
5079(defcustom kill-ring-max 60 5079(defcustom kill-ring-max 120
5080 "Maximum length of kill ring before oldest elements are thrown away." 5080 "Maximum length of kill ring before oldest elements are thrown away."
5081 :type 'integer 5081 :type 'integer
5082 :group 'killing) 5082 :group 'killing
5083 :version "29.1")
5083 5084
5084(defvar kill-ring-yank-pointer nil 5085(defvar kill-ring-yank-pointer nil
5085 "The tail of the kill ring whose car is the last thing yanked.") 5086 "The tail of the kill ring whose car is the last thing yanked.")