diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2012-04-07 10:24:33 +0200 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2012-04-07 10:24:33 +0200 |
commit | cd1aa7e14ca37157cb7dee2e4a3fa7f1aeb901fc (patch) | |
tree | 3940047894b3b630ae00339cf0227acf0c83b0df /helm-color.el | |
parent | 4c0e84656983509e3d12b20c3a4b8585eed2a0f3 (diff) |
New command to show all and some arrangements.
* helm-color.el
(helm-custom-faces-init): new
(helm-c-source-customize-face): use it
* helm-utils.el
(helm-show-all-in-this-source-only): Show only current source of this helm session.
(helm-show-all-candidates): Overhide helm-candidate-number-limit.
* helm.el
(helm-set-source-filter): don't loose cur selection.
(helm-init-candidates-in-buffer): Initialize a candidates-in-buffer session more easily.
Diffstat (limited to 'helm-color.el')
-rw-r--r-- | helm-color.el | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/helm-color.el b/helm-color.el index c3aad06a..3bfc57f1 100644 --- a/helm-color.el +++ b/helm-color.el @@ -22,18 +22,24 @@ ;;; Customize Face ;; ;; +(defun helm-custom-faces-init () + "Initialize buffer for `helm-c-source-customize-face'." + (unless (helm-candidate-buffer) + (save-selected-window + (list-faces-display)) + (let ((cands (with-current-buffer (get-buffer "*Faces*") + (goto-char (point-min)) + (forward-line 3) + (buffer-substring (point) (point-max))))) + (helm-init-candidates-in-buffer "*helm faces*" cands)))) + (defvar helm-c-source-customize-face '((name . "Customize Face") - (init . (lambda () - (unless (helm-candidate-buffer) - (save-selected-window - (list-faces-display)) - (helm-candidate-buffer (get-buffer "*Faces*"))))) + (init . helm-custom-faces-init) (candidates-in-buffer) (get-line . buffer-substring) (action . (lambda (line) - (customize-face (intern (car (split-string line)))))) - (requires-pattern . 3)) + (customize-face (intern (car (split-string line))))))) "See (info \"(emacs)Faces\")") ;;; Colors browser @@ -41,10 +47,11 @@ ;; (defvar helm-c-source-colors '((name . "Colors") - (init . (lambda () (unless (helm-candidate-buffer) - (save-selected-window - (list-colors-display)) - (helm-candidate-buffer (get-buffer "*Colors*"))))) + (init . (lambda () + (unless (helm-candidate-buffer) + (save-selected-window + (list-colors-display)) + (helm-candidate-buffer (get-buffer "*Colors*"))))) (candidates-in-buffer) (get-line . buffer-substring) (action |