branch: master
commit 7711c0c1f581c55ea6e6baabb488447a38d9eb51
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
counsel.el (counsel-set-variable): Disallow '(function)
Fixes #960
---
counsel.el | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/counsel.el b/counsel.el
index 7532c4e..dc587ca 100644
--- a/counsel.el
+++ b/counsel.el
@@ -525,11 +525,12 @@ X is an item of a radio- or choice-type defcustom."
(let (y)
(when (and (listp x)
(consp (setq y (last x))))
- (setq x (car y))
- (cons (prin1-to-string x)
- (if (symbolp x)
- (list 'quote x)
- x)))))
+ (unless (equal y '(function))
+ (setq x (car y))
+ (cons (prin1-to-string x)
+ (if (symbolp x)
+ (list 'quote x)
+ x))))))
;;;###autoload
(defun counsel-set-variable ()