mu4e: whitespace / typo fixes

This commit is contained in:
Dirk-Jan C. Binnema
2024-08-18 19:50:19 +03:00
parent 6092a26d02
commit c58eacc0d5
4 changed files with 49 additions and 23 deletions

View File

@ -244,7 +244,7 @@ BASE-NAME is the base filename without any Maildir decoration."
(format "%s%s2,DS" base-name mu4e-maildir-info-delimiter)))) (format "%s%s2,DS" base-name mu4e-maildir-info-delimiter))))
(defun mu4e--fcc-path (base-name &optional parent) (defun mu4e--fcc-path (base-name &optional parent)
"Construct a Fcc: path, based on PARENT and `mu4e-sent-messages-behavior'. "Construct an Fcc: path, based on PARENT and `mu4e-sent-messages-behavior'.
PARENT is either nil or the original message (being replied PARENT is either nil or the original message (being replied
to/forwarded etc.), and is used to determine the sent folder, to/forwarded etc.), and is used to determine the sent folder,

View File

@ -1,6 +1,24 @@
;;; mu4e-notification.el --- Showing mail notifications -*- lexical-binding: t-*- ;;; mu4e-notification.el --- Mail notifications -*- lexical-binding: t-*-
;;
;; Copyright (C) 1996-2023 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> ;; Copyright (C) 2023-2024 Dirk-Jan C. Binnema
;; Author: Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
;; Maintainer: Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
;; SPDX-License-Identifier: GPL-3.0-or-later
;; mu4e is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; mu4e is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with mu4e. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary: ;;; Commentary:
;;; Generic support for showing new-mail notifications. ;;; Generic support for showing new-mail notifications.
@ -10,11 +28,13 @@
(require 'mu4e-query-items) (require 'mu4e-query-items)
(require 'mu4e-bookmarks) (require 'mu4e-bookmarks)
;; for emacs' built-in desktop notifications to work, we need ;; for Emacs' built-in desktop notifications to work, we need
;; dbus ;; DBus
(when (featurep 'dbus) (when (featurep 'dbus)
(require 'notifications)) (require 'notifications))
;;; Options
(defcustom mu4e-notification-filter #'mu4e--default-notification-filter (defcustom mu4e-notification-filter #'mu4e--default-notification-filter
"Function for determining if a notification is to be emitted. "Function for determining if a notification is to be emitted.
@ -38,6 +58,9 @@ now."
:type 'function :type 'function
:group 'mu4e-notification) :group 'mu4e-notification)
;;; Implementation
(defvar mu4e--notification-id nil (defvar mu4e--notification-id nil
"The last notification id, so we can replace it.") "The last notification id, so we can replace it.")
@ -45,8 +68,8 @@ now."
"Return t if a notification should be shown. "Return t if a notification should be shown.
This default implementation does so when the number of unread This default implementation does so when the number of unread
messages changed since the last notification and it is greater messages changed since the last notification and is greater than
than zero." zero."
(when-let* ((fav (mu4e-bookmark-favorite)) (when-let* ((fav (mu4e-bookmark-favorite))
(delta-unread (plist-get fav :delta-unread))) (delta-unread (plist-get fav :delta-unread)))
(when (and (> delta-unread 0) (when (and (> delta-unread 0)
@ -57,7 +80,7 @@ than zero."
(defun mu4e--default-notification-function (&optional _) (defun mu4e--default-notification-function (&optional _)
"Default function for handling notifications. "Default function for handling notifications.
The default implementation uses emacs' built-in dbus-notification The default implementation uses Emacs' built-in DBus-notification
support." support."
(when-let* ((fav (mu4e-bookmark-favorite)) (when-let* ((fav (mu4e-bookmark-favorite))
(title "mu4e found new mail") (title "mu4e found new mail")

View File

@ -1,12 +1,14 @@
;;; mu4e.el --- Mu4e, the mu mail user agent -*- lexical-binding: t -*- ;;; mu4e.el --- Mu4e, the mu mail user agent -*- lexical-binding: t -*-
;; Copyright (C) 2011-2023 Dirk-Jan C. Binnema ;; Copyright (C) 2011-2024 Dirk-Jan C. Binnema
;; Author: Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> ;; Author: Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
;; Maintainer: Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> ;; Maintainer: Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
;; Homepage: https://www.djcbsoftware.nl/code/mu/
;; Keywords: email ;; Keywords: email
;; This file is not part of GNU Emacs. ;; SPDX-License-Identifier: GPL-3.0-or-later
;; mu4e is free software: you can redistribute it and/or modify ;; mu4e is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by ;; it under the terms of the GNU General Public License as published by
@ -24,6 +26,7 @@
;;; Commentary: ;;; Commentary:
;;; Code: ;;; Code:
(require 'mu4e-obsolete) (require 'mu4e-obsolete)
(require 'mu4e-vars) (require 'mu4e-vars)