From 1afd327afb0d9e42cbd4087dabb051fa295c07a2 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Sun, 26 Feb 2017 19:44:18 +0000 Subject: Use built-in HTMl entity escaping function --- gnus-desktop-notify.el | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'gnus-desktop-notify.el') diff --git a/gnus-desktop-notify.el b/gnus-desktop-notify.el index 7c5dbd9..0c18ebc 100644 --- a/gnus-desktop-notify.el +++ b/gnus-desktop-notify.el @@ -191,20 +191,6 @@ the notification of new messages (depending on the value of (defvar gnus-desktop-notify-counts () "Map Gnus group names to their total number of articles.") -(defvar gnus-desktop-notify-html-lut - '(("&" . "&") - ("<" . "<" ) - (">" . ">" )) - "Map special characters to their HTML entities.") - -;; FIXME: Do not reinvent the wheel if possible -(defun gnus-desktop-notify-escape-html-entities (str) - "Escape HTML character entity references." - (let* ((lut gnus-desktop-notify-html-lut) - (chars (format "[%s]" (mapconcat #'car lut "")))) - (replace-regexp-in-string - chars (lambda (s) (cdr (assoc-string s lut))) str))) - (defun gnus-desktop-notify-read-count (group) (let* ((range (gnus-range-normalize (gnus-info-read group))) (count (gnus-last-element range))) @@ -223,7 +209,7 @@ collapsing." GROUP should have the form (NAME . COUNT), where NAME is the group name to display and COUNT is the corresponding number of articles." - (let ((name (gnus-desktop-notify-escape-html-entities (car group))) + (let ((name (url-insert-entities-in-string (car group))) (count (cdr group))) (format-spec gnus-desktop-notify-format (format-spec-make ?n count -- cgit v1.2.3 From 0087d2780b567a9c8412f0f0ed5586260aa2b41d Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Sun, 26 Feb 2017 19:31:14 +0000 Subject: Declare external functions to byte compiler --- gnus-desktop-notify.el | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gnus-desktop-notify.el') diff --git a/gnus-desktop-notify.el b/gnus-desktop-notify.el index 0c18ebc..fd2468b 100644 --- a/gnus-desktop-notify.el +++ b/gnus-desktop-notify.el @@ -85,6 +85,9 @@ (unless (require 'alert nil t) (require 'notifications nil t)) +(declare-function alert "alert") +(declare-function notifications-notify "notifications") + ;;; Custom variables (defgroup gnus-desktop-notify nil -- cgit v1.2.3 From 22defa2739c104178e5560f17f74579890651627 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Sun, 26 Feb 2017 21:19:17 +0000 Subject: Enable lexical binding --- gnus-desktop-notify.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnus-desktop-notify.el') diff --git a/gnus-desktop-notify.el b/gnus-desktop-notify.el index fd2468b..4876f6e 100644 --- a/gnus-desktop-notify.el +++ b/gnus-desktop-notify.el @@ -1,4 +1,4 @@ -;;; gnus-desktop-notify.el --- Gnus Desktop Notification global minor mode +;;; gnus-desktop-notify.el --- Gnus Desktop Notification global minor mode -*- lexical-binding: t -*- ;; Author: Yuri D'Elia ;; Contributors: Philipp Haselwarter -- cgit v1.2.3 From 7627c6f66e768683e65d62080eb4f3a48fbca6b1 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Sun, 26 Feb 2017 21:43:00 +0000 Subject: Remove ignored arguments --- gnus-desktop-notify.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnus-desktop-notify.el') diff --git a/gnus-desktop-notify.el b/gnus-desktop-notify.el index 4876f6e..aaa76ed 100644 --- a/gnus-desktop-notify.el +++ b/gnus-desktop-notify.el @@ -235,7 +235,7 @@ multiple uniline strings." ((eq gnus-desktop-notify-behavior 'gnus-desktop-notify-multi) `(,bodies)))))) -(defun gnus-desktop-notify-check (&rest _ignored) +(defun gnus-desktop-notify-check () "Check all groups for and notify of new articles." (interactive) (let ((updated-groups ())) -- cgit v1.2.3 From 9c007b0c7595135884cad63aa27bc3cb77863ddb Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Sun, 5 Mar 2017 02:24:12 +0000 Subject: List Basil as contributor --- gnus-desktop-notify.el | 1 + 1 file changed, 1 insertion(+) (limited to 'gnus-desktop-notify.el') diff --git a/gnus-desktop-notify.el b/gnus-desktop-notify.el index aaa76ed..d6f7009 100644 --- a/gnus-desktop-notify.el +++ b/gnus-desktop-notify.el @@ -2,6 +2,7 @@ ;; Author: Yuri D'Elia ;; Contributors: Philipp Haselwarter +;; Basil L. Contovounesios ;; Version: 1.4 ;; URL: http://www.thregr.org/~wavexx/software/gnus-desktop-notify.el/ ;; GIT: git://src.thregr.org/gnus-desktop-notify.el/ -- cgit v1.2.3