-;; A simple (require 'achievements). However, currently it is also
-;; highly recommended to install the keyfreq or command-frequency
-;; package in order to get all the functionality.
-;; Running `achievements-list-achievements' will show a list of all
-;; unlocked achievements.
;; TODO: easy way to show a random unearned achievement, perhaps on an idle timer
(let ((pred (emacs-achievement-predicate achievement)))
+ (message "Error while checking if you have earned the %s achievement"
+ (emacs-achievement-name achievement))))))))
(defun achievements-get-achievements-by-name (name)
"Return the achievement identified by NAME."
collect (list (emacs-achievement-name achievement)
- (cond ((eq pred nil) "✗")
- (if (funcall pred) "✓" ""))
+ (cond ((achievements-earned-p achievement) "✓")
(format "%s" (emacs-achievement-points achievement))
(if (achievements-earned-p achievement)
(menu-map (make-sparse-keymap "Achievements")))
(set-keymap-parent map tabulated-list-mode-map)
(define-key map "d" 'achievements-disable)
+ ;; (define-key map "t" 'achievements-toggle-show-disabled)
(define-key map [menu-bar achievements-menu] (cons "Achievements" menu-map))
(define-key menu-map [mq]
'(menu-item "Quit" quit-window