branch: elpa/jabber
commit 20839a30e0bb91fdee047f04ea63eb6d1d1e8514
Author: Thanos Apollo <[email protected]>
Commit: Thanos Apollo <[email protected]>
Remove dead code with no remaining callers
---
lisp/jabber-avatar.el | 28 ---------------------------
lisp/jabber-chat.el | 5 -----
lisp/jabber-disco.el | 39 --------------------------------------
lisp/jabber-httpupload.el | 8 --------
lisp/jabber-mam.el | 17 -----------------
lisp/jabber-muc-nick-completion.el | 15 ---------------
lisp/jabber-notifications.el | 12 ------------
lisp/jabber-presence.el | 9 ---------
8 files changed, 133 deletions(-)
diff --git a/lisp/jabber-avatar.el b/lisp/jabber-avatar.el
index 29c9a2d6db..9bb82c248a 100644
--- a/lisp/jabber-avatar.el
+++ b/lisp/jabber-avatar.el
@@ -89,22 +89,6 @@
(define-obsolete-function-alias 'avatar-width 'jabber-avatar-width "0.11.0")
(define-obsolete-function-alias 'avatar-bytes 'jabber-avatar-bytes "0.11.0")
-(defun jabber-avatar-from-url (url)
- "Construct an avatar structure from the given URL.
-Retrieves the image to find info about it."
- (with-current-buffer (let ((coding-system-for-read 'binary))
- (url-retrieve-synchronously url))
- (let* ((case-fold-search t)
- (mime-type (ignore-errors
- (search-forward-regexp "^content-type:[ \t]*\\(.*\\)$")
- (match-string 1)))
- (data (progn
- (search-forward "\n\n")
- (buffer-substring (point) (point-max)))))
- (prog1
- (jabber-avatar-from-data data nil mime-type)
- (kill-buffer nil)))))
-
(defun jabber-avatar-from-file (filename)
"Construct an avatar structure from FILENAME."
(require 'mailcap)
@@ -133,10 +117,6 @@ If MIME-TYPE is not specified, try to find it from the
image data."
(symbol-name detected)))))
(make-jabber-avatar :mime-type type :sha1-sum sha1-sum :base64-data
base64-data :bytes bytes)))
-(defun jabber-avatar--line-height ()
- "Return the pixel height of a line, suitable for inline avatars."
- (frame-char-height))
-
(defun jabber-avatar-image (avatar)
"Create an image from AVATAR sized to fit configured avatar bounds.
Return nil if images of this type are not supported."
@@ -215,14 +195,6 @@ AVATAR may be one of:
(put jid-symbol 'avatar (funcall image))
(put jid-symbol 'avatar-hash hash))))
-(defun jabber-create-image (file-or-data &optional _type data-p)
- "Create a line-height-sized image from FILE-OR-DATA.
-When DATA-P is non-nil, FILE-OR-DATA is the raw image bytes."
- (let ((h (jabber-avatar--line-height)))
- (if data-p
- (jabber-image-create file-or-data nil h h)
- (jabber-image-create-from-file file-or-data h h))))
-
(provide 'jabber-avatar)
;;; jabber-avatar.el ends here
diff --git a/lisp/jabber-chat.el b/lisp/jabber-chat.el
index 8c6cfb683d..a948f3473a 100644
--- a/lisp/jabber-chat.el
+++ b/lisp/jabber-chat.el
@@ -514,11 +514,6 @@ When nil or 0, display all messages."
(jabber-chain-add 'jabber-message-chain #'jabber-process-chat)
-(defun jabber-get-forwarded-message (xml-data)
- "Extract the inner message from a carbon-forwarded stanza.
-Returns the inner message element, or nil if XML-DATA is not a carbon."
- (cdr (jabber-chat--extract-carbon xml-data)))
-
(defun jabber-chat--extract-carbon (xml-data)
"Extract carbon type and inner message from XML-DATA.
Returns (TYPE . MESSAGE) where TYPE is `sent' or `received',
diff --git a/lisp/jabber-disco.el b/lisp/jabber-disco.el
index a4d9911f75..17271ccfab 100644
--- a/lisp/jabber-disco.el
+++ b/lisp/jabber-disco.el
@@ -729,45 +729,6 @@ called with JC, the remaining CALLBACK-DATA, and the
obtained RESULT."
(when (car callback-data)
(funcall (car callback-data) jc (cdr callback-data) result))))
-(defun jabber-disco-get-items-immediately (jid node)
- "Retrieve items from `jabber-disco-items-cache' using JID & NODE as key."
- (gethash (cons jid node) jabber-disco-items-cache))
-
-(defun jabber-disco-publish (jc node item-name item-jid item-node)
- "Publish the given item under disco node NODE.
-
-JC is the Jabber connection."
- (jabber-send-iq jc nil
- "set"
- `(query ((xmlns . ,jabber-disco-xmlns-items)
- ,@(when node `((node . ,node))))
- (item ((action . "update")
- (jid . ,item-jid)
- ,@(when item-name
- `((name . ,item-name)))
- ,@(when item-node
- `((node . ,item-node))))))
- 'jabber-report-success "Disco publish"
- 'jabber-report-success "Disco publish"))
-
-(defun jabber-disco-publish-remove (jc node item-jid item-node)
- "Remove the given item from published disco items.
-
-JC: Jabber Client connection.
-NODE: Disco node to remove item from. Can be nil.
-ITEM-JID: JID (Jabber ID) of the disco item to be removed.
-ITEM-NODE: Specific node of the disco item to be removed. Can be nil."
- (jabber-send-iq jc nil
- "set"
- `(query ((xmlns . ,jabber-disco-xmlns-items)
- ,@(when node `((node . ,node))))
- (item ((action . "remove")
- (jid . ,item-jid)
- ,@(when item-node
- `((node . ,item-node))))))
- 'jabber-report-success "Disco removal"
- 'jabber-report-success "Disco removal"))
-
;;; Info and service menus
(declare-function jabber-get-info "jabber-info.el" (jc to))
diff --git a/lisp/jabber-httpupload.el b/lisp/jabber-httpupload.el
index c13bb8cf63..63e996c3ea 100644
--- a/lisp/jabber-httpupload.el
+++ b/lisp/jabber-httpupload.el
@@ -92,14 +92,6 @@ Each element is (jabber-connection . upload-iri).")
Each element is (jabber-connection . max-file-size), where
max-file-size is in bytes.")
-(defun jabber-httpupload-test-all-connections-support ()
- "Test all connections in `jabber-connections' for HTTP Upload support.
-Store the results in `jabber-httpupload-support'. If the connection was
-already tested and the test was successful, do not re-test it."
- (dolist (jc jabber-connections)
- (unless (jabber-httpupload-server-has-support jc)
- (jabber-httpupload-test-connection-support jc))))
-
(defun jabber-httpupload-test-connection-support (jc)
"Test if HTTP Upload is supported on the JC connection's server.
If supported, store the item IRI in `jabber-httpupload-support'."
diff --git a/lisp/jabber-mam.el b/lisp/jabber-mam.el
index cbedb62aff..1e15955fa1 100644
--- a/lisp/jabber-mam.el
+++ b/lisp/jabber-mam.el
@@ -69,9 +69,6 @@
(defconst jabber-mam-delay-xmlns "urn:xmpp:delay"
"Namespace for XEP-0203 Delayed Delivery.")
-(defconst jabber-mam-sid-xmlns "urn:xmpp:sid:0"
- "Namespace for XEP-0359 Stanza IDs.")
-
;;; Customization
(defcustom jabber-mam-enable t
@@ -760,20 +757,6 @@ the server are deleted. The buffer is refreshed in place
after sync."
(jabber-mam--query jc nil queryid nil nil peer t count)
(jabber-mam--query jc nil queryid peer nil nil t count))))
-;;; On-demand history fetch
-
-(defun jabber-mam-fetch-peer-history (jc peer &optional muc-p callback)
- "Fetch full MAM history for PEER via JC.
-When MUC-P is non-nil, query the room archive (to=PEER).
-When CALLBACK is non-nil, call it with no arguments after the
-query completes (including all pagination)."
- (let ((queryid (jabber-mam--make-queryid)))
- (when callback
- (push (cons queryid callback) jabber-mam--completion-callbacks))
- (if muc-p
- (jabber-mam--query jc nil queryid nil nil peer)
- (jabber-mam--query jc nil queryid peer nil nil))))
-
;;; Disconnect cleanup
(defun jabber-mam--cleanup-connection (jc)
diff --git a/lisp/jabber-muc-nick-completion.el
b/lisp/jabber-muc-nick-completion.el
index 90184e5611..cab0d0ebeb 100644
--- a/lisp/jabber-muc-nick-completion.el
+++ b/lisp/jabber-muc-nick-completion.el
@@ -153,21 +153,6 @@ TEXT is the message body used to detect personal-mention
bonus."
(mapcar #'car (sort (mapcar #'fetch-time nicks)
#'cmp)))))
-(defun jabber-muc-beginning-of-line ()
- "Return position of line begining."
- (save-excursion
- (if (looking-back jabber-muc-completion-delimiter
(line-beginning-position))
- (backward-char (+ (length jabber-muc-completion-delimiter) 1)))
- (skip-syntax-backward "^-")
- (point)))
-
-(defun jabber-muc-active-participants (group)
- "Return nicks for speaking participants in GROUP."
- (let ((times (cdr (assoc group jabber-muc-participant-last-speaking))))
- (cl-remove-if-not
- (lambda (nick) (assoc nick times))
- (jabber-muc-nicknames))))
-
(defun jabber-muc-nick-completion-at-point ()
"Nick completion function for `completion-at-point'."
(when (bound-and-true-p jabber-group)
diff --git a/lisp/jabber-notifications.el b/lisp/jabber-notifications.el
index ce5ae92091..655333cd16 100644
--- a/lisp/jabber-notifications.el
+++ b/lisp/jabber-notifications.el
@@ -44,23 +44,11 @@ The default \"emacs\" is resolved by the system icon theme."
:type 'integer
:group 'jabber-alerts)
-(defcustom jabber-notifications-message-header "Jabber message"
- "Defines the header of the pop up."
- :type 'string
- :group 'jabber-alerts)
-
(defcustom jabber-notifications-app "Emacs Jabber"
"Defines the app of the pop up."
:type 'string
:group 'jabber-alerts)
-(defcustom jabber-notifications-urgency "low"
- "Urgency of message."
- :type '(choice (const :tag "Low" "low")
- (const :tag "Normal" "normal")
- (const :tag "Critical" "critical"))
- :group 'jabber-alerts)
-
(defcustom jabber-notifications-muc 'mentions
"When to show desktop notifications for MUC messages.
`all' shows a notification for every MUC message, `mentions'
diff --git a/lisp/jabber-presence.el b/lisp/jabber-presence.el
index 962edc9468..cd1f5f4236 100644
--- a/lisp/jabber-presence.el
+++ b/lisp/jabber-presence.el
@@ -392,15 +392,6 @@ Show status properties from highest-priority resource."
(put buddy 'show (plist-get resource-plist 'show)))))))
resource-alist)))
-(defun jabber-count-connected-resources (buddy)
- "Return the number of connected resources for BUDDY."
- (let ((resource-alist (get buddy 'resources))
- (count 0))
- (dolist (resource resource-alist)
- (if (plist-get (cdr resource) 'connected)
- (setq count (1+ count))))
- count))
-
;;;###autoload
(defun jabber-send-presence (show status priority &optional jc)
"Set presence to SHOW with STATUS message and PRIORITY.