Browse Source

Run bitlbee.el through checkdoc and fix some errors

master
Peter J. Jones 6 years ago
parent
commit
5eafcd3ff0
1 changed files with 15 additions and 10 deletions
  1. 15
    10
      lisp/bitlbee.el

+ 15
- 10
lisp/bitlbee.el View File

@@ -1,4 +1,4 @@
;;; bitlbee.el --- Help get Bitlbee (http://www.bitlbee.org) up and running
;;; bitlbee.el --- Help get Bitlbee (http://www.bitlbee.org) up and running.
;;
;; Copyright (C) 2008 pmade inc. (Peter Jones pjones@pmade.com)
;;
@@ -21,9 +21,9 @@
;; OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
;; WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
;;
;; Commentary:
;;; Commentary:
;;
;; Start and stop bitlbee from within emacs.
;; Start and stop bitlbee from within Emacs.
;;
;; Assumes you have a ~/.bitlbee directory where the bitlbee.conf file
;; lives, along with the account information XML files. The directory
@@ -40,25 +40,27 @@
;; Latest version:
;;
;; git clone git://pmade.com/elisp
;;
;;; Code:

(defvar bitlbee-user-directory "~/.bitlbee"
"The directory where user configuration goes")
"The directory where user configuration goes.")

(defvar bitlbee-options "-n -D -v "
"The options passed to Bitlbee on the command line.")

(defvar bitlbee-executable "bitlbee"
"The full path to the Bitlbee executable")
"The full path to the Bitlbee executable.")

(defvar bitlbee-buffer-name "*bitlbee*"
"The name of the bitlbee process buffer")
"The name of the bitlbee process buffer.")

(defun bitlbee-running-p ()
"Returns non-nil if bitlbee is running"
"Return non-nil if bitlbee is running."
(if (get-buffer-process bitlbee-buffer-name) t nil))

(defun bitlbee-start ()
"Start the bitlbee server"
"Start the bitlbee server."
(interactive)
(if (bitlbee-running-p) (message "bitlbee is already running")
(make-directory (expand-file-name bitlbee-user-directory) t)
@@ -67,18 +69,21 @@
(message "started bitlbee")))

(defun bitlbee-stop ()
"Stop the bitlbee server"
"Stop the bitlbee server."
(interactive)
(let ((proc (get-buffer-process bitlbee-buffer-name)))
(when proc (kill-process proc t))))

(defun bitlbee-sentinel-proc (proc msg)
"Internal sentinel function."
(when (memq (process-status proc) '(exit signal))
(setq msg (replace-regexp-in-string "\n" "" (format "stopped bitlbee (%s)" msg)))
(message msg)))

(defun bitlbee-command-line ()
"Create the full command line necessary to run bitlbee"
"Create the full command line necessary to run bitlbee."
(concat bitlbee-options " -d " bitlbee-user-directory " -c " bitlbee-user-directory "/bitlbee.conf"))

(provide 'bitlbee)

;;; bitlbee.el ends here

Loading…
Cancel
Save