Permalink
Browse files

* Rename all helm-c-source* functions in various places.

* helm-elisp.el
* helm-adaptative.el
* helm-tags.el
  • Loading branch information...
1 parent 70991e7 commit 89b9ebd6ebaa2942474fbc60f4cc756611638382 @thierryvolpiatto thierryvolpiatto committed Jan 5, 2013
Showing with 18 additions and 18 deletions.
  1. +4 −4 helm-adaptative.el
  2. +10 −10 helm-elisp.el
  3. +4 −4 helm-tags.el
View
@@ -69,7 +69,7 @@ Format: ((SOURCE-NAME (SELECTED-CANDIDATE (PATTERN . NUMBER-OF-USE) ...) ...) ..
(remove-hook 'helm-before-action-hook 'helm-c-adaptive-store-selection)
(remove-hook 'helm-select-action-hook 'helm-c-adaptive-store-selection)))
-(defun helm-c-source-use-adaptative-p (&optional source-name)
+(defun helm-adapt-use-adaptative-p (&optional source-name)
"Return current source only if it use adaptative history, nil otherwise."
(when helm-adaptative-mode
(let* ((source (or source-name (helm-get-current-source)))
@@ -82,14 +82,14 @@ Format: ((SOURCE-NAME (SELECTED-CANDIDATE (PATTERN . NUMBER-OF-USE) ...) ...) ..
(assoc-default 'filtered-candidate-transformer source)
(assoc-default 'candidate-transformer source))))
(if (listp adapt-source)
- (when (member 'helm-c-adaptive-sort adapt-source) source)
- (when (eq adapt-source 'helm-c-adaptive-sort) source)))))
+ (and (member 'helm-c-adaptive-sort adapt-source) source)
+ (and (eq adapt-source 'helm-c-adaptive-sort) source)))))
(defun helm-c-adaptive-store-selection ()
"Store history information for the selected candidate."
(unless helm-c-adaptive-done
(setq helm-c-adaptive-done t)
- (let ((source (helm-c-source-use-adaptative-p)))
+ (let ((source (helm-adapt-use-adaptative-p)))
(when source
(let* ((source-name (or (assoc-default 'type source)
(assoc-default 'name source)))
View
@@ -284,15 +284,15 @@ Filename completion happen if string start after or between a double quote."
(keywordp s))
do (insert (concat sym "\n")))))
-(defun helm-c-source-emacs-variables (&optional default)
+(defun helm-def-source--emacs-variables (&optional default)
`((name . "Variables")
(init . (lambda ()
(helm-c-apropos-init 'boundp ,default)))
(candidates-in-buffer)
(action . (("Describe Variable" . helm-c-describe-variable)
("Find Variable" . helm-c-find-variable)))))
-(defun helm-c-source-emacs-faces (&optional default)
+(defun helm-def-source--emacs-faces (&optional default)
`((name . "Faces")
(init . (lambda ()
(helm-c-apropos-init 'facep ,default)))
@@ -303,7 +303,7 @@ Filename completion happen if string start after or between a double quote."
(action . (lambda (candidate)
(describe-face (intern candidate))))))
-(defun helm-c-source-helm-attributes (&optional default)
+(defun helm-def-source--helm-attributes (&optional default)
`((name . "Helm attributes")
(candidates . (lambda ()
(mapcar 'symbol-name helm-additional-attributes)))
@@ -314,15 +314,15 @@ Filename completion happen if string start after or between a double quote."
(with-output-to-temp-buffer "*Help*"
(princ (get (intern candidate) 'helm-attrdoc))))))))
-(defun helm-c-source-emacs-commands (&optional default)
+(defun helm-def-source--emacs-commands (&optional default)
`((name . "Commands")
(init . (lambda ()
(helm-c-apropos-init 'commandp ,default)))
(candidates-in-buffer)
(action . (("Describe Function" . helm-c-describe-function)
("Find Function" . helm-c-find-function)))))
-(defun helm-c-source-emacs-functions (&optional default)
+(defun helm-def-source--emacs-functions (&optional default)
`((name . "Functions")
(init . (lambda ()
(helm-c-apropos-init #'(lambda (x) (and (fboundp x)
@@ -340,11 +340,11 @@ Filename completion happen if string start after or between a double quote."
(helm :sources
(mapcar (lambda (func)
(funcall func default))
- '(helm-c-source-emacs-commands
- helm-c-source-emacs-functions
- helm-c-source-emacs-variables
- helm-c-source-emacs-faces
- helm-c-source-helm-attributes))
+ '(helm-def-source--emacs-commands
+ helm-def-source--emacs-functions
+ helm-def-source--emacs-variables
+ helm-def-source--emacs-faces
+ helm-def-source--helm-attributes))
:buffer "*helm apropos*"
:preselect (and default (concat "\\_<" (regexp-quote default) "\\_>")))))
View
@@ -56,7 +56,7 @@ Don't search tag file deeply if outside this value."
makefile-mode pascal-mode perl-mode cperl-mode php-mode python-mode
scheme-mode sh-mode slang-mode sql-mode tcl-mode ))
-(defun helm-c-source-ctags-init ()
+(defun helm-ctags-init ()
(when (and buffer-file-name
(memq major-mode helm-c-ctags-modes)
(helm-current-buffer-is-modified))
@@ -84,7 +84,7 @@ Don't search tag file deeply if outside this value."
(defvar helm-c-source-ctags
'((name . "Exuberant ctags")
- (init . helm-c-source-ctags-init)
+ (init . helm-ctags-init)
(candidates-in-buffer)
(adjust)
(type . line))
@@ -135,7 +135,7 @@ If not found in CURRENT-DIR search in upper directory."
(setq current-dir (expand-file-name (concat current-dir "../")))
finally return current-dir)))
-(defun helm-c-source-etags-header-name (x)
+(defun helm-etags-get-header-name (x)
"Create header name for this helm etags session."
(concat "Etags in "
(with-helm-current-buffer
@@ -190,7 +190,7 @@ If no entry in cache, create one."
(defvar helm-c-source-etags-select
`((name . "Etags")
- (header-name . helm-c-source-etags-header-name)
+ (header-name . helm-etags-get-header-name)
(init . helm-c-etags-init)
(candidates-in-buffer)
(match-part . (lambda (candidate)

0 comments on commit 89b9ebd

Please sign in to comment.