Commits

Ivan Andrus  committed fd203ad

Improve achievements-variable-was-set to simply check if a variable has been changed

  • Participants
  • Parent commits 4661fa6

Comments (0)

Files changed (1)

File achievements-functions.el

   (if (listp var)
       (equal (symbol-value (car var)) (cadr var))
     ;; it was set via customize etc.
-    ))
+    (or (and (symbol-value var)
+             (string-match "\\(-hook\\|-function\\)\\'" (symbol-name var)))
+        (and
+         (get var 'custom-type) (get var 'standard-value)
+         (not (equal (symbol-value var) (eval (car (get var 'standard-value)))))))))
 
 (defun achievements-num-times-commands-were-run (command-list)
   "Return the number of times any one of the commands was run.