Don't install gnu-emacs-user-config.
[elisp/liece.git] / lisp / liece-misc.el
index 51830c2..d69f011 100644 (file)
@@ -30,8 +30,6 @@
 ;;; Code:
 
 (eval-and-compile
-  (require 'broken)
-  (require 'pccl)
   (require 'invisible)
   (require 'liece-inlines)
   (require 'liece-coding))
         (concat "[" ,hostname "]")
        ,hostname)))
 
-(defmacro liece-current-nickname ()
-  "Our current nickname."
-  'liece-real-nickname)
+(defun liece-current-nickname ()
+  "Return the current nickname."
+  liece-real-nickname)
 
-(defmacro liece-current-channel ()
-  "Out current channel."
-  'liece-current-channel)
+(defun liece-current-channel ()
+  "Return the current channel."
+  liece-current-channel)
 
-(defmacro liece-current-channels ()
-  "Out current channels."
-  'liece-current-channels)
+(defun liece-current-channels ()
+  "Return the current channels."
+  liece-current-channels)
 
-(defmacro liece-current-chat-partner ()
-  "Out current chat partner."
-  'liece-current-chat-partner)
+(defun liece-current-chat-partner ()
+  "Return the current chat partner."
+  liece-current-chat-partner)
 
-(defmacro liece-current-chat-partners ()
-  "Out current chat partners."
-  'liece-current-chat-partners)
+(defun liece-current-chat-partners ()
+  "Return the current chat partners."
+  liece-current-chat-partners)
 
 (defmacro liece-scroll-if-visible (window)
   `(if ,window (set-window-point ,window (point-max))))
      found))
 
 ;;; stolen (and renamed) from time-date.el.
-(defun liece-time-difference (t1 t2)
+(defun liece-subtract-time (t1 t2)
   "Subtract two internal times."
   (let ((borrow (< (cadr t1) (cadr t2))))
     (list (- (car t1) (car t2) (if borrow 1 0))
          (- (+ (if borrow 65536 0) (cadr t1)) (cadr t2)))))
 
+(defun liece-time-difference (t1 t2)
+  "Return the differnce between two internal times in seconds."
+  (let ((sub (liece-subtract-time t1 t2)))
+    (+ (* (car sub) 65536) (cadr sub))))
+
 (defun liece-time-elapsed (time seconds)
   "Add SECONDS to TIME."
   (list (+ (car time) (/ (+ (cadr time) seconds) 65536))