Skip to content

Commit

Permalink
Add help for moccur.
Browse files Browse the repository at this point in the history
  • Loading branch information
thierryvolpiatto committed Aug 17, 2012
1 parent 9f15d07 commit b3194af
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 8 deletions.
22 changes: 15 additions & 7 deletions helm-config.el
Expand Up @@ -1176,11 +1176,12 @@ Preconfigured helm for pdfgrep.

;;;***

;;;### (autoloads (helm-describe-helm-attribute helm-buffers-ido-virtual-help
;;;;;; helm-esh-help helm-c-bookmark-help helm-c-ucs-help helm-etags-help
;;;;;; helm-pdfgrep-help helm-grep-help helm-generic-file-help helm-read-file-name-help
;;;;;; helm-ff-help helm-c-buffer-help helm-help) "helm-help" "helm-help.el"
;;;;;; (20509 62549 796231 595000))
;;;### (autoloads (helm-describe-helm-attribute helm-moccur-help
;;;;;; helm-buffers-ido-virtual-help helm-esh-help helm-c-bookmark-help
;;;;;; helm-c-ucs-help helm-etags-help helm-pdfgrep-help helm-grep-help
;;;;;; helm-generic-file-help helm-read-file-name-help helm-ff-help
;;;;;; helm-c-buffer-help helm-help) "helm-help" "helm-help.el"
;;;;;; (20525 60395 95335 217000))
;;; Generated autoloads from helm-help.el

(defvar helm-mode-line-string "\\<helm-map>\\[helm-help]:Help \\[helm-select-action]:Act \\[helm-exit-minibuffer]/\\[helm-select-2nd-action-or-end-of-line]/\\[helm-select-3rd-action]:NthAct" "\
Expand Down Expand Up @@ -1248,6 +1249,11 @@ Help command for `helm-find-files-eshell-command-on-file'.
(autoload 'helm-buffers-ido-virtual-help "helm-help" "\
Help command for ido virtual buffers.
\(fn)" t nil)

(autoload 'helm-moccur-help "helm-help" "\
\(fn)" t nil)

(defvar helm-buffer-mode-line-string '("Buffer(s)" "\\<helm-c-buffer-map>\\[helm-c-buffer-help]:Help \\<helm-map>\\[helm-select-action]:Act \\[helm-exit-minibuffer]/\\[helm-select-2nd-action-or-end-of-line]/\\[helm-select-3rd-action]:NthAct" "String displayed in mode-line in `helm-c-source-buffers-list'"))
Expand Down Expand Up @@ -1280,6 +1286,8 @@ String displayed in mode-line in `helm-c-source-buffers-list'")

(defvar helm-occur-mode-line "\\<helm-map>\\[helm-help]:Help \\<helm-occur-map>\\[helm-occur-run-query-replace-regexp]:Query replace regexp \\<helm-map>\\[helm-select-action]:Act \\[helm-exit-minibuffer]/\\[helm-select-2nd-action-or-end-of-line]/\\[helm-select-3rd-action]:NthAct")

(defvar helm-moccur-mode-line "\\<helm-c-moccur-map>\\[helm-moccur-help]:Help \\<helm-map>\\[helm-select-action]:Act \\[helm-exit-minibuffer]/\\[helm-select-2nd-action-or-end-of-line]/\\[helm-select-3rd-action]:NthAct")

(autoload 'helm-describe-helm-attribute "helm-help" "\
Display the full documentation of HELM-ATTRIBUTE.
HELM-ATTRIBUTE should be a symbol.
Expand Down Expand Up @@ -1559,7 +1567,7 @@ Preconfigured helm to show org headlines.
;;;***

;;;### (autoloads (helm-browse-code helm-multi-occur helm-occur helm-regexp)
;;;;;; "helm-regexp" "helm-regexp.el" (20525 53336 356333 25000))
;;;;;; "helm-regexp" "helm-regexp.el" (20525 59564 699217 616000))
;;; Generated autoloads from helm-regexp.el

(autoload 'helm-regexp "helm-regexp" "\
Expand Down Expand Up @@ -1758,7 +1766,7 @@ http://www.emacswiki.org/emacs/download/yaoddmuse.el
;;;***

;;;### (autoloads nil nil ("helm-pkg.el" "helm-plugin.el") (20525
;;;;;; 54703 174093 936000))
;;;;;; 60696 955597 892000))

;;;***

Expand Down
32 changes: 32 additions & 0 deletions helm-help.el
Expand Up @@ -478,6 +478,28 @@ is called once for each file like this:
(let ((helm-help-message helm-buffers-ido-virtual-help-message))
(helm-help)))

;;; Moccur help
;;
;;
(defvar helm-moccur-help-message
"== Helm Moccur Map ==\
\nHelm Moccur tips:
\nSpecific commands for Helm Moccur:
\\<helm-c-moccur-map>
\\[helm-c-goto-next-file]\t->Next Buffer.
\\[helm-c-goto-precedent-file]\t\t->Precedent Buffer.
\\[helm-yank-text-at-point]\t\t->Yank Text at point in minibuffer.
\\[helm-moccur-help]\t\t->Show this help.
\n== Helm Map ==
\\{helm-map}")

;;;###autoload
(defun helm-moccur-help ()
(interactive)
(let ((helm-help-message helm-moccur-help-message))
(helm-help)))


;;; Mode line strings
;;
Expand Down Expand Up @@ -607,6 +629,16 @@ is called once for each file like this:
\\[helm-select-2nd-action-or-end-of-line]/\
\\[helm-select-3rd-action]:NthAct")

;;;###autoload
(defvar helm-moccur-mode-line "\
\\<helm-c-moccur-map>\
\\[helm-moccur-help]:Help \
\\<helm-map>\
\\[helm-select-action]:Act \
\\[helm-exit-minibuffer]/\
\\[helm-select-2nd-action-or-end-of-line]/\
\\[helm-select-3rd-action]:NthAct")



;;; Attribute Documentation
Expand Down
3 changes: 2 additions & 1 deletion helm-regexp.el
Expand Up @@ -68,6 +68,7 @@ to a specific `major-mode'."
(define-key map (kbd "M-<down>") 'helm-c-goto-next-file)
(define-key map (kbd "M-<up>") 'helm-c-goto-precedent-file)
(define-key map (kbd "C-w") 'helm-yank-text-at-point)
(define-key map (kbd "C-c ?") 'helm-moccur-help)
(delq nil map))
"Keymap used in Moccur source.")

Expand Down Expand Up @@ -256,7 +257,7 @@ arg METHOD can be one of buffer, buffer-other-window, buffer-other-frame."
(action . (("Go to Line" . helm-m-occur-goto-line)))
(recenter)
(candidate-number-limit . 9999)
(mode-line . helm-occur-mode-line)
(mode-line . helm-moccur-mode-line)
(keymap . ,helm-c-moccur-map)
(requires-pattern . 3))
"Helm source for multi occur.")
Expand Down

0 comments on commit b3194af

Please sign in to comment.