/[emacs]/emacs/lisp/menu-bar.el
ViewVC logotype

Diff of /emacs/lisp/menu-bar.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.205 by rms, Sun Mar 31 03:15:52 2002 UTC revision 1.206 by pj, Thu Apr 11 13:39:41 2002 UTC
# Line 285  A large number or nil slows down menu re Line 285  A large number or nil slows down menu re
285  (define-key menu-bar-adv-search-menu [re-search-forward]  (define-key menu-bar-adv-search-menu [re-search-forward]
286    '(menu-item "Search Regexp..." nonincremental-re-search-forward    '(menu-item "Search Regexp..." nonincremental-re-search-forward
287                :help "Search forward for a regular expression"))                :help "Search forward for a regular expression"))
288    (define-key menu-bar-adv-search-menu [separator-tag-isearch]
289      '(menu-item "--"))
290    (define-key menu-bar-adv-search-menu [isearch-backward]
291      '(menu-item "Incremental Search Backwards..." isearch-backward
292                  :help "Incremental search backwards for a string"))
293    (define-key menu-bar-adv-search-menu [isearch-forward]
294      '(menu-item "Incremental Search..." isearch-forward
295                  :help "Incremental search forward for a string"))
296  (define-key menu-bar-search-menu [re-search]  (define-key menu-bar-search-menu [re-search]
297    (list 'menu-item "Advanced Search/Replace" menu-bar-adv-search-menu    (list 'menu-item "Advanced Search/Replace" menu-bar-adv-search-menu
298                :help "Regexp and Tags search and replace"))                :help "Regexp and Tags search and replace"))
# Line 530  Do the same for the keys of the same nam Line 538  Do the same for the keys of the same nam
538                  (substring help 1) ".")                  (substring help 1) ".")
539         (interactive)         (interactive)
540         (if ,(if body `(progn . ,body)         (if ,(if body `(progn . ,body)
541                `(progn                `(progn
542                   (custom-load-symbol ',variable)                   (custom-load-symbol ',variable)
543                   (let ((set (or (get ',variable 'custom-set) 'set-default))                   (let ((set (or (get ',variable 'custom-set) 'set-default))
544                         (get (or (get ',variable 'custom-get) 'default-value)))                         (get (or (get ',variable 'custom-get) 'default-value)))
# Line 543  Do the same for the keys of the same nam Line 551  Do the same for the keys of the same nam
551       ;; options the user have already set explicitly in his init       ;; options the user have already set explicitly in his init
552       ;; file.  Unfortunately, he could very likely call the function       ;; file.  Unfortunately, he could very likely call the function
553       ;; defined above there.  So we put `customize-mark-as-set' in a       ;; defined above there.  So we put `customize-mark-as-set' in a
554       ;; lambda expression.       ;; lambda expression.
555       ;; -- Per Abrahamsen <abraham@dina.kvl.dk> 2002-02-11.       ;; -- Per Abrahamsen <abraham@dina.kvl.dk> 2002-02-11.
556       '(menu-item ,doc (lambda ()       '(menu-item ,doc (lambda ()
557                          (interactive)                          (interactive)
# Line 616  Do the same for the keys of the same nam Line 624  Do the same for the keys of the same nam
624      (message "Display-time mode disabled.")))      (message "Display-time mode disabled.")))
625    
626  (define-key menu-bar-showhide-menu [showhide-date-time]  (define-key menu-bar-showhide-menu [showhide-date-time]
627    '(menu-item "Date and time" (lambda ()    '(menu-item "Date and Time" (lambda ()
628                                  (interactive)                                  (interactive)
629                                  (showhide-date-time)                                  (showhide-date-time)
630                                  (customize-mark-as-set 'display-time-mode))                                  (customize-mark-as-set 'display-time-mode))
# Line 632  Do the same for the keys of the same nam Line 640  Do the same for the keys of the same nam
640                :button (:toggle                :button (:toggle
641                         . (and (boundp 'speedbar-frame)                         . (and (boundp 'speedbar-frame)
642                                (frame-live-p (symbol-value 'speedbar-frame))                                (frame-live-p (symbol-value 'speedbar-frame))
643                                (frame-visible-p                                (frame-visible-p
644                                 (symbol-value 'speedbar-frame))))))                                 (symbol-value 'speedbar-frame))))))
645    
646  (defvar menu-bar-showhide-scroll-bar-menu (make-sparse-keymap "Scroll-bar"))  (defvar menu-bar-showhide-scroll-bar-menu (make-sparse-keymap "Scroll-bar"))
647    
648  (define-key menu-bar-showhide-scroll-bar-menu [right]  (define-key menu-bar-showhide-scroll-bar-menu [right]
649    '(menu-item "On the Right"    '(menu-item "On the Right"
650                (lambda ()                (lambda ()
651                  (interactive)                  (interactive)
652                  (customize-set-variable 'scroll-bar-mode 'right))                  (customize-set-variable 'scroll-bar-mode 'right))
# Line 648  Do the same for the keys of the same nam Line 656  Do the same for the keys of the same nam
656                                                 (frame-parameters))) 'right))))                                                 (frame-parameters))) 'right))))
657    
658  (define-key menu-bar-showhide-scroll-bar-menu [left]  (define-key menu-bar-showhide-scroll-bar-menu [left]
659    '(menu-item "On the Left"            '(menu-item "On the Left"
660                (lambda ()                (lambda ()
661                  (interactive)                  (interactive)
662                  (customize-set-variable 'scroll-bar-mode 'left))                  (customize-set-variable 'scroll-bar-mode 'left))
# Line 658  Do the same for the keys of the same nam Line 666  Do the same for the keys of the same nam
666                                                 (frame-parameters))) 'left))))                                                 (frame-parameters))) 'left))))
667    
668  (define-key menu-bar-showhide-scroll-bar-menu [none]  (define-key menu-bar-showhide-scroll-bar-menu [none]
669    '(menu-item "None"    '(menu-item "None"
670                (lambda ()                (lambda ()
671                  (interactive)                  (interactive)
672                  (customize-set-variable 'scroll-bar-mode nil))                  (customize-set-variable 'scroll-bar-mode nil))
# Line 668  Do the same for the keys of the same nam Line 676  Do the same for the keys of the same nam
676                                                 (frame-parameters))) nil))))                                                 (frame-parameters))) nil))))
677    
678  (define-key menu-bar-showhide-menu [showhide-scroll-bar]  (define-key menu-bar-showhide-menu [showhide-scroll-bar]
679    (list 'menu-item "Scroll-Bar" menu-bar-showhide-scroll-bar-menu    (list 'menu-item "Scroll-bar" menu-bar-showhide-scroll-bar-menu
680          :visible 'window-system          :visible 'window-system
681          :help "Select scroll-bar mode"))          :help "Select scroll-bar mode"))
682    
# Line 681  Do the same for the keys of the same nam Line 689  Do the same for the keys of the same nam
689      (message "Menu-bar mode disabled.  Use M-x menu-bar-mode to make the menu bar appear.")))      (message "Menu-bar mode disabled.  Use M-x menu-bar-mode to make the menu bar appear.")))
690    
691  (define-key menu-bar-showhide-menu [showhide-menu-bar]  (define-key menu-bar-showhide-menu [showhide-menu-bar]
692    '(menu-item "Menu-bar"    '(menu-item "Menu-bar"
693                (lambda ()                (lambda ()
694                  (interactive)                  (interactive)
695                  (showhide-menu-bar)                  (showhide-menu-bar)
# Line 697  Do the same for the keys of the same nam Line 705  Do the same for the keys of the same nam
705      (message "Tool-bar mode disabled.")))      (message "Tool-bar mode disabled.")))
706    
707  (define-key menu-bar-showhide-menu [showhide-tool-bar]  (define-key menu-bar-showhide-menu [showhide-tool-bar]
708    '(menu-item "Tool-bar"    '(menu-item "Tool-bar"
709                (lambda ()                (lambda ()
710                  (interactive)                  (interactive)
711                  (showhide-tool-bar)                  (showhide-tool-bar)
# Line 778  Do the same for the keys of the same nam Line 786  Do the same for the keys of the same nam
786                  (interactive)                  (interactive)
787                  (toggle-text-mode-auto-fill)                  (toggle-text-mode-auto-fill)
788                  ;; This is somewhat questionable, as `text-mode-hook'                  ;; This is somewhat questionable, as `text-mode-hook'
789                  ;; might have changed outside customize.                    ;; might have changed outside customize.
790                  ;; -- Per Abrahamsen <abraham@dina.kvl.dk> 2002-02-11.                  ;; -- Per Abrahamsen <abraham@dina.kvl.dk> 2002-02-11.
791                  (customize-mark-as-set 'text-mode-hook))                  (customize-mark-as-set 'text-mode-hook))
792                :help "Automatically fill text between left and right margins"                :help "Automatically fill text between left and right margins"
# Line 791  Do the same for the keys of the same nam Line 799  Do the same for the keys of the same nam
799                  (interactive)                  (interactive)
800                  (setq truncate-lines (not truncate-lines))                  (setq truncate-lines (not truncate-lines))
801                  (set-buffer-modified-p (buffer-modified-p))                  (set-buffer-modified-p (buffer-modified-p))
802                  (message "Truncate long lines %s"                  (message "Truncate long lines %s"
803                           (if truncate-lines "enabled" "disabled")))                           (if truncate-lines "enabled" "disabled")))
804                :help "Truncate long lines on the screen"                :help "Truncate long lines on the screen"
805                :button (:toggle . truncate-lines)))                :button (:toggle . truncate-lines)))

Legend:
Removed from v.1.205  
changed lines
  Added in v.1.206

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26