comparison lisp/progmodes/hideshow.el @ 91912:b6212a3c659c

(hs-minor-mode-map): Move menu creation to top level.
author Dan Nicolaescu <dann@ics.uci.edu>
date Sun, 17 Feb 2008 18:55:24 +0000
parents 3952f2dc0abc
children f6fa050c615a
comparison
equal deleted inserted replaced
91911:07b62dd00afa 91912:b6212a3c659c
353 (define-key map "\C-c@\C-\M-h" 'hs-hide-all) 353 (define-key map "\C-c@\C-\M-h" 'hs-hide-all)
354 (define-key map "\C-c@\C-\M-s" 'hs-show-all) 354 (define-key map "\C-c@\C-\M-s" 'hs-show-all)
355 (define-key map "\C-c@\C-l" 'hs-hide-level) 355 (define-key map "\C-c@\C-l" 'hs-hide-level)
356 (define-key map "\C-c@\C-c" 'hs-toggle-hiding) 356 (define-key map "\C-c@\C-c" 'hs-toggle-hiding)
357 (define-key map [(shift mouse-2)] 'hs-mouse-toggle-hiding) 357 (define-key map [(shift mouse-2)] 'hs-mouse-toggle-hiding)
358 (easy-menu-define hs-minor-mode-menu map
359 "Menu used when hideshow minor mode is active."
360 '("Hide/Show"
361 ["Hide Block" hs-hide-block
362 :help "Hide the code or comment block at point"]
363 ["Show Block" hs-show-block
364 :help "Show the code or comment block at point"]
365 ["Hide All" hs-hide-all
366 :help "Hide all the blocks in the buffer"]
367 ["Show All" hs-show-all
368 :help "Show all the clocks in the buffer"]
369 ["Hide Level" hs-hide-level
370 :help "Hide all block at levels below the current block"]
371 ["Toggle Hiding" hs-toggle-hiding
372 :help "Toggle the hiding state of the current block"]))
373 map) 358 map)
374 "Keymap for hideshow minor mode.") 359 "Keymap for hideshow minor mode.")
360
361 (easy-menu-define hs-minor-mode-menu hs-minor-mode-map
362 "Menu used when hideshow minor mode is active."
363 '("Hide/Show"
364 ["Hide Block" hs-hide-block
365 :help "Hide the code or comment block at point"]
366 ["Show Block" hs-show-block
367 :help "Show the code or comment block at point"]
368 ["Hide All" hs-hide-all
369 :help "Hide all the blocks in the buffer"]
370 ["Show All" hs-show-all
371 :help "Show all the clocks in the buffer"]
372 ["Hide Level" hs-hide-level
373 :help "Hide all block at levels below the current block"]
374 ["Toggle Hiding" hs-toggle-hiding
375 :help "Toggle the hiding state of the current block"]))
375 376
376 (defvar hs-c-start-regexp nil 377 (defvar hs-c-start-regexp nil
377 "Regexp for beginning of comments. 378 "Regexp for beginning of comments.
378 Differs from mode-specific comment regexps in that 379 Differs from mode-specific comment regexps in that
379 surrounding whitespace is stripped.") 380 surrounding whitespace is stripped.")