Mercurial > hg > xemacs-beta
comparison lisp/modes/imenu.el @ 82:6a378aca36af r20-0b91
Import from CVS: tag r20-0b91
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:07:36 +0200 |
parents | 131b0175ea99 |
children |
comparison
equal
deleted
inserted
replaced
81:ebca3d831cea | 82:6a378aca36af |
---|---|
785 NAME is a string used to name the menu bar item. | 785 NAME is a string used to name the menu bar item. |
786 See the command `imenu' for more information." | 786 See the command `imenu' for more information." |
787 (interactive "sImenu menu item name: ") | 787 (interactive "sImenu menu item name: ") |
788 (let ((newmap (make-sparse-keymap)) | 788 (let ((newmap (make-sparse-keymap)) |
789 (menu-bar (lookup-key (current-local-map) [menu-bar]))) | 789 (menu-bar (lookup-key (current-local-map) [menu-bar]))) |
790 (define-key newmap [menu-bar] | 790 (when menu-bar |
791 (append (make-sparse-keymap) menu-bar)) | 791 (define-key newmap [menu-bar] |
792 (define-key newmap [menu-bar index] | 792 (append (make-sparse-keymap) menu-bar)) |
793 (cons name (nconc (make-sparse-keymap "Imenu") | 793 (define-key newmap [menu-bar index] |
794 (make-sparse-keymap)))) | 794 (cons name (nconc (make-sparse-keymap "Imenu") |
795 (use-local-map (append newmap (current-local-map)))) | 795 (make-sparse-keymap)))) |
796 (use-local-map (append newmap (current-local-map))))) | |
796 (add-hook 'menu-bar-update-hook 'imenu-update-menubar)) | 797 (add-hook 'menu-bar-update-hook 'imenu-update-menubar)) |
797 | 798 |
798 (defvar imenu-buffer-menubar nil) | 799 (defvar imenu-buffer-menubar nil) |
799 | 800 |
800 (defun imenu-update-menubar () | 801 (defun imenu-update-menubar () |