changeset 10590:9f68d8d6357b

(menu-bar-update-yank-menu): If string is too long, show start and end, with ... between them. (yank-menu-length): Default value 20.
author Richard M. Stallman <rms@gnu.org>
date Mon, 30 Jan 1995 00:37:22 +0000
parents 4d7bc901319a
children 5a049637599a
files lisp/menu-bar.el
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/menu-bar.el	Mon Jan 30 00:34:44 1995 +0000
+++ b/lisp/menu-bar.el	Mon Jan 30 00:37:22 1995 +0000
@@ -245,14 +245,17 @@
 		    pending-undo-list)
 	     buffer-undo-list)))
 
-(defvar yank-menu-length 100
+(defvar yank-menu-length 20
   "*Maximum length to display in the yank-menu.")
 
 (defun menu-bar-update-yank-menu (string old)
   (let ((front (car (cdr yank-menu)))
 	(menu-string (if (<= (length string) yank-menu-length)
 			 string
-		       (substring string 0 yank-menu-length))))
+		       (concat
+			(substring string 0 (/ yank-menu-length 2))
+			"..."
+			(substring string (- (/ yank-menu-length 2)))))))
     ;; If we're supposed to be extending an existing string, and that
     ;; string really is at the front of the menu, then update it in place.
     (if (and old (or (eq old (car front))