aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/emacs/custom.texi2
-rw-r--r--doc/emacs/killing.texi2
-rw-r--r--doc/lispintro/emacs-lisp-intro.texi2
-rw-r--r--doc/lispref/text.texi2
-rw-r--r--etc/NEWS8
-rw-r--r--lisp/menu-bar.el13
-rw-r--r--lisp/simple.el5
7 files changed, 25 insertions, 9 deletions
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index 73dfe03898e..eb30a6acc53 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -195,7 +195,7 @@ the customization buffer:
195 195
196 The first line shows that the variable is named 196 The first line shows that the variable is named
197@code{kill-ring-max}, formatted as @samp{Kill Ring Max} for easier 197@code{kill-ring-max}, formatted as @samp{Kill Ring Max} for easier
198viewing. Its value is @samp{60}. The button labeled @samp{[Hide]}, 198viewing. Its value is @samp{120}. The button labeled @samp{[Hide]},
199if activated, hides the variable's value and state; this is useful to 199if activated, hides the variable's value and state; this is useful to
200avoid cluttering up the customization buffer with very long values 200avoid cluttering up the customization buffer with very long values
201(for this reason, variables that have very long values may start out 201(for this reason, variables that have very long values may start out
diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi
index 6e4fd77e8b9..76fccdbdfec 100644
--- a/doc/emacs/killing.texi
+++ b/doc/emacs/killing.texi
@@ -353,7 +353,7 @@ other ways to move text around.)
353 353
354@vindex kill-ring-max 354@vindex kill-ring-max
355 The maximum number of entries in the kill ring is controlled by the 355 The maximum number of entries in the kill ring is controlled by the
356variable @code{kill-ring-max}. The default is 60. If you make a new 356variable @code{kill-ring-max}. The default is 120. If you make a new
357kill when this limit has been reached, Emacs makes room by deleting 357kill when this limit has been reached, Emacs makes room by deleting
358the oldest entry in the kill ring. 358the oldest entry in the kill ring.
359 359
diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi
index 6ecd552ebb0..81ae2536339 100644
--- a/doc/lispintro/emacs-lisp-intro.texi
+++ b/doc/lispintro/emacs-lisp-intro.texi
@@ -8767,7 +8767,7 @@ keeps the kill ring from growing too long. It looks like this:
8767 8767
8768The code checks whether the length of the kill ring is greater than 8768The code checks whether the length of the kill ring is greater than
8769the maximum permitted length. This is the value of 8769the maximum permitted length. This is the value of
8770@code{kill-ring-max} (which is 60, by default). If the length of the 8770@code{kill-ring-max} (which is 120, by default). If the length of the
8771kill ring is too long, then this code sets the last element of the 8771kill ring is too long, then this code sets the last element of the
8772kill ring to @code{nil}. It does this by using two functions, 8772kill ring to @code{nil}. It does this by using two functions,
8773@code{nthcdr} and @code{setcdr}. 8773@code{nthcdr} and @code{setcdr}.
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index 1e062be2c64..163ac9038b9 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -1342,7 +1342,7 @@ that @kbd{C-y} should yank.
1342@defopt kill-ring-max 1342@defopt kill-ring-max
1343The value of this variable is the maximum length to which the kill 1343The value of this variable is the maximum length to which the kill
1344ring can grow, before elements are thrown away at the end. The default 1344ring can grow, before elements are thrown away at the end. The default
1345value for @code{kill-ring-max} is 60. 1345value for @code{kill-ring-max} is 120.
1346@end defopt 1346@end defopt
1347 1347
1348@node Undo 1348@node Undo
diff --git a/etc/NEWS b/etc/NEWS
index 9daf958b07e..82847cf9b99 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -78,6 +78,14 @@ the point is now moved only when releasing the mouse button. This no
78longer results in a bogus selection, unless the mouse has been 78longer results in a bogus selection, unless the mouse has been
79effectively dragged. 79effectively dragged.
80 80
81+++
82** 'kill-ring-max' now defaults to 120.
83
84---
85** New user option 'yank-menu-max-items'.
86Customize this option to limit the amount of entries in the menu
87"Edit->Paste from Kill Menu". The default is 60.
88
81 89
82* Changes in Specialized Modes and Packages in Emacs 29.1 90* Changes in Specialized Modes and Packages in Emacs 29.1
83 91
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.")