diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2011-02-10 11:56:00 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2011-02-10 11:56:00 -0500 |
commit | b016851cb127f91a7ffa5d8295e5f3d4fdd3222a (patch) | |
tree | e1ccff1ff1bf49670b0cea40ebd566e1449290ee /lisp/hi-lock.el | |
parent | 1be1d1e98e5465659b9633a3f1961e6dcc0b022a (diff) | |
download | emacs-b016851cb127f91a7ffa5d8295e5f3d4fdd3222a.tar.gz |
Move keymap initialization into declaration.
* lisp/textmodes/enriched.el (enriched-mode-map):
* lisp/textmodes/bib-mode.el (bib-mode-map):
* lisp/term/lk201.el (lk201-function-map):
* lisp/tar-mode.el (tar-mode-map):
* lisp/replace.el (occur-mode-map):
* lisp/progmodes/idlwave.el (idlwave-rinfo-mouse-map, idlwave-rinfo-map):
* lisp/progmodes/idlw-help.el (idlwave-help-mode-map):
* lisp/progmodes/gdb-mi.el (gdb-memory-format-menu, gdb-memory-unit-menu):
* lisp/play/solitaire.el (solitaire-mode-map):
* lisp/play/snake.el (snake-mode-map, snake-null-map):
* lisp/play/pong.el (pong-mode-map):
* lisp/play/handwrite.el (menu-bar-handwrite-map):
* lisp/play/gametree.el (gametree-mode-map):
* lisp/net/rcirc.el (rcirc-mode-map, rcirc-browse-url-map
(rcirc-multiline-minor-mode-map, rcirc-track-minor-mode-map):
* lisp/net/newst-plainview.el (newsticker-menu, newsticker-mode-map)
(newsticker--url-keymap):
* lisp/net/net-utils.el (nslookup-mode-map, ftp-mode-map):
* lisp/menu-bar.el (menu-bar-file-menu, menu-bar-i-search-menu)
(menu-bar-search-menu, menu-bar-replace-menu, menu-bar-goto-menu)
(menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-line-wrapping-menu, menu-bar-options-menu)
(menu-bar-games-menu, menu-bar-encryption-decryption-menu)
(menu-bar-tools-menu, menu-bar-describe-menu)
(menu-bar-search-documentation-menu, menu-bar-manuals-menu)
(menu-bar-help-menu):
* lisp/mail/rmailsum.el (rmail-summary-mode-map):
* lisp/kmacro.el (kmacro-step-edit-map):
* lisp/ibuffer.el (ibuffer-mode-groups-popup, ibuffer-mode-map)
(ibuffer-mode-operate-map):
* lisp/hi-lock.el (hi-lock-menu, hi-lock-map):
* lisp/emulation/vip.el (vip-mode-map):
* lisp/emacs-lisp/re-builder.el (reb-lisp-mode-map):
* lisp/bookmark.el (bookmark-bmenu-mode-map):
* lisp/help-mode.el (help-mode-map):
* lisp/erc/erc-list.el (erc-list-menu-mode-map):
* lisp/org/org-remember.el (org-remember-mode-map):
* lisp/org/org-src.el (org-src-mode-map): Move initialization into declaration.
Diffstat (limited to 'lisp/hi-lock.el')
-rw-r--r-- | lisp/hi-lock.el | 72 |
1 files changed, 37 insertions, 35 deletions
diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index d97e6cf4b08..a0b5844582b 100644 --- a/lisp/hi-lock.el +++ b/lisp/hi-lock.el @@ -238,45 +238,47 @@ a library is being loaded.") (make-variable-buffer-local 'hi-lock-file-patterns) (put 'hi-lock-file-patterns 'permanent-local t) -(defvar hi-lock-menu (make-sparse-keymap "Hi Lock") +(defvar hi-lock-menu + (let ((map (make-sparse-keymap "Hi Lock"))) + (define-key-after map [highlight-regexp] + '(menu-item "Highlight Regexp..." highlight-regexp + :help "Highlight text matching PATTERN (a regexp).")) + + (define-key-after map [highlight-phrase] + '(menu-item "Highlight Phrase..." highlight-phrase + :help "Highlight text matching PATTERN (a regexp processed to match phrases).")) + + (define-key-after map [highlight-lines-matching-regexp] + '(menu-item "Highlight Lines..." highlight-lines-matching-regexp + :help "Highlight lines containing match of PATTERN (a regexp).")) + + (define-key-after map [unhighlight-regexp] + '(menu-item "Remove Highlighting..." unhighlight-regexp + :help "Remove previously entered highlighting pattern." + :enable hi-lock-interactive-patterns)) + + (define-key-after map [hi-lock-write-interactive-patterns] + '(menu-item "Patterns to Buffer" hi-lock-write-interactive-patterns + :help "Insert interactively added REGEXPs into buffer at point." + :enable hi-lock-interactive-patterns)) + + (define-key-after map [hi-lock-find-patterns] + '(menu-item "Patterns from Buffer" hi-lock-find-patterns + :help "Use patterns (if any) near top of buffer.")) + map) "Menu for hi-lock mode.") -(define-key-after hi-lock-menu [highlight-regexp] - '(menu-item "Highlight Regexp..." highlight-regexp - :help "Highlight text matching PATTERN (a regexp).")) - -(define-key-after hi-lock-menu [highlight-phrase] - '(menu-item "Highlight Phrase..." highlight-phrase - :help "Highlight text matching PATTERN (a regexp processed to match phrases).")) - -(define-key-after hi-lock-menu [highlight-lines-matching-regexp] - '(menu-item "Highlight Lines..." highlight-lines-matching-regexp - :help "Highlight lines containing match of PATTERN (a regexp).")) - -(define-key-after hi-lock-menu [unhighlight-regexp] - '(menu-item "Remove Highlighting..." unhighlight-regexp - :help "Remove previously entered highlighting pattern." - :enable hi-lock-interactive-patterns)) - -(define-key-after hi-lock-menu [hi-lock-write-interactive-patterns] - '(menu-item "Patterns to Buffer" hi-lock-write-interactive-patterns - :help "Insert interactively added REGEXPs into buffer at point." - :enable hi-lock-interactive-patterns)) - -(define-key-after hi-lock-menu [hi-lock-find-patterns] - '(menu-item "Patterns from Buffer" hi-lock-find-patterns - :help "Use patterns (if any) near top of buffer.")) - -(defvar hi-lock-map (make-sparse-keymap "Hi Lock") +(defvar hi-lock-map + (let ((map (make-sparse-keymap "Hi Lock"))) + (define-key map "\C-xwi" 'hi-lock-find-patterns) + (define-key map "\C-xwl" 'highlight-lines-matching-regexp) + (define-key map "\C-xwp" 'highlight-phrase) + (define-key map "\C-xwh" 'highlight-regexp) + (define-key map "\C-xwr" 'unhighlight-regexp) + (define-key map "\C-xwb" 'hi-lock-write-interactive-patterns) + map) "Key map for hi-lock.") -(define-key hi-lock-map "\C-xwi" 'hi-lock-find-patterns) -(define-key hi-lock-map "\C-xwl" 'highlight-lines-matching-regexp) -(define-key hi-lock-map "\C-xwp" 'highlight-phrase) -(define-key hi-lock-map "\C-xwh" 'highlight-regexp) -(define-key hi-lock-map "\C-xwr" 'unhighlight-regexp) -(define-key hi-lock-map "\C-xwb" 'hi-lock-write-interactive-patterns) - ;; Visible Functions ;;;###autoload |