# HG changeset patch # User Richard M. Stallman # Date 791426242 0 # Node ID 9f68d8d6357b6b458fef79d5d7b1bc6c428a03b3 # Parent 4d7bc901319af5584a81351d220b5f879ae8b811 (menu-bar-update-yank-menu): If string is too long, show start and end, with ... between them. (yank-menu-length): Default value 20. diff -r 4d7bc901319a -r 9f68d8d6357b lisp/menu-bar.el --- 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))