summary refs log tree commit diff stats
path: root/lisp/acdw.el
diff options
context:
space:
mode:
authorCase Duckworth2021-09-09 16:40:54 -0500
committerCase Duckworth2021-09-09 16:40:54 -0500
commitf999faf44dd374d9456cc299d1a3a60e7f8cf3bb (patch)
treee76f74cba2498e4eaee2b94b9ca002d478f4593f /lisp/acdw.el
parentFix typo (diff)
downloademacs-f999faf44dd374d9456cc299d1a3a60e7f8cf3bb.tar.gz
emacs-f999faf44dd374d9456cc299d1a3a60e7f8cf3bb.zip
Add suppress-messages
Diffstat (limited to 'lisp/acdw.el')
-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