branch: elpa/projectile
commit 58e33ef298a843984aa7b590233c81c8560d14cd
Author: Leo Cacciari <leo.cacci...@gmail.com>
Commit: GitHub <nore...@github.com>

    [Fix #1947] Mark projectile-project-name as safe (#1948)
    
    Safe values are:
    
     - nil to go back using `projectile-project-name-function'
     - non-blank strings
---
 CHANGELOG.md  | 2 +-
 projectile.el | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 05fcee0d44..096d9e7f2b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,7 +3,7 @@
 ## master (unreleased)
 
 ### Changes
-
+* [#1947](https://github.com/bbatsov/projectile/issues/1947): 
`projectile-project-name` should be marked as safe
 * Set `projectile-auto-discover` to `nil` by default.
 * [#1943](https://github.com/bbatsov/projectile/pull/1943): Consider 
`projectile-indexing-method` to be safe as a dir-local variable if it is one of 
the preset values.
 * [#1936](https://github.com/bbatsov/projectile/issues/1936): Do not require 
selecting a project when using `M-x projectile-invalidate-cache`, since there 
is a global cache that is also cleared by that command, even when not operating 
on any specific project.
diff --git a/projectile.el b/projectile.el
index 00867249e1..f27e31beb7 100644
--- a/projectile.el
+++ b/projectile.el
@@ -312,6 +312,9 @@ Two example filter functions are shipped by default -
 It has precedence over function `projectile-project-name-function'."
   :group 'projectile
   :type 'string
+  :safe (lambda (v) (or (null v)
+                        (and (stringp v)
+                             (not (string-blank-p v)))))
   :package-version '(projectile . "0.14.0"))
 
 (defcustom projectile-project-name-function 'projectile-default-project-name

Reply via email to