aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri D'Elia <wavexx@users.noreply.github.com>2017-10-07 21:35:39 +0200
committerGitHub <noreply@github.com>2017-10-07 21:35:39 +0200
commit52e5de0961ce0f6890d5e7f26bc05152b99d9979 (patch)
tree2b370ba9d5a76ee5ee5a4030b1e74a5b40a2dcff
parent7d80d5e1894859e963584c55f570508fdf9c2ee0 (diff)
parent09a5aabf85b347a2c79b75396ded0ce5e69bbd65 (diff)
Merge pull request #10 from basil-conto/checkdoc
Appease checkdoc overlords and reduce repetition
-rw-r--r--gnus-desktop-notify.el53
1 files changed, 26 insertions, 27 deletions
diff --git a/gnus-desktop-notify.el b/gnus-desktop-notify.el
index f51efde..04cc5ec 100644
--- a/gnus-desktop-notify.el
+++ b/gnus-desktop-notify.el
@@ -54,9 +54,9 @@
;;
;; into your ``.gnus`` file. The default is to use `alert' if available, which
;; works on every operating system and allows the user to customize the
-;; notification through emacs. See https://github.com/jwiegley/alert#for-users
+;; notification through Emacs. See https://github.com/jwiegley/alert#for-users
;; for further info. If not available, the `notifications' library (part of
-;; emacs >= 24) is used, so no external dependencies are required. With emacs
+;; Emacs >= 24) is used, so no external dependencies are required. With Emacs
;; <= 23 instead the generic ``notify-send`` program is used, which (in Debian
;; or Ubuntu) is available in the ``libnotify-bin`` package.
;;
@@ -104,7 +104,7 @@ The backend is passed the notification content as a single,
potentially multi-line string argument.
The default is to use `gnus-desktop-notify-alert' if the `alert'
-package is available, `gnus-desktop-notify-dbus' on emacs >= 24,
+package is available, `gnus-desktop-notify-dbus' on Emacs >= 24,
or fallback to the generic `gnus-desktop-notify-send' otherwise.
The following functions are available (whose documentation see):
@@ -116,9 +116,9 @@ The following functions are available (whose documentation see):
:type 'function)
(defcustom gnus-desktop-notify-exec-program "xmessage"
- "Executable called by the `gnus-desktop-notify-exec'
-function. Each argument will be formatted according to
-`gnus-desktop-notify-format'"
+ "Executable called by the `gnus-desktop-notify-exec' function.
+Each argument will be formatted according to
+`gnus-desktop-notify-format'."
:type 'file)
(defcustom gnus-desktop-notify-send-program "notify-send"
@@ -133,8 +133,9 @@ See `gnus-desktop-notify-send-program'."
:type '(repeat (string :tag "Argument")))
(defcustom gnus-desktop-notify-behavior 'gnus-desktop-notify-multi
- "Desktop notification behavior. Can be either:
+ "Desktop notification aggregation behavior.
+Can be either:
`gnus-desktop-notify-single': Display a separate notification per
gnus group.
`gnus-desktop-notify-multi': Display a multi-line notification
@@ -149,18 +150,21 @@ supported (awesome and KDE are known to work)."
:type 'string)
(defcustom gnus-desktop-notify-format "%n:%G"
- "Format used to generate the notification text. When using
-notifications, some agents may support HTML formatting (awesome
-and KDE are known to work).
+ "Format used to generate the notification text.
+When using notifications, some agents may support HTML
+formatting (awesome and KDE are known to work).
%n Number of new messages in the group
%G Group name"
:type 'string)
(defcustom gnus-desktop-notify-uncollapsed-levels gnus-group-uncollapsed-levels
- "Number of group name elements to leave alone when making a shortened name
-for display from a group name.
-Value can be `gnus-group-uncollapsed-levels', an integer or `nil'
+ "Number of group name elements to preserve when collapsing.
+This variable is similar to `gnus-group-uncollapsed-levels'
+\(which see) and comes into effect when shortening group names
+for display.
+
+Value can be `gnus-group-uncollapsed-levels', an integer or nil
to deactivate shortening completely."
:type `(choice (const :tag "Standard `gnus-group-uncollapsed-levels'"
,gnus-group-uncollapsed-levels)
@@ -168,14 +172,15 @@ to deactivate shortening completely."
integer))
(defcustom gnus-desktop-notify-groups 'gnus-desktop-notify-all-except
- "Determine which gnus groups to monitor. Can be either:
+ "Determine which gnus groups to monitor.
+Can be either:
`gnus-desktop-notify-all-except': Monitor all groups by default
except excluded ones.
`gnus-desktop-notify-explicit': Monitor only specified groups.
Groups can be included or excluded by setting the `group-notify'
-group or topic parameter to `t' or `nil', respectively. Group
+group or topic parameter to t or nil, respectively. Group
parameters can be set collectively in the `gnus-parameters'
variable or per group in the group buffer. When point is over the
desired group, `G c' and `G p' give interactive and programmatic
@@ -273,18 +278,14 @@ multiple uniline strings."
;;; Notification backends
(defun gnus-desktop-notify-exec (body)
- "Call a program defined by `gnus-desktop-notify-exec-program'.
-with each argument being a group formatted according to
-`gnus-desktop-notify-format' and calling behavior is defined by
-`gnus-desktop-notify-behavior'."
+ "Invoke `gnus-desktop-notify-exec-program' with BODY."
(funcall #'gnus-desktop-notify--shell-command
gnus-desktop-notify-exec-program body))
(defun gnus-desktop-notify-send (body)
- "Invoke the configured `notify-send' program.
-See `gnus-desktop-notify-send-program',
-`gnus-desktop-notify-send-switches' and
-`gnus-desktop-notify-behavior' for configuration options."
+ "Invoke the configured `notify-send' program with BODY.
+See `gnus-desktop-notify-send-program' and
+`gnus-desktop-notify-send-switches' for configuration options."
(apply #'gnus-desktop-notify--shell-command
`(,gnus-desktop-notify-send-program
,@gnus-desktop-notify-send-switches
@@ -293,13 +294,11 @@ See `gnus-desktop-notify-send-program',
,body)))
(defun gnus-desktop-notify-dbus (body)
- "Generate a notification directly using `notifications' with
-the behavior defined by `gnus-desktop-notify-behavior'."
+ "Generate a notification with BODY using `notifications'."
(notifications-notify :title gnus-desktop-notify-send-subject :body body))
(defun gnus-desktop-notify-alert (body)
- "Generate a notification directly using `alert' with
-the behavior defined by `gnus-desktop-notify-behavior'."
+ "Generate a notification with BODY using `alert'."
(alert body :title gnus-desktop-notify-send-subject))
;;; Minor mode