Mercurial > emacs
comparison lisp/menu-bar.el @ 2485:c34bbe650160
entered into RCS
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 08 Apr 1993 07:10:13 +0000 |
parents | 5a9d9dcc4750 |
children | 278580be9b4a |
comparison
equal
deleted
inserted
replaced
2484:6ddf357bd36c | 2485:c34bbe650160 |
---|---|
1 ;;; menu-bar.el --- Define a default menu bar. | |
2 ;; Copyright (C) 1993 Free Software Foundation, Inc. | |
3 | |
4 ;; This file is part of GNU Emacs. | |
5 | |
6 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
7 ;; it under the terms of the GNU General Public License as published by | |
8 ;; the Free Software Foundation; either version 2, or (at your option) | |
9 ;; any later version. | |
10 | |
11 ;; GNU Emacs is distributed in the hope that it will be useful, | |
12 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 ;; GNU General Public License for more details. | |
15 | |
16 ;; You should have received a copy of the GNU General Public License | |
17 ;; along with GNU Emacs; see the file COPYING. If not, write to | |
18 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | |
19 | |
20 | |
1 (define-key global-map [menu-bar] (make-sparse-keymap "menu-bar")) | 21 (define-key global-map [menu-bar] (make-sparse-keymap "menu-bar")) |
2 (setq menu-bar-help-menu (make-sparse-keymap "Help")) | 22 (setq menu-bar-help-menu (make-sparse-keymap "Help")) |
3 (define-key global-map [menu-bar help] (cons "Help" menu-bar-help-menu)) | 23 (define-key global-map [menu-bar help] (cons "Help" menu-bar-help-menu)) |
4 (setq menu-bar-edit-menu (make-sparse-keymap "Edit")) | 24 (setq menu-bar-edit-menu (make-sparse-keymap "Edit")) |
5 (define-key global-map [menu-bar edit] (cons "Edit" menu-bar-edit-menu)) | 25 (define-key global-map [menu-bar edit] (cons "Edit" menu-bar-edit-menu)) |
166 ;;; (buffer-name) | 186 ;;; (buffer-name) |
167 ;;; size | 187 ;;; size |
168 ;;; mode-name | 188 ;;; mode-name |
169 ;;; (or (buffer-file-name) "")))))) | 189 ;;; (or (buffer-file-name) "")))))) |
170 | 190 |
191 ;; Give all existing frames a menu bar. | |
171 (let ((frames (frame-list))) | 192 (let ((frames (frame-list))) |
172 (while frames | 193 (while frames |
173 (modify-frame-parameters (car frames) '((menu-bar-lines . 1))) | 194 (modify-frame-parameters (car frames) '((menu-bar-lines . 1))) |
174 (setq frames (cdr frames)))) | 195 (setq frames (cdr frames)))) |
196 | |
197 ;; Make frames created from now on have a menu bar. | |
175 (or (assq 'menu-bar-lines default-frame-alist) | 198 (or (assq 'menu-bar-lines default-frame-alist) |
176 (setq default-frame-alist | 199 (setq default-frame-alist |
177 (cons '(menu-bar-lines . 1) default-frame-alist))) | 200 (cons '(menu-bar-lines . 1) default-frame-alist))) |
201 | |
202 ;;; end of menu-bar.el |