]> crepu.dev Git - config.git/blame_incremental - djavu-asus/elpa/jabber-20230715.456/jabber-xmessage.el
Actualizado el Readme
[config.git] / djavu-asus / elpa / jabber-20230715.456 / jabber-xmessage.el
... / ...
CommitLineData
1;; jabber-xmessage.el - emacs-jabber interface to xmessage -*- lexical-binding: t; -*-
2
3;; Copyright (C) 2008 - Magnus Henoch
4;; Copyright (C) 2005 - Mario Domenech Goulart
5
6;; This file is a part of jabber.el.
7
8;; This program is free software; you can redistribute it and/or modify
9;; it under the terms of the GNU General Public License as published by
10;; the Free Software Foundation; either version 2 of the License, or
11;; (at your option) any later version.
12
13;; This program is distributed in the hope that it will be useful,
14;; but WITHOUT ANY WARRANTY; without even the implied warranty of
15;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;; GNU General Public License for more details.
17
18;; You should have received a copy of the GNU General Public License
19;; along with this program; if not, write to the Free Software
20;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
22(eval-when-compile (require 'jabber-alert))
23
24(defcustom jabber-xmessage-timeout 15
25 "Timeout in seconds for xmessage alerts.
26Set this to nil to have no timeout."
27 :type '(choice (integer :tag "Seconds")
28 (const :tag "No timeout" nil))
29 :group 'jabber-alerts)
30
31(defun jabber-xmessage-display-message (text &optional title)
32 "Displays MESSAGE using the xmessage program."
33 (let* ((process-connection-type nil)
34 (timeout-args (when jabber-xmessage-timeout
35 (list "-timeout" (number-to-string jabber-xmessage-timeout))))
36 (args (append timeout-args (list (or title text)))))
37 (apply 'start-process "xmessage" nil "xmessage" args)))
38
39(define-jabber-alert xmessage "Display a message using the xmessage program."
40 'jabber-xmessage-display-message)
41
42(provide 'jabber-xmessage)
43;; arch-tag: 10A74D00-5D2C-11D9-A294-000A95C2FCD0