summaryrefslogtreecommitdiff
path: root/helm-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'helm-mode.el')
-rw-r--r--helm-mode.el11
1 files changed, 5 insertions, 6 deletions
diff --git a/helm-mode.el b/helm-mode.el
index 64838889..e6864797 100644
--- a/helm-mode.el
+++ b/helm-mode.el
@@ -388,12 +388,11 @@ that use `helm-comp-read' See `helm-M-x' for example."
:buffer buffer))
;; Avoid adding an incomplete input to history.
(when (and result history del-input)
- (cond (;; Be sure history is not a symbol with a nil value.
- (and (symbolp history)
- (symbol-value history))
- (setcar (eval history) result))
- (;; A list with a non--nil value.
- (consp history) (setcar history result))
+ (cond ((symbolp history) ; History is a symbol.
+ ;; Be sure history is not a symbol with a nil value.
+ (helm-aif (symbol-value history) (setcar it result)))
+ ((consp history) ; A list with a non--nil value.
+ (setcar history result))
(t ; Possibly a symbol with a nil value.
(set history (list result)))))
(or