about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--lisp/acdw.el13
1 files changed, 12 insertions, 1 deletions
diff --git a/lisp/acdw.el b/lisp/acdw.el index 1a7e7f2..cdd6cf9 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el
@@ -461,7 +461,7 @@ Prompt only if there are unsaved changes."
461 (repeat 1 2 digit) 461 (repeat 1 2 digit)
462 (: (any ?a ?A ?p ?P) (any ?m ?M))) 462 (: (any ?a ?A ?p ?P) (any ?m ?M)))
463 (* nonl))) 463 (* nonl)))
464 (ss (sunrise-sunset)) 464 (ss (acdw/supress-messages #'sunrise-sunset))
465 (_m (string-match times-regex ss)) 465 (_m (string-match times-regex ss))
466 (sunrise-time (match-string 1 ss)) 466 (sunrise-time (match-string 1 ss))
467 (sunset-time (match-string 2 ss))) 467 (sunset-time (match-string 2 ss)))
@@ -469,6 +469,17 @@ Prompt only if there are unsaved changes."
469 (run-at-time sunset-time (* 60 60 24) sunset-command) 469 (run-at-time sunset-time (* 60 60 24) sunset-command)
470 (run-at-time "12:00am" (* 60 60 24) sunset-command))) 470 (run-at-time "12:00am" (* 60 60 24) sunset-command)))
471 471
472(defun acdw/supress-messages (oldfn &rest args) ; from pkal
473 "Advice wrapper for suppressing `message'.
474OLDFN is the wrapped function, that is passed the arguments
475ARGS."
476 (let ((msg (current-message)))
477 (prog1
478 (let ((inhibit-message t))
479 (apply oldfn args))
480 (when msg
481 (message "%s" msg)))))
482
472(defun acdw/setup-fringes () 483(defun acdw/setup-fringes ()
473 "Set up fringes how I likes 'em." 484 "Set up fringes how I likes 'em."
474 (define-fringe-bitmap 'left-curly-arrow 485 (define-fringe-bitmap 'left-curly-arrow