Skip to content

Commit 32a8bcf

Browse files
committed
Add README
1 parent 7e2f23c commit 32a8bcf

2 files changed

Lines changed: 26 additions & 3 deletions

File tree

README.org

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
* Projectile Variable
2+
3+
Store project local variables (property) using [[https://github.com/bbatsov/projectile][projectile]] and [[https://www.gnu.org/software/emacs/manual/html_node/elisp/Symbol-Plists.html][Symbol Plists]].
4+
5+
#+BEGIN_SRC emacs-lisp
6+
(projectile-variable-put 'foo-value 2) ;; Store property 'foo-value
7+
(projectile-variable-get 'foo-value) ;;=> 2
8+
9+
;; Return all project local property list
10+
(projectile-variable-plist)
11+
;; Return project local property list filterd by prefix "foo-"
12+
(projectile-variable-plist "foo-")
13+
;; Return all project local properties as association list (alist)
14+
(projectile-variable-alist)
15+
;; Return project local properties alist filterd by prefix "foo-"
16+
(projectile-variable-alist "foo-")
17+
#+END_SRC

projectile-variable.el

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,15 @@
2626

2727
;;; Commentary:
2828

29-
;; (projectile-variable-put 'hoge 2)
30-
;; (projectile-variable-get 'hoge)
31-
;; (projectile-variable-plist)
29+
;; Store project local variables (property).
30+
31+
;; (projectile-variable-put 'foo-value 2) ;; Store property
32+
;; (projectile-variable-get 'foo-value) ;;=> 2
33+
34+
;; (projectile-variable-plist) ;; Return all project local property list
35+
;; (projectile-variable-plist "foo-") ;; Return project local property list filterd by prefix "foo-"
36+
;; (projectile-variable-alist) ;; Return all project local properties as association list (alist)
37+
;; (projectile-variable-alist "foo-") ;; Return project local properties alist filterd by prefix "foo-"
3238

3339
;;; Code:
3440
(require 'cl-lib)

0 commit comments

Comments
 (0)