Skip to content

Commit

Permalink
Rename memento-mori-age-string to memento-mori-string which is more g…
Browse files Browse the repository at this point in the history
…eneric
  • Loading branch information
Ivan Andrus committed Mar 30, 2024
1 parent e8d0efe commit 8d506c1
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions memento-mori.el
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
;; Author: Lassi Kortela <[email protected]>
;; Maintainer: Ivan Andrus <[email protected]>
;; URL: https://github.com/gvol/emacs-memento-mori
;; Version: 0.1.0
;; Version: 0.2.0
;; Package-Requires: ((emacs "24.3"))
;; Keywords: help
;; SPDX-License-Identifier: ISC
Expand Down Expand Up @@ -49,8 +49,11 @@
:type 'string
:group 'memento-mori)

(defvar memento-mori-age-string ""
"Your age shown in the mode line when `memento-mori-mode' is enabled.")
(defvar memento-mori-string ""
"The string shown in the mode line when `memento-mori-mode' is enabled.")

Check warning on line 53 in memento-mori.el

View workflow job for this annotation

GitHub Actions / check (24.4, false)

Disambiguate memento-mori-mode by preceding w/ function,command,variable,option or symbol.

Check warning on line 53 in memento-mori.el

View workflow job for this annotation

GitHub Actions / check (25.1, false)

Disambiguate memento-mori-mode by preceding w/ function,command,variable,option or symbol.

Check warning on line 53 in memento-mori.el

View workflow job for this annotation

GitHub Actions / check (26.1, false)

Disambiguate memento-mori-mode by preceding w/ function,command,variable,option or symbol.

Check warning on line 53 in memento-mori.el

View workflow job for this annotation

GitHub Actions / check (26.2, false)

Disambiguate memento-mori-mode by preceding w/ function,command,variable,option or symbol.

Check warning on line 53 in memento-mori.el

View workflow job for this annotation

GitHub Actions / check (26.3, false)

Disambiguate memento-mori-mode by preceding w/ function,command,variable,option or symbol.

Check warning on line 53 in memento-mori.el

View workflow job for this annotation

GitHub Actions / check (27.1, false)

Disambiguate memento-mori-mode by preceding w/ function,command,variable,option or symbol.

Check warning on line 53 in memento-mori.el

View workflow job for this annotation

GitHub Actions / check (27.2, false)

Disambiguate memento-mori-mode by preceding w/ function,command,variable,option or symbol.

(define-obsolete-variable-alias 'memento-mori-age-string

Check warning on line 55 in memento-mori.el

View workflow job for this annotation

GitHub Actions / check (27.1, false)

Alias for ‘memento-mori-string’ should be declared before its referent

Check warning on line 55 in memento-mori.el

View workflow job for this annotation

GitHub Actions / check (27.2, false)

Alias for ‘memento-mori-string’ should be declared before its referent

Check warning on line 55 in memento-mori.el

View workflow job for this annotation

GitHub Actions / check (28.1, false)

Alias for ‘memento-mori-string’ should be declared before its referent

Check warning on line 55 in memento-mori.el

View workflow job for this annotation

GitHub Actions / check (28.2, false)

Alias for ‘memento-mori-string’ should be declared before its referent
'memento-mori-string "0.2.0")

Check warning on line 56 in memento-mori.el

View workflow job for this annotation

GitHub Actions / check (29.1, false)

Alias for ‘memento-mori-string’ should be declared before its referent

Check warning on line 56 in memento-mori.el

View workflow job for this annotation

GitHub Actions / check (release-snapshot, false)

Alias for ‘memento-mori-string’ should be declared before its referent

Check warning on line 56 in memento-mori.el

View workflow job for this annotation

GitHub Actions / check (snapshot, false)

Alias for ‘memento-mori-string’ should be declared before its referent

(defun memento-mori--assert-birth-date ()
"Ensure that `memento-mori-birth-date' has been set."
Expand Down Expand Up @@ -82,8 +85,8 @@ This is a floating point number based on `memento-mori-birth-date'."
(* 60 60 24 365.2425)))

(defun memento-mori--update ()
"Update `memento-mori-age-string' based on the current time."
(setq memento-mori-age-string
"Update `memento-mori-string' based on the current time."
(setq memento-mori-string
(format " %.2f years old" (memento-mori--age))))

;;;###autoload
Expand All @@ -99,9 +102,9 @@ omitted or nil."
(memento-mori--update)
(run-at-time "00:00" (* 60 60 24) #'memento-mori--update))
(setq global-mode-string
(append (delete 'memento-mori-age-string
(append (delete 'memento-mori-string
(or global-mode-string '("")))
(when memento-mori-mode '(memento-mori-age-string)))))
(when memento-mori-mode '(memento-mori-string)))))

(provide 'memento-mori)

Expand Down

0 comments on commit 8d506c1

Please sign in to comment.