comparison lisp/menu-bar.el @ 19731:920d0a7b5930

(menu-bar-help-menu): Rename info item to "Info (Browse Manuals)". (menu-bar-options-menu): String now "Global Options". Rewrite the font lock toggle to turn off font lock on all buffers. Choose lazy-lock by setting font-lock-support-mode.
author Richard M. Stallman <rms@gnu.org>
date Wed, 03 Sep 1997 20:52:13 +0000
parents 6337e9a0ed92
children 8c5aca90861b
comparison
equal deleted inserted replaced
19730:1657f4dd8c05 19731:920d0a7b5930
357 '("Browse Customization Groups" . customize-browse)) 357 '("Browse Customization Groups" . customize-browse))
358 (define-key menu-bar-custom-menu [customize] 358 (define-key menu-bar-custom-menu [customize]
359 '("Top-level Customization Group" . customize)) 359 '("Top-level Customization Group" . customize))
360 360
361 ;; Options menu 361 ;; Options menu
362 (defvar menu-bar-options-menu (make-sparse-keymap "Options")) 362 (defvar menu-bar-options-menu (make-sparse-keymap "Global Options"))
363 363
364 (defmacro menu-bar-make-toggle (name variable doc message &rest body) 364 (defmacro menu-bar-make-toggle (name variable doc message &rest body)
365 `(progn 365 `(progn
366 (defun ,name () 366 (defun ,name ()
367 ,(concat doc ".") 367 ,(concat doc ".")
404 . toggle-text-mode-auto-fill)) 404 . toggle-text-mode-auto-fill))
405 (define-key menu-bar-options-menu [font-lock-mode] 405 (define-key menu-bar-options-menu [font-lock-mode]
406 (menu-bar-make-toggle toggle-font-lock-mode font-lock-mode 406 (menu-bar-make-toggle toggle-font-lock-mode font-lock-mode
407 "Toggle Font Lock (syntax highlighting)" 407 "Toggle Font Lock (syntax highlighting)"
408 "Font Lock mode %s" 408 "Font Lock mode %s"
409 (global-font-lock-mode) 409 (require 'font-lock)
410 (if font-lock-mode 410 (if global-font-lock-mode
411 (lazy-lock-mode t)) 411 (let ((buffers (buffer-list)))
412 font-lock-mode)) 412 (while buffers
413 (with-current-buffer (car buffers)
414 (if font-lock-mode
415 (font-lock-mode 0)))
416 (setq buffers (cdr buffers)))
417 (setq global-font-lock-mode nil))
418 (setq font-lock-support-mode 'lazy-lock-mode)
419 (global-font-lock-mode))
420 global-font-lock-mode))
413 421
414 (define-key menu-bar-help-menu [emacs-version] 422 (define-key menu-bar-help-menu [emacs-version]
415 '("Show Version" . emacs-version)) 423 '("Show Version" . emacs-version))
416 (define-key menu-bar-help-menu [report-emacs-bug] 424 (define-key menu-bar-help-menu [report-emacs-bug]
417 '("Send Bug Report..." . report-emacs-bug)) 425 '("Send Bug Report..." . report-emacs-bug))
431 '("List Keybindings" . describe-bindings)) 439 '("List Keybindings" . describe-bindings))
432 (define-key menu-bar-help-menu [command-apropos] 440 (define-key menu-bar-help-menu [command-apropos]
433 '("Command Apropos..." . command-apropos)) 441 '("Command Apropos..." . command-apropos))
434 (define-key menu-bar-help-menu [describe-mode] 442 (define-key menu-bar-help-menu [describe-mode]
435 '("Describe Mode" . describe-mode)) 443 '("Describe Mode" . describe-mode))
436 (define-key menu-bar-help-menu [info] '("Browse Manuals" . info)) 444 (define-key menu-bar-help-menu [info] '("Info (Browse Manuals)" . info))
437 (define-key menu-bar-help-menu [emacs-faq] '("Emacs FAQ" . view-emacs-FAQ)) 445 (define-key menu-bar-help-menu [emacs-faq] '("Emacs FAQ" . view-emacs-FAQ))
438 (define-key menu-bar-help-menu [emacs-news] '("Emacs News" . view-emacs-news)) 446 (define-key menu-bar-help-menu [emacs-news] '("Emacs News" . view-emacs-news))
439 (define-key menu-bar-help-menu [options-menu] 447 (define-key menu-bar-help-menu [options-menu]
440 (cons "Options" menu-bar-options-menu)) 448 (cons "Options" menu-bar-options-menu))
441 (define-key menu-bar-help-menu [customize-menu] 449 (define-key menu-bar-help-menu [customize-menu]