emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/gnorb d04bf53 178/449: Rename/move the registry-entry f


From: Stefan Monnier
Subject: [elpa] externals/gnorb d04bf53 178/449: Rename/move the registry-entry function
Date: Fri, 27 Nov 2020 23:15:34 -0500 (EST)

branch: externals/gnorb
commit d04bf5318224dc86dd575b3303ac1fb7b6b1c2e6
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>

    Rename/move the registry-entry function
    
    * lisp/gnorb-registry.el (gnorb-registry-make-entry): New name and
      location of function.
    * lisp/gnorb-gnus.el (gnorb-gnus-make-registry-entry): Delete old
      function
      (gnorb-gnus-incoming-do-todo): Use new function
      (gnorb-gnus-outgoing-make-todo-1): Use new function
    * lisp/gnorb-gnus.el (gnorb-trigger-todo-action): Use new function
---
 lisp/gnorb-gnus.el     | 18 ++----------------
 lisp/gnorb-registry.el | 13 +++++++++++++
 lisp/gnorb-utils.el    |  2 +-
 3 files changed, 16 insertions(+), 17 deletions(-)

diff --git a/lisp/gnorb-gnus.el b/lisp/gnorb-gnus.el
index ec8aa3a..f6e3630 100644
--- a/lisp/gnorb-gnus.el
+++ b/lisp/gnorb-gnus.el
@@ -265,20 +265,6 @@ to the message's registry entry, under the 'gnorb-ids key."
   "Place to store the To, Subject, Date, and Message-ID headers
   of the currently-sending or last-sent message.")
 
-(defun gnorb-gnus-make-registry-entry (msg-id sender subject org-id group)
-  "Create a gnus-registry entry for a message, either received or
-sent. Save the relevant Org ids in the 'gnorb-ids key."
-  (when gnus-registry-enabled
-    ;; This set-id-key stuff is actually horribly
-    ;; inefficient.
-    (gnus-registry-get-or-make-entry msg-id)
-    (gnus-registry-set-id-key msg-id 'sender (list sender))
-    (gnus-registry-set-id-key msg-id 'subject (list subject))
-    (gnus-registry-set-id-key msg-id 'gnorb-ids (if (stringp org-id)
-                                                   (list org-id)
-                                                 org-id))
-    (gnus-registry-set-id-key msg-id 'group (list group))))
-
 (defun gnorb-gnus-check-outgoing-headers ()
   "Save the value of the `gnorb-mail-header' for the current
 message; multiple header values returned as a string. Also save
@@ -484,7 +470,7 @@ work."
     (when msg-id
       (org-entry-put (point) gnorb-org-msg-id-key msg-id)
       (gnorb-org-add-id-hash-entry msg-id)
-      (gnorb-gnus-make-registry-entry msg-id sender subject 
(org-id-get-create) group))))
+      (gnorb-registry-make-entry msg-id sender subject (org-id-get-create) 
group))))
 
 ;;; If an incoming message should trigger state-change for a Org todo,
 ;;; call this function on it.
@@ -559,7 +545,7 @@ to t (it is, by default)."
      "Insert a link to the message with org-insert-link (%s)"
      (key-description
       (where-is-internal 'org-insert-link nil t)))
-    (gnorb-gnus-make-registry-entry
+    (gnorb-registry-make-entry
      msg-id sender subject (org-id-get-create) group)))
 
 ;;;###autoload
diff --git a/lisp/gnorb-registry.el b/lisp/gnorb-registry.el
index df05029..09998bd 100644
--- a/lisp/gnorb-registry.el
+++ b/lisp/gnorb-registry.el
@@ -55,6 +55,19 @@
   :tag "Gnorb Registry"
   :group 'gnorb)
 
+(defun gnorb-registry-make-entry (msg-id sender subject org-id group)
+  "Create a Gnus registry entry for a message, either received or
+sent. Save the relevant Org ids in the 'gnorb-ids key."
+  ;; This set-id-key stuff is actually horribly
+  ;; inefficient.
+  (when gnus-registry-enabled
+    (gnus-registry-get-or-make-entry msg-id)
+    (gnus-registry-set-id-key msg-id 'sender (list sender))
+    (gnus-registry-set-id-key msg-id 'subject (list subject))
+    (gnus-registry-set-id-key msg-id 'gnorb-ids (if (stringp org-id)
+                                                   (list org-id)
+                                                 org-id))
+    (gnus-registry-set-id-key msg-id 'group (list group))))
 
 
 (provide 'gnorb-registry)
diff --git a/lisp/gnorb-utils.el b/lisp/gnorb-utils.el
index 9289f91..ac33368 100644
--- a/lisp/gnorb-utils.el
+++ b/lisp/gnorb-utils.el
@@ -151,7 +151,7 @@ the prefix arg."
       (when sent-id
        (org-entry-add-to-multivalued-property
         root-marker gnorb-org-msg-id-key sent-id)
-       (gnorb-gnus-make-registry-entry
+       (gnorb-registry-make-entry
         sent-id
         (plist-get gnorb-gnus-sending-message-info :from)
         (plist-get gnorb-gnus-sending-message-info :subject)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]