comparison lisp/menu-bar.el @ 67430:2c1c0c628ff3

(menu-bar-edit-menu): Add listp around pending-undo-list to disable menu item "undo" when pending undo list is empty.
author Juri Linkov <juri@jurta.org>
date Fri, 09 Dec 2005 09:59:55 +0000
parents c9d9dfe47d58
children 7c0bd57ed595
comparison
equal deleted inserted replaced
67429:3ff7903b19d7 67430:2c1c0c628ff3
479 (define-key menu-bar-edit-menu [undo] 479 (define-key menu-bar-edit-menu [undo]
480 '(menu-item "Undo" undo 480 '(menu-item "Undo" undo
481 :enable (and (not buffer-read-only) 481 :enable (and (not buffer-read-only)
482 (not (eq t buffer-undo-list)) 482 (not (eq t buffer-undo-list))
483 (if (eq last-command 'undo) 483 (if (eq last-command 'undo)
484 pending-undo-list 484 (listp pending-undo-list)
485 (consp buffer-undo-list))) 485 (consp buffer-undo-list)))
486 :help "Undo last operation")) 486 :help "Undo last operation"))
487 487
488 488
489 (defun menu-bar-kill-ring-save (beg end) 489 (defun menu-bar-kill-ring-save (beg end)